Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acfdc2e1 authored by Alexander Stein's avatar Alexander Stein Committed by Florian Tobias Schandinat
Browse files

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: default avatarAlexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent 5d910426
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -99,8 +99,11 @@ static int atmel_bl_update_status(struct backlight_device *bl)
		brightness = 0;

	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, brightness);
	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;