* [PATCH] pwm-backlight: handle BL_CORE_FBBLANK state
@ 2013-01-30 6:19 Alexandre Courbot
2013-01-30 7:58 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Courbot @ 2013-01-30 6:19 UTC (permalink / raw)
To: Thierry Reding, Richard Purdie
Cc: linux-kernel, linux-fbdev, gnurou, Alexandre Courbot
According to include/linux/backlight.h, the fb_blank field is to be
removed and blank status should preferably be set by setting the
BL_CORE_FBBLANK bit of the state field. This patch ensures this
condition is also taken into account when updating the backlight state.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drivers/video/backlight/pwm_bl.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 069983c..4af6d13 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -41,10 +41,9 @@ static int pwm_backlight_update_status(struct backlight_device *bl)
int brightness = bl->props.brightness;
int max = bl->props.max_brightness;
- if (bl->props.power != FB_BLANK_UNBLANK)
- brightness = 0;
-
- if (bl->props.fb_blank != FB_BLANK_UNBLANK)
+ if (bl->props.power != FB_BLANK_UNBLANK ||
+ bl->props.fb_blank != FB_BLANK_UNBLANK ||
+ bl->props.state & BL_CORE_FBBLANK)
brightness = 0;
if (pb->notify)
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pwm-backlight: handle BL_CORE_FBBLANK state
2013-01-30 6:19 [PATCH] pwm-backlight: handle BL_CORE_FBBLANK state Alexandre Courbot
@ 2013-01-30 7:58 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2013-01-30 7:58 UTC (permalink / raw)
To: Alexandre Courbot; +Cc: Richard Purdie, linux-kernel, linux-fbdev, gnurou
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
On Wed, Jan 30, 2013 at 03:19:15PM +0900, Alexandre Courbot wrote:
> According to include/linux/backlight.h, the fb_blank field is to be
> removed and blank status should preferably be set by setting the
> BL_CORE_FBBLANK bit of the state field. This patch ensures this
> condition is also taken into account when updating the backlight state.
>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
> drivers/video/backlight/pwm_bl.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
Applied, thanks.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-30 7:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 6:19 [PATCH] pwm-backlight: handle BL_CORE_FBBLANK state Alexandre Courbot
2013-01-30 7:58 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox