diff options
| -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 @@ | |||
| 29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
| 30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
| 31 | #include <linux/cpufreq.h> | 31 | #include <linux/cpufreq.h> |
| 32 | #include <linux/console.h> | ||
| 32 | #include <video/da8xx-fb.h> | 33 | #include <video/da8xx-fb.h> |
| 33 | 34 | ||
| 34 | #define DRIVER_NAME "da8xx_lcdc" | 35 | #define DRIVER_NAME "da8xx_lcdc" |
| @@ -930,11 +931,35 @@ err_request_mem: | |||
| 930 | #ifdef CONFIG_PM | 931 | #ifdef CONFIG_PM |
| 931 | static int fb_suspend(struct platform_device *dev, pm_message_t state) | 932 | static int fb_suspend(struct platform_device *dev, pm_message_t state) |
| 932 | { | 933 | { |
| 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; | ||
| 934 | } | 947 | } |
| 935 | static int fb_resume(struct platform_device *dev) | 948 | static int fb_resume(struct platform_device *dev) |
| 936 | { | 949 | { |
| 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; | ||
| 938 | } | 963 | } |
| 939 | #else | 964 | #else |
| 940 | #define fb_suspend NULL | 965 | #define fb_suspend NULL |
