Skip to content

Commit 1d3c6c7

Browse files
Chaithrika U Storvalds
authored andcommitted
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>
1 parent 3611380 commit 1d3c6c7

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

‎drivers/video/da8xx-fb.c‎

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/interrupt.h>
3030
#include <linux/clk.h>
3131
#include <linux/cpufreq.h>
32+
#include <linux/console.h>
3233
#include <video/da8xx-fb.h>
3334

3435
#define DRIVER_NAME "da8xx_lcdc"
@@ -930,11 +931,35 @@ static int __init fb_probe(struct platform_device *device)
930931
#ifdef CONFIG_PM
931932
static int fb_suspend(struct platform_device *dev, pm_message_t state)
932933
{
933-
return -EBUSY;
934+
struct fb_info *info = platform_get_drvdata(dev);
935+
struct da8xx_fb_par *par = info->par;
936+
937+
acquire_console_sem();
938+
if (par->panel_power_ctrl)
939+
par->panel_power_ctrl(0);
940+
941+
fb_set_suspend(info, 1);
942+
lcd_disable_raster();
943+
clk_disable(par->lcdc_clk);
944+
release_console_sem();
945+
946+
return 0;
934947
}
935948
static int fb_resume(struct platform_device *dev)
936949
{
937-
return -EBUSY;
950+
struct fb_info *info = platform_get_drvdata(dev);
951+
struct da8xx_fb_par *par = info->par;
952+
953+
acquire_console_sem();
954+
if (par->panel_power_ctrl)
955+
par->panel_power_ctrl(1);
956+
957+
clk_enable(par->lcdc_clk);
958+
lcd_enable_raster();
959+
fb_set_suspend(info, 0);
960+
release_console_sem();
961+
962+
return 0;
938963
}
939964
#else
940965
#define fb_suspend NULL

0 commit comments

Comments
 (0)