]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq27xxx: expose battery data when CI=1
authorSicelo A. Mhlongo <absicsz@gmail.com>
Wed, 20 Apr 2022 12:30:59 +0000 (14:30 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 4 May 2022 21:44:03 +0000 (23:44 +0200)
commitc0100d02bd2a076e2609cc13d8a5c2ebec287f69
tree4db91fe334c57cb07280b2abb9d5d5427fa2e4b7
parentdbb008736a8c113ef1e12b4e4b4351fac2a15ede
power: supply: bq27xxx: expose battery data when CI=1

When the Capacity Inaccurate flag is set, the chip still provides data
about the battery, albeit inaccurate. Instead of discarding capacity
values for CI=1, expose the stale data and use the
POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED property to indicate that the
values should be used with care.

Reviewed-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq27xxx_battery.c