Thread (6 messages) 6 messages, 3 authors, 2012-01-11

Re: [PATCH 2/2] atmel_lcdfb: Use proper blanking on negative contrast

flat view

From: Nicolas Ferre <hidden>
Date: 2012-01-09 16:17:18
Also in: linux-arm-kernel

On 10/05/2011 09:59 AM, Alexander Stein :
If used with negative polarity the PWM unit cannot be disabled. This would
result in a full contrast screen.
Instead let the PWM unit enabled using 0x0 as compare value which darkens
the display.
In result no power saving is possible if inverted contrast polarity
is used.
Ok, this patch looks correct.
Signed-off-by: Alexander Stein <redacted>
Acked-by: Nicolas Ferre <redacted>

Florian, you can propagate this one upstream.

Thanks you, best regards,
quoted hunk ↗ jump to hunk
---
 drivers/video/atmel_lcdfb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 816d528..2bd75b5 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -96,8 +96,11 @@ static int atmel_bl_update_status(struct backlight_device *bl)
 		brightness = 0;
 
 	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, brightness);
-	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR,
+	if (contrast_ctr & ATMEL_LCDC_POL_POSITIVE)
+		lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR,
 			brightness ? contrast_ctr : 0);
+	else
+		lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr);
 
 	bl->props.fb_blank = bl->props.power = sinfo->bl_power = power;
 

-- 
Nicolas Ferre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help