power: supply: cpcap-battery: Use charger status for battery full detection
authorTony Lindgren <tony@atomide.com>
Sun, 10 Jan 2021 19:53:58 +0000 (21:53 +0200)
committerSebastian Reichel <sre@kernel.org>
Thu, 14 Jan 2021 22:42:42 +0000 (23:42 +0100)
commitbb8b9a985083c69a4118c3d8c7d4c32427529992
treedfbd342d0db6dd82d15be988f9b5c980a7ca9dbd
parent2071236b8519673a276ecbf7f60a6f7da7e5cd8a
power: supply: cpcap-battery: Use charger status for battery full detection

We now get battery full notification from cpcap-charger, so let's use that
for battery full status and charger disconnect.

Note that any current based battery full detection we have tried earlier is
flakey as it won't account for example for CPU load increasing the battery
current. Anyways, if current based battery full detection is also still
needed, we can reconsider adding it in addition to the charger status based
detection.

Cc: Arthur Demchenkov <spinal.by@gmail.com>
Cc: Carl Philipp Klemm <philipp@uvos.xyz>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-battery.c