diff options
author | Ikjoon Jang | 2020-08-28 12:36:26 +0800 |
---|---|---|
committer | Sebastian Reichel | 2020-08-28 17:25:54 +0200 |
commit | 395a7251dc2bf5eed2aab6960720a270b364871e (patch) | |
tree | 92a306a255ae4980640723d15691d23c04ec71c3 /drivers/hid/i2c-hid | |
parent | f385e2fcc596f0c4428d3c519e524f3709654f3b (diff) |
power: supply: sbs-battery: don't assume i2c errors as battery disconnect
Current sbs-battery considers all smbus errors as disconnection events
when battery-detect pin isn't supplied, and restored to present state back
when any successful transaction is made.
This can lead to unwanted state changes between present and !present
when there's one i2c error and other following commands were successful.
This patch provides a unified way of checking presence by calling
sbs_get_battery_presence_and_health() when detect pin is not used.
Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/hid/i2c-hid')
0 files changed, 0 insertions, 0 deletions