power: supply: cpcap-battery: invalidate config when incompatible measurements are...
authorCarl Philipp Klemm <philipp@uvos.xyz>
Fri, 23 Apr 2021 12:58:31 +0000 (14:58 +0200)
committerSebastian Reichel <sre@kernel.org>
Fri, 4 Jun 2021 12:28:31 +0000 (14:28 +0200)
commitaecd127b45eac8ce0ff667a4a855ff66905fb88c
treebf8fd93efd438a1d06f42c4da2ee8f08384142fc
parent6a0fcc87c9e35191d37a8819fdab9d30e523515b
power: supply: cpcap-battery: invalidate config when incompatible measurements are read

This invalidates empty->counter_uah and charge_full when charge_now
indicates that they are grossly wrong and adds some tolerance to
POWER_SUPPLY_PROP_CHARGE_FULL to allow for inaccuracies in the charge
counter and manufacturing tolerances in the battery.

Signed-off-by: Carl Philipp Klemm <philipp@uvos.xyz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-battery.c