power: supply: ab8500: Standardize alert mode charging
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 25 Feb 2022 23:27:56 +0000 (00:27 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 28 Feb 2022 10:34:31 +0000 (11:34 +0100)
commit0e8b903b522b5a3cb473035cea085d396dd7150a
treeb0227cb217d7ba2c4787386a47cfdd80b1f707f1
parentd72ce7d324786257410bec6b36e3756647dd76fd
power: supply: ab8500: Standardize alert mode charging

The AB8500 code is using a special current and voltage setting
when the battery is in "alert mode", i.e. when it is starting
to go outside normal operating conditions so it is too
cold or too hot. This makes sense as a way for the charging
algorithm to deal with hostile environments.

Add the needed members to the struct power_supply_battery_info,
and switch the AB8500 charging code over to using this.

Reviewed-by: Matti Vaittineen <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