diff options
author | Thierry Reding <treding@nvidia.com> | 2014-04-29 17:28:59 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-03-28 18:40:13 +0200 |
commit | 47be2c40872f5eebb568cc046e4ef145cfb1e0c7 (patch) | |
tree | fe1d0aabd1deb63e5c614f3622d296233844611e /drivers/video | |
parent | 3a4920262b3fac01fa2b6f2b74859bc8feb92dad (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>
(cherry picked from commit 5f33b896246a2d9bdf01352de11d4dab96ba2fc9)
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 9 |
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) return 0; } +static void pwm_backlight_shutdown(struct platform_device *pdev) +{ + struct backlight_device *bl = platform_get_drvdata(pdev); + struct pwm_bl_data *pb = bl_get_data(bl); + + pwm_backlight_power_off(pb); +} + #ifdef CONFIG_PM_SLEEP static int pwm_backlight_suspend(struct device *dev) { @@ -404,6 +412,7 @@ static struct platform_driver pwm_backlight_driver = { }, .probe = pwm_backlight_probe, .remove = pwm_backlight_remove, + .shutdown = pwm_backlight_shutdown, }; module_platform_driver(pwm_backlight_driver); |