]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: ab8500: Respect charge_restart_voltage_uv
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 15 Apr 2022 20:36:37 +0000 (22:36 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 9 Jun 2022 20:09:58 +0000 (22:09 +0200)
commit986c93e67aa5bdc6c74b3476065b11eeae13f61a
treef2ddd7d5a5d568e625845061496dafeb5baf3e00
parent6c70ba15edd4242d6ce23a1ff99816cb44af4e1e
power: supply: ab8500: Respect charge_restart_voltage_uv

The battery info contains a voltage indicating when the voltage
is so low that it is time to restart the CC/CV charging.
Make the AB8500 respect and prioritize this setting over the
hardcoded 95% threshold.

Break out the check into its own function and add some safeguards
so we do not run into unpredictable side effects.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_chargalg.c