power: supply: cpcap-battery: Add basic coulomb counter calibrate support
authorTony Lindgren <tony@atomide.com>
Wed, 9 Oct 2019 21:06:21 +0000 (14:06 -0700)
committerSebastian Reichel <sre@kernel.org>
Sun, 20 Oct 2019 18:48:59 +0000 (20:48 +0200)
commit0cb90f071f736b51b36ca0f761cf1152ebe46600
treea62d5fb93a0d2d6f026099c871bdf0e484a86cf8
parentb28ac41950c84d6a9787255a15dcaf2369735464
power: supply: cpcap-battery: Add basic coulomb counter calibrate support

This patch adds support for the coulomb counter calibration on init. We do
this by polling for now, and only add partial calibration done interrupt
support.

Then later on when we know for sure we have the calibration done interrupt
available in the device tree, we can switch to using the calibration done
interrupt.

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