linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* spitz backlight: fix brightness limiting
@ 2009-10-19 21:37 Pavel Machek
  2009-10-21 20:20 ` Eric Miao
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Machek @ 2009-10-19 21:37 UTC (permalink / raw)
  To: linux-arm-kernel


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@ucw.cz>

--- 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-10-23  7:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-19 21:37 spitz backlight: fix brightness limiting Pavel Machek
2009-10-21 20:20 ` Eric Miao
2009-10-22  7:05   ` Pavel Machek
2009-10-22 13:58     ` Eric Miao
2009-10-22 22:43   ` Richard Purdie
2009-10-23  5:20     ` Pavel Machek
2009-10-23  7:56       ` Eric Miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).