diff options
authorHuayi Li <>2013-10-09 10:33:02 +0800
committerMarcel Ziswiler <>2018-03-28 18:40:04 +0200
commitc610794bd5f3b90231deb7daab8095821c6bee92 (patch)
parent8b58c9edccdbb58ec34df3a41375263a315db2c6 (diff)
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 <> Signed-off-by: Barry Song <> Signed-off-by: Thierry Reding <> (cherry picked from commit 1dea1fd09246ada581a99d0669108eea94b7bfee)
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 5fa9388714c4..1812760201db 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)
-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 = {
+ .suspend = pwm_backlight_suspend,
+ .resume = pwm_backlight_resume,
+ .poweroff = pwm_backlight_suspend,
+ .restore = pwm_backlight_resume,
static struct platform_driver pwm_backlight_driver = {
.driver = {