power: bq27xxx_battery: Fix bq27541 AveragePower register address
authorLiu Xiang <liu.xiang6@zte.com.cn>
Sat, 9 Jan 2016 14:10:39 +0000 (22:10 +0800)
committerSebastian Reichel <sre@kernel.org>
Thu, 14 Jan 2016 00:03:18 +0000 (01:03 +0100)
Currently in bq27541 driver, the average power register address is
incorrectly set to 0x76, which would result in an error:
bq27xxx-battery 2-0055: error reading average power register  10: -11
According to the bq27541 datasheet, fix this problem by setting
the average power register address to 0x24.

Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices")
Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
Acked-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/bq27xxx_battery.c

index 73b647b493ba659622c5c9ad6a6947a65b33017a..6b027a418943a50b56354eb50846700525733ecd 100644 (file)
@@ -199,7 +199,7 @@ static u8 bq27541_regs[] = {
        INVALID_REG_ADDR,       /* AE - NA      */
        0x2c,   /* SOC(RSOC)    */
        0x3c,   /* DCAP         */
-       0x76,   /* AP           */
+       0x24,   /* AP           */
 };
 
 static u8 bq27545_regs[] = {