power: supply: ab8500: Drop BATCTRL thermal mode
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 29 Jan 2022 00:49:15 +0000 (01:49 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 19:24:53 +0000 (20:24 +0100)
commitd58964be64f3bfc21fe8054dadbf4592cdd4e9c1
tree8126a49ef0268b6c069c4f7c803d4f79b81d4c0a
parent1c97db1747b756611f0d26ea7fb2ed2d93f90fcc
power: supply: ab8500: Drop BATCTRL thermal mode

The BATCTRL mode reads the temperature of the battery by
enabling a certain probing current (7-20 mA) and then measure
the voltage of the NTC mounted inside the battery.

None of the AB8500 product or the reference designs use this
mode. What we use is the so-called BATTEMP mode which enables
an internal 230 kOhm pull-up to 1.8 V to the external NTC on
pin BatTemp (N16) and then measures the voltage over the NTC
using the ADC:

        1.8V (VTVOUT)
         |
        [ ] 230 kOhm
         |
BatTemp  +---------------- ADC
Pin N16  | _
         |/
        [/] NTC
       _/|
         |
        GND

Cut out the BATCTRL code to clear the forest and stop
maintaining code we can never test.

The current inducing method is still used to probe for the
battery type using the internal BTI (battery type indicator)
on the BatCtrl (C3) pin in a separate code path.

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