diff options
author | Chaithrika U S <chaithrika@ti.com> | 2009-12-15 16:46:39 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 07:20:05 -0800 |
commit | 1d3c6c7b366bdc3406af96bf55d63b4aa24f400a (patch) | |
tree | 30e466991a6678b9dc8c74263f35fde76bc1780d /drivers | |
parent | 3611380490c6ce27a2277709a34b8c5531524caf (diff) |
davinci: fb : add suspend/resume suuport for DA8xx/OMAP-L1xx fb driver
Suspend/resume support DA8xx/OMAP-L1xx frame buffer driver. This feature
has been tested on DA850/OMAP-L138 EVM. For the purpose of testing, the
patch series[1] which adds suspend support for DA850/OMAP-L138 SoC was
applied.
[1] http://patchwork.kernel.org/patch/60260/
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/da8xx-fb.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index eb95b893e8b2..36574bf61d06 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -29,6 +29,7 @@ #include <linux/interrupt.h> #include <linux/clk.h> #include <linux/cpufreq.h> +#include <linux/console.h> #include <video/da8xx-fb.h> #define DRIVER_NAME "da8xx_lcdc" @@ -930,11 +931,35 @@ err_request_mem: #ifdef CONFIG_PM static int fb_suspend(struct platform_device *dev, pm_message_t state) { - return -EBUSY; + struct fb_info *info = platform_get_drvdata(dev); + struct da8xx_fb_par *par = info->par; + + acquire_console_sem(); + if (par->panel_power_ctrl) + par->panel_power_ctrl(0); + + fb_set_suspend(info, 1); + lcd_disable_raster(); + clk_disable(par->lcdc_clk); + release_console_sem(); + + return 0; } static int fb_resume(struct platform_device *dev) { - return -EBUSY; + struct fb_info *info = platform_get_drvdata(dev); + struct da8xx_fb_par *par = info->par; + + acquire_console_sem(); + if (par->panel_power_ctrl) + par->panel_power_ctrl(1); + + clk_enable(par->lcdc_clk); + lcd_enable_raster(); + fb_set_suspend(info, 0); + release_console_sem(); + + return 0; } #else #define fb_suspend NULL |