]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: ab8500: Use only one battery type
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 20 Nov 2021 15:53:15 +0000 (16:53 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 22 Nov 2021 16:16:25 +0000 (17:16 +0100)
commit1201c70db845bfe285c62b7ef4570fc39e71bd43
treeb2d11da4a72355054eeba88380fbf72343d1b6fc
parent879a011baf89dce392b60a76ec88532485808cc0
power: supply: ab8500: Use only one battery type

The code was going through hoops and loops to detect what
battery is connected and check the resistance for this battery
etc.

Skip this trouble: we will support one battery (currently
"unknown") then we will find the connected battery in the
device tree using a compatible string. The battery resistance
may be used to double-check that the right battery is
connected.

Convert the array of battery types into one battery type so
we can next move over the properties of this one type into
the standard struct power_supply_battery_info.

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_btemp.c
drivers/power/supply/ab8500_chargalg.c
drivers/power/supply/ab8500_fg.c