OSDN Git Service

power: supply: bq27xxx: support missing supplier device
authorSebastian Reichel <sebastian.reichel@collabora.co.uk>
Thu, 15 Feb 2018 20:28:40 +0000 (21:28 +0100)
committerSebastian Reichel <sre@kernel.org>
Mon, 12 Mar 2018 13:30:09 +0000 (14:30 +0100)
commitf72c14ad8c6631a0a42115e74164f9b5faf4c724
treeb1c0edaaefeafa84cee647a9e34186ce692776a7
parent66ec32fc7cd116dab5c02603ea8ec28ff92da3b5
power: supply: bq27xxx: support missing supplier device

power_supply_am_i_supplied() can return negative error
codes. In this case we should assume, that no charger
is connected and the battery should be marked as
DISCHARGING instead of NOT_CHARGING.

Reported-by: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/bq27xxx_battery.c