Title: [9180] branches/2010R1/drivers/video/backlight/adp8870_bl.c: video: backlight: adp8870: Fix ambient light zone overwrite handling
- Revision
- 9180
- Author
- hennerich
- Date
- 2010-09-29 04:46:59 -0400 (Wed, 29 Sep 2010)
Log Message
video: backlight: adp8870: Fix ambient light zone overwrite handling
Get/Set current Ambient Light Zone. Reading returns integer between 1..5
1 = Daylight, 2 = bright, ?\226?\128?\166, 5 = dark). Writing a value between 1..5
forces the Backlight controller to enter the corresponding Ambient Light Zone.
Writing 0 returns to normal operation.
Make sure we subtract 1, the register definition (CFGR:BLV) requires it.
Modified Paths
Diff
Modified: branches/2010R1/drivers/video/backlight/adp8870_bl.c (9179 => 9180)
--- branches/2010R1/drivers/video/backlight/adp8870_bl.c 2010-09-29 08:46:24 UTC (rev 9179)
+++ branches/2010R1/drivers/video/backlight/adp8870_bl.c 2010-09-29 08:46:59 UTC (rev 9180)
@@ -714,7 +714,7 @@
mutex_lock(&data->lock);
adp8870_read(data->client, ADP8870_CFGR, ®_val);
reg_val &= ~(CFGR_BLV_MASK << CFGR_BLV_SHIFT);
- reg_val |= val << CFGR_BLV_SHIFT;
+ reg_val |= (val - 1) << CFGR_BLV_SHIFT;
adp8870_write(data->client, ADP8870_CFGR, reg_val);
mutex_unlock(&data->lock);
}
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits