power: supply: sbs-battery: Correct supply status with current draw
authorPaul Kocialkowski <contact@paulk.fr>
Tue, 25 Apr 2017 15:09:05 +0000 (17:09 +0200)
committerSebastian Reichel <sre@kernel.org>
Mon, 1 May 2017 10:45:43 +0000 (12:45 +0200)
commit7f93e1fa032bb5ee19b868b9649bc98c82553003
tree8a341c417abf7b2009a4352c5ac1011e17926fb3
parent4df2cce4722d35eb35bb9371e7c9a600a84558f9
power: supply: sbs-battery: Correct supply status with current draw

The status reported directly by the battery controller is not always
reliable and should be corrected based on the current draw information.

This implements such a correction with a dedicated function, called
where the supply status is retrieved.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/sbs-battery.c