Skip to content

Commit

Permalink
backlight: fix pwm_bl.c to notify platform code when suspending
Browse files Browse the repository at this point in the history
When suspending, pwm-bl sets duty cycle to 0, and shuts down the pwm
device.

This patch ensure that the platform code is called before that
(through the notify callback_, leaving a chance for the platform code
to configure GPIOs (shutting off the backlight, for example), much like
it is done during normal operations.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
  • Loading branch information
Marc Zyngier authored and Eric Miao committed Jul 3, 2009
1 parent 4aa7826 commit 82e8b54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/video/backlight/pwm_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ static int pwm_backlight_suspend(struct platform_device *pdev,
struct backlight_device *bl = platform_get_drvdata(pdev);
struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev);

if (pb->notify)
pb->notify(0);
pwm_config(pb->pwm, 0, pb->period);
pwm_disable(pb->pwm);
return 0;
Expand Down

0 comments on commit 82e8b54

Please sign in to comment.