Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chaithrika U S and committed by
Linus Torvalds
1d3c6c7b 36113804

+27 -2
+27 -2
drivers/video/da8xx-fb.c
··· 29 29 #include <linux/interrupt.h> 30 30 #include <linux/clk.h> 31 31 #include <linux/cpufreq.h> 32 + #include <linux/console.h> 32 33 #include <video/da8xx-fb.h> 33 34 34 35 #define DRIVER_NAME "da8xx_lcdc" ··· 931 930 #ifdef CONFIG_PM 932 931 static int fb_suspend(struct platform_device *dev, pm_message_t state) 933 932 { 934 - return -EBUSY; 933 + struct fb_info *info = platform_get_drvdata(dev); 934 + struct da8xx_fb_par *par = info->par; 935 + 936 + acquire_console_sem(); 937 + if (par->panel_power_ctrl) 938 + par->panel_power_ctrl(0); 939 + 940 + fb_set_suspend(info, 1); 941 + lcd_disable_raster(); 942 + clk_disable(par->lcdc_clk); 943 + release_console_sem(); 944 + 945 + return 0; 935 946 } 936 947 static int fb_resume(struct platform_device *dev) 937 948 { 938 - return -EBUSY; 949 + struct fb_info *info = platform_get_drvdata(dev); 950 + struct da8xx_fb_par *par = info->par; 951 + 952 + acquire_console_sem(); 953 + if (par->panel_power_ctrl) 954 + par->panel_power_ctrl(1); 955 + 956 + clk_enable(par->lcdc_clk); 957 + lcd_enable_raster(); 958 + fb_set_suspend(info, 0); 959 + release_console_sem(); 960 + 961 + return 0; 939 962 } 940 963 #else 941 964 #define fb_suspend NULL