• Linus Walleij's avatar
    power: supply: ab8500: Drop BATCTRL thermal mode · d58964be
    Linus Walleij authored
    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: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
    d58964be
ab8500_bmdata.c 6.96 KB