aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/atmel_lcdfb.c
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@systec-electronic.com>2011-10-05 03:59:58 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-11-11 11:50:55 -0500
commitacfdc2e1bdb4b148e7546fe8948d8f75bd2f9377 (patch)
tree558967596ab0d60d147b8c301b507c0fb4f0279d /drivers/video/atmel_lcdfb.c
parent5d910426a6e80194a50e33351c91abcad266c809 (diff)
atmel_lcdfb: Use proper blanking on negative contrast polarity
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. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r--drivers/video/atmel_lcdfb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 7e66263b18c1..8bfee6aecc8b 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -99,8 +99,11 @@ static int atmel_bl_update_status(struct backlight_device *bl)
99 brightness = 0; 99 brightness = 0;
100 100
101 lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, brightness); 101 lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, brightness);
102 lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 102 if (contrast_ctr & ATMEL_LCDC_POL_POSITIVE)
103 lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR,
103 brightness ? contrast_ctr : 0); 104 brightness ? contrast_ctr : 0);
105 else
106 lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr);
104 107
105 bl->props.fb_blank = bl->props.power = sinfo->bl_power = power; 108 bl->props.fb_blank = bl->props.power = sinfo->bl_power = power;
106 109