]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: cpcap-battery: Add a battery driver
authorTony Lindgren <tony@atomide.com>
Thu, 1 Jun 2017 00:19:21 +0000 (17:19 -0700)
committerSebastian Reichel <sre@kernel.org>
Thu, 8 Jun 2017 11:05:54 +0000 (13:05 +0200)
commit9c633e5f740a9997764d9ad962354cb10f96fe31
tree261c261be50bcee5d87c0488e76ff803a3ce76ca
parentc9a32b9c70cd119d8031b089407e0f54d83ba37c
power: supply: cpcap-battery: Add a battery driver

On the CPCAP PMIC we can use the ADCs for monitoring the battery,
and there is also a coulomb counter. So let's add basic support for
the battery driver.

I did not add any capacity prediction as that should probably be
done in the user space. Or at least user space should tell the kernel
some battery statistics and then the kernel driver could display the
capacity based on that.

Cc: devicetree@vger.kernel.org
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/Kconfig
drivers/power/supply/Makefile
drivers/power/supply/cpcap-battery.c [new file with mode: 0644]