• Linus Walleij's avatar
    power: supply: ab8500: Standardize BTI resistance · 1f918e0f
    Linus Walleij authored
    The Battery Type Indicator (BTI) resistor is a resistor mounted
    between a special terminal on the battery and ground. By sending
    a fixed current (such as 7mA) through this resistor and measuring
    the voltage over it, the resistance can be determined, and this
    verifies the battery type.
    
    Typical side view of the battery:
    
      o     o     o
     GND   BTI   +3.8V
    
    Typical example of the electrical layout:
    
      +3.8 V   BTI
        |       |
        | +     |
     _______   [ ] 7kOhm
       ___      |
        |       |
        |       |
       GND     GND
    
    By verifying this resistance before attempting to charge the
    battery we add an additional level of security.
    
    In some systems this is used for plug-and-play of batteries with
    different capacity. In other cases, this is merely used to verify
    that the right type of battery is connected, if several batteries
    have the same physical shape and can be plugged into the same
    slot. Sometimes this is just a surplus security mechanism.
    
    Nokia and Samsung among many other vendors are known to use these
    BTI resistors.
    
    Add the BTI properties to struct power_supply_battery_info and
    switch the AB8500 charger code over to using it.
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
    1f918e0f
ab8500_bmdata.c 7.15 KB