]> asedeno.scripts.mit.edu Git - linux.git/commit
power: supply: cpcap-battery: Fix low battery check
authorTony Lindgren <tony@atomide.com>
Sun, 7 Apr 2019 18:12:49 +0000 (11:12 -0700)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 15 Apr 2019 20:51:44 +0000 (22:51 +0200)
commit1a9aadc86ad45f5281ea633c244b6b770dc85b5b
tree8f27bd3fe59b0506d62afc5206e09d268fb046e6
parent6f76aa94e1d2f4e8758f65fd3ea08006303a1582
power: supply: cpcap-battery: Fix low battery check

We need to check current instead of the charge counter to see if
a charger is connected. The charge counter shows the cumulated value
instead of the current charge current and can be negative or positive.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-battery.c