power: ltc2941-battery-gauge: Disable continuous monitoring on shutdown
authorMike Looijmans <mike.looijmans@topic.nl>
Thu, 23 Nov 2017 14:41:05 +0000 (15:41 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Fri, 1 Dec 2017 15:41:05 +0000 (16:41 +0100)
commit5f2f0d610578d380123d5c5906bbfa1ec5542b1a
tree0a0c6c1078121e333118971581ad718475093954
parent68204f2fbae26dd3ca2b4c7f52ce9d006e8dc08f
power: ltc2941-battery-gauge: Disable continuous monitoring on shutdown

The driver sets the fuel gauge to continuous monitoring on startup, for
the models that support this. When the board shuts down, the chip remains
in that mode, causing a few mA drain on the battery every 2 or 10 seconds.

This patch registers a shutdown handler that turns off the monitoring to
prevent this battery drain.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/ltc2941-battery-gauge.c