power: supply: ab8500: Standardize maintenance charging
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 25 Feb 2022 23:27:55 +0000 (00:27 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 28 Feb 2022 10:34:31 +0000 (11:34 +0100)
commitd72ce7d324786257410bec6b36e3756647dd76fd
tree4e78091df0147a5be8385d9686d7c5a7c7338bc3
parentd69fc86aca7eda7bd7405c16f35f260c154e14e3
power: supply: ab8500: Standardize maintenance charging

Maintenance charging is the phase of keeping up the charge
after the battery has charged fully using CC/CV charging.

This can be done in many successive phases and is usually
done with a slightly lower constant voltage than CV, and
a slightly lower allowed current.

Add an array of maintenance charging points each with a
current, voltage and safety timer, and add helper functions
to use these. Migrate the AB8500 code over.

This is used in several Samsung products using the AB8500
and these batteries and their complete parameters will
be added later as full examples, but the default battery
in the AB8500 code serves as a reasonable example so far.

Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500-bm.h
drivers/power/supply/ab8500_bmdata.c
drivers/power/supply/ab8500_chargalg.c
drivers/power/supply/power_supply_core.c
include/linux/power_supply.h