Skip to content

Commit

Permalink
atmel_lcdfb: Use proper blanking on negative contrast polarity
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Stein authored and Florian Tobias Schandinat committed Nov 11, 2011
1 parent 5d91042 commit acfdc2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/video/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,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;

Expand Down

0 comments on commit acfdc2e

Please sign in to comment.