1. 23 Mar, 2021 32 commits
  2. 22 Mar, 2021 5 commits
  3. 21 Mar, 2021 2 commits
    • LI Qingwu's avatar
      power: supply: bq27xxx: Add support for BQ78Z100 · 4eed7f5a
      LI Qingwu authored
      Add support for TI BQ78Z100, I2C interface gas gauge.
      It provides a fully integrated safety protection
      and authentication for 1 to 2-series cell Li-Ion and
      Li-Polymer battery packs.
      
      The patch was tested with BQ78Z100 equipment.
      
      CASE I:  Discharging:
      	POWER_SUPPLY_NAME=bq78z100-0
      	POWER_SUPPLY_STATUS=Discharging
      	POWER_SUPPLY_PRESENT=1
      	POWER_SUPPLY_VOLTAGE_NOW=3386000
      	POWER_SUPPLY_CURRENT_NOW=-5000
      	POWER_SUPPLY_CAPACITY=27
      	POWER_SUPPLY_CAPACITY_LEVEL=Normal
      	POWER_SUPPLY_TEMP=269
      	POWER_SUPPLY_TIME_TO_EMPTY_NOW=1249920
      	POWER_SUPPLY_TECHNOLOGY=Li-ion
      	POWER_SUPPLY_CHARGE_FULL=6494000
      	POWER_SUPPLY_CHARGE_NOW=1736000
      	POWER_SUPPLY_CHARGE_FULL_DESIGN=6000000
      	POWER_SUPPLY_CYCLE_COUNT=1
      	POWER_SUPPLY_POWER_AVG=-20000
      	POWER_SUPPLY_HEALTH=Good
      	POWER_SUPPLY_MANUFACTURER=Texas Instruments
      
      CASE II : No discharging current:
      	POWER_SUPPLY_NAME=bq78z100-0
      	POWER_SUPPLY_STATUS=Not charging
      	POWER_SUPPLY_PRESENT=1
      	POWER_SUPPLY_VOLTAGE_NOW=3386000
      	POWER_SUPPLY_CURRENT_NOW=0
      	POWER_SUPPLY_CAPACITY=27
      	POWER_SUPPLY_CAPACITY_LEVEL=Normal
      	POWER_SUPPLY_TEMP=270
      	POWER_SUPPLY_TECHNOLOGY=Li-ion
      	POWER_SUPPLY_CHARGE_FULL=6494000
      	POWER_SUPPLY_CHARGE_NOW=1734000
      	POWER_SUPPLY_CHARGE_FULL_DESIGN=6000000
      	POWER_SUPPLY_CYCLE_COUNT=1
      	POWER_SUPPLY_POWER_AVG=0
      	POWER_SUPPLY_HEALTH=Good
      	POWER_SUPPLY_MANUFACTURER=Texas Instruments
      Signed-off-by: default avatarLI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
      Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      4eed7f5a
    • LI Qingwu's avatar
      dt-bindings: power: bq27xxx: add bq78z100 · 83ee0681
      LI Qingwu authored
      Add bindings for TI BQ78Z100. An I2C interface gas gauge.
      It provides a fully integrated safety protection
      and authentication for 1 to 2-series cell Li-Ion and
      Li-Polymer battery packs.
      Signed-off-by: default avatarLI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      83ee0681
  4. 15 Mar, 2021 1 commit
    • Matthias Schiffer's avatar
      power: supply: bq27xxx: make status more robust · c3a6d6a1
      Matthias Schiffer authored
      There are multiple issues in bq27xxx_battery_status():
      
      - On BQ28Q610 is was observed that the "full" flag may be set even while
        the battery is charging or discharging. With the current logic to make
        "full" override everything else, it look a very long time (>20min) for
        the status to change from "full" to "discharging" after unplugging the
        supply on a device with low power consumption
      - The POWER_SUPPLY_STATUS_NOT_CHARGING check depends on
        power_supply_am_i_supplied(), which will not work when the supply
        doesn't exist as a separate device known to Linux
      
      We can solve both issues by deriving the status from the current instead
      of the flags field. The flags are now only used to distinguish "full"
      from "not charging", and to determine the sign of the current on
      BQ27XXX_O_ZERO devices.
      Signed-off-by: default avatarMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      c3a6d6a1