diff options
author | H. Nikolaus Schaller <hns@goldelico.com> | 2015-12-17 11:12:53 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2016-01-07 16:38:24 +0100 |
commit | 549d7b317c761dbf4ed0c2945aec3acc9ca7ae14 (patch) | |
tree | 08797c153ee4df1e52665349b2e02e78718e9178 /kernel/extable.c | |
parent | power: Fix unmet dependency on POWER_SUPPLY by POWER_RESET by uncoupling them (diff) | |
download | linux-549d7b317c761dbf4ed0c2945aec3acc9ca7ae14.tar.xz linux-549d7b317c761dbf4ed0c2945aec3acc9ca7ae14.zip |
power: bq27xxx: fix reading for bq27000 and bq27010
bug: the driver reports funny capacity values:
root@letux:/sys/class/power_supply/bq27000-battery# cat uevent
POWER_SUPPLY_NAME=bq27000-battery
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=3702000
POWER_SUPPLY_CURRENT_NOW=-464635
POWER_SUPPLY_CAPACITY=1536 <- over 100% is magic
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=311
POWER_SUPPLY_TIME_TO_FULL_NOW=10440
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL=805450
POWER_SUPPLY_CHARGE_NOW=1068
POWER_SUPPLY_CHARGE_FULL_DESIGN=8844998 <- battery has just 1200 mAh
POWER_SUPPLY_CYCLE_COUNT=21
POWER_SUPPLY_ENERGY_NOW=0
POWER_SUPPLY_POWER_AVG=0
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_MANUFACTURER=Texas Instruments
reason: the state of charge and the design capacity register are single
byte only. The design capacity returns the higer order byte.
tested: GTA04 with Openmoko/FIC HF08x battery (using hdq)
Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices")
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Acked-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'kernel/extable.c')
0 files changed, 0 insertions, 0 deletions