power: supply: Add support for RN5T618/RC5T619 charger and fuel gauge
authorAndreas Kemnade <andreas@kemnade.info>
Fri, 28 Aug 2020 11:49:06 +0000 (13:49 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 28 Aug 2020 15:34:38 +0000 (17:34 +0200)
commit1426dffad0dd64af9b1fee810171feb485f9c2b2
treeeb7f417c6b98ba80e81056fbecd0204024628e2f
parent395a7251dc2bf5eed2aab6960720a270b364871e
power: supply: Add support for RN5T618/RC5T619 charger and fuel gauge

Both chips have charger and a fuel gauge.

This adds basic support for displaying the state of the battery and the
input power, settings are not modified. There are some defaults set via
OTP.

Charging also starts after plugging USB.

Known issues of the fuel gauge: There are drivers in the wild which disable
the fuel gauge at shutdown. If a kernel is booted without fuel gauge
support, after such a driver has been used, the fuel gauge will stay off
and decalibrate.
If this driver is used after that, it might display wrong values for charge
level.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/Kconfig
drivers/power/supply/Makefile
drivers/power/supply/rn5t618_power.c [new file with mode: 0644]