Re: spitz backlight: fix brightness limiting
From: Eric Miao
Date: Wed Oct 21 2009 - 16:20:59 EST
It's a little bit weird it's called 'limit_mask' when I first converted it
to a spi driver. There must be some reasons, Richard, you've got
any ideas?
On Tue, Oct 20, 2009 at 5:37 AM, Pavel Machek <pavel@xxxxxx> wrote:
>
> On spitz (& similar) machines, if battery is running low, backlight
> needs to be limited to lower step. Unfortunately, current code uses &=
> for limiting, turning backlight off completely for some backlight
> settings. Fix that.
>
> Signed-off-by: Pavel Machek <pavel@xxxxxx>
>
> --- linux-rc/drivers/video/backlight/corgi_lcd.c    Â2009-10-18 18:11:36.000000000 +0200
> +++ linux-rc/drivers/video/backlight/corgi_lcd.c    Â2009-10-16 02:10:13.000000000 +0200
> @@ -433,8 +434,9 @@
>
> Â Â Â Âif (corgibl_flags & CORGIBL_SUSPENDED)
> Â Â Â Â Â Â Â Âintensity = 0;
> - Â Â Â if (corgibl_flags & CORGIBL_BATTLOW)
> - Â Â Â Â Â Â Â intensity &= lcd->limit_mask;
> +
> + Â Â Â if ((corgibl_flags & CORGIBL_BATTLOW) && intensity > lcd->limit_mask)
> + Â Â Â Â Â Â Â intensity = lcd->limit_mask;
>
> Â Â Â Âreturn corgi_bl_set_intensity(lcd, intensity);
> Â}
>
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/