提交 1dea1fd0 编写于 作者: H Huayi Li 提交者: Thierry Reding

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: NHuayi Li <huayi.li@csr.com>
Signed-off-by: NBarry Song <Baohua.Song@csr.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 e4bfeda9
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册