summaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight
diff options
context:
space:
mode:
authorHuayi Li <huayi.li@csr.com>2013-10-09 10:33:02 +0800
committerThierry Reding <thierry.reding@gmail.com>2013-10-22 09:26:12 +0200
commit1dea1fd09246ada581a99d0669108eea94b7bfee (patch)
tree411889b86b4ceb5b7aa1beacb51ce87c4019f390 /drivers/video/backlight
parente4bfeda96872bfe6015cd360008b77cd3b981b2b (diff)
downloadop-kernel-dev-1dea1fd09246ada581a99d0669108eea94b7bfee.zip
op-kernel-dev-1dea1fd09246ada581a99d0669108eea94b7bfee.tar.gz
pwm_backlight: avoid short blank screen while doing hibernation
Use SIMPLE_DEV_PM_OPS macro will initialize the member "freeze" and "thaw" of pwm_backlight_pm_ops as below, .freeze = suspend_fn, .thaw = resume_fn, then during the process of making hibernation snapshot, screen will be blank at the moment of freezing, and then light at the moment of thawing. this is not the right user experience for suspending to disk. so this patch drops freeze and thaw callback, make the LCD is always lighting before the final shutdown. Signed-off-by: Huayi Li <huayi.li@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r--drivers/video/backlight/pwm_bl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index f77a7b0..29953349 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -387,8 +387,14 @@ static int pwm_backlight_resume(struct device *dev)
}
#endif
-static SIMPLE_DEV_PM_OPS(pwm_backlight_pm_ops, pwm_backlight_suspend,
- pwm_backlight_resume);
+static const struct dev_pm_ops pwm_backlight_pm_ops = {
+#ifdef CONFIG_PM_SLEEP
+ .suspend = pwm_backlight_suspend,
+ .resume = pwm_backlight_resume,
+ .poweroff = pwm_backlight_suspend,
+ .restore = pwm_backlight_resume,
+#endif
+};
static struct platform_driver pwm_backlight_driver = {
.driver = {
OpenPOWER on IntegriCloud