power: supply: ab8500: Standardize operating temperature
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 20 Nov 2021 15:53:13 +0000 (16:53 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 22 Nov 2021 16:16:25 +0000 (17:16 +0100)
commit6252c706cdb003da0046ced1a088b9f31af1fd9b
tree1c747054bca99530f432f1fa660ec6feb7d94929
parent3aca6ecdab44b30e812001ab4de19b79001a3fbd
power: supply: ab8500: Standardize operating temperature

Instead of storing the temperature limits in our custom
struct struct ab8500_bm_data, make struct power_supply_battery_info
a member of this and store the min and max temperatures inside
that struct as the temp_min/temp_max and
temp_alert_min/temp_alert_max respectively.

The values can be assigned from the device tree, but if
not present will be set to the same defaults as are currently
in the code.

This way we start to move over to using
struct power_supply_battery_info and make it possible to move
the data over to the device tree and we will move piece by
piece toward using the standard info struct.

Temperature hysteresis is currently not supported by the
standard struct but we move the assignment here as well so
that we have all parameterization in one spot.

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/ab8500_charger.c