1. 28 Feb, 2022 3 commits
    • 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
    • Linus Walleij's avatar
      power: supply: ab8500: Standardize alert mode charging · 0e8b903b
      Linus Walleij authored
      The AB8500 code is using a special current and voltage setting
      when the battery is in "alert mode", i.e. when it is starting
      to go outside normal operating conditions so it is too
      cold or too hot. This makes sense as a way for the charging
      algorithm to deal with hostile environments.
      
      Add the needed members to the struct power_supply_battery_info,
      and switch the AB8500 charging code over to using this.
      Reviewed-by: default avatarMatti Vaittineen <matti.vaittinen@fi.rohmeurope.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      0e8b903b
    • Linus Walleij's avatar
      power: supply: ab8500: Standardize maintenance charging · d72ce7d3
      Linus Walleij authored
      Maintenance charging is the phase of keeping up the charge
      after the battery has charged fully using CC/CV charging.
      
      This can be done in many successive phases and is usually
      done with a slightly lower constant voltage than CV, and
      a slightly lower allowed current.
      
      Add an array of maintenance charging points each with a
      current, voltage and safety timer, and add helper functions
      to use these. Migrate the AB8500 code over.
      
      This is used in several Samsung products using the AB8500
      and these batteries and their complete parameters will
      be added later as full examples, but the default battery
      in the AB8500 code serves as a reasonable example so far.
      Reviewed-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      d72ce7d3
  2. 25 Feb, 2022 4 commits
  3. 24 Feb, 2022 9 commits
  4. 13 Feb, 2022 7 commits
  5. 11 Feb, 2022 17 commits