Commit Graph

5 Commits

Author SHA1 Message Date
Andreas Kemnade 2f5caa26a0 power: supply: rn5t618: Add voltage_now property
Read voltage_now via IIO and provide the property.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reported-by: kernel test robot <lkp@intel.com> # missing depends on IIO
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-08-13 18:38:17 +02:00
Andreas Kemnade 20a3c8b57b power: supply: rn5t618: Add input current limit
Adds properties for setting the maximum current to USB, ADP and Battery
supplies. USB and ADP limits are reset to OTP values upon replugging.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-06-03 19:31:23 +02:00
Andreas Kemnade 7d76367774 power: supply: rn5t618: Add charger type detection
The RC5T619 can detect SDP, CDP and DCP chargers, so let's add support
for it.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-06-03 19:31:23 +02:00
Colin Ian King 304bff2fb8 power: supply: fix spelling mistake "unprecise" -> "imprecise"
There is a spelling mistake in a dev_info message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-10-03 23:45:02 +02:00
Andreas Kemnade 1426dffad0 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>
2020-08-28 17:34:38 +02:00