aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-04-29 11:28:59 -0400
committerThierry Reding <thierry.reding@gmail.com>2014-05-02 07:25:59 -0400
commit5f33b896246a2d9bdf01352de11d4dab96ba2fc9 (patch)
treeafc09c8181b95ce366318486f2f2e9fe5584a8a5 /drivers/video
parent093e00bb3f82f3c67e2d1682e316fc012bcd0d92 (diff)
pwm-backlight: Disable backlight on shutdown
When a device is shut down, make sure to disable the backlight. If it stays lit, it gives the impression that the device hasn't turned off. Furthermore keeping the backlight on may consume power, which is not what users expect when they shut down a device. Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/pwm_bl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index b75201ff46f6..fa7f5c35b7fb 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -359,6 +359,14 @@ static int pwm_backlight_remove(struct platform_device *pdev)
359 return 0; 359 return 0;
360} 360}
361 361
362static void pwm_backlight_shutdown(struct platform_device *pdev)
363{
364 struct backlight_device *bl = platform_get_drvdata(pdev);
365 struct pwm_bl_data *pb = bl_get_data(bl);
366
367 pwm_backlight_power_off(pb);
368}
369
362#ifdef CONFIG_PM_SLEEP 370#ifdef CONFIG_PM_SLEEP
363static int pwm_backlight_suspend(struct device *dev) 371static int pwm_backlight_suspend(struct device *dev)
364{ 372{
@@ -404,6 +412,7 @@ static struct platform_driver pwm_backlight_driver = {
404 }, 412 },
405 .probe = pwm_backlight_probe, 413 .probe = pwm_backlight_probe,
406 .remove = pwm_backlight_remove, 414 .remove = pwm_backlight_remove,
415 .shutdown = pwm_backlight_shutdown,
407}; 416};
408 417
409module_platform_driver(pwm_backlight_driver); 418module_platform_driver(pwm_backlight_driver);