Commit 367d0a3b authored by Chaithrika U S's avatar Chaithrika U S Committed by Kevin Hilman

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: default avatarChaithrika U S <chaithrika@ti.com>
parent 343b8891
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
#include <linux/console.h>
#include <video/da8xx-fb.h> #include <video/da8xx-fb.h>
#define DRIVER_NAME "da8xx_lcdc" #define DRIVER_NAME "da8xx_lcdc"
...@@ -931,11 +932,35 @@ err_request_mem: ...@@ -931,11 +932,35 @@ err_request_mem:
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int fb_suspend(struct platform_device *dev, pm_message_t state) 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) 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 #else
#define fb_suspend NULL #define fb_suspend NULL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment