mbox series

[v3,0/2] power: supply: sbs-battery: fix presence check

Message ID 20200813051008.3461515-1-ikjn@chromium.org
Headers show
Series power: supply: sbs-battery: fix presence check | expand

Message

Ikjoon Jang Aug. 13, 2020, 5:10 a.m. UTC
When gpio detection is not supplied, presence state transitions depend
on every smbus transfer result from get_property(). This patch tries to
check battery presence again with well supported command before
state transition.

Changes:
v3: check return value of get_presence_and_health()
v2: combine get_presence_and_health functions to reuse

Ikjoon Jang (2):
  power: supply: sbs-battery: combine get_presence_and_health
  power: supply: sbs-battery: don't assume i2c errors as battery
    disconnect

 drivers/power/supply/sbs-battery.c | 98 ++++++++++++++++--------------
 1 file changed, 53 insertions(+), 45 deletions(-)