power: supply: cpcap-charger: Allow changing constant charge voltage
authorTony Lindgren <tony@atomide.com>
Wed, 16 Oct 2019 22:41:22 +0000 (15:41 -0700)
committerSebastian Reichel <sre@kernel.org>
Sun, 20 Oct 2019 18:26:23 +0000 (20:26 +0200)
commit5688ea0492337517f9e9e1249e4f5e371726bc21
tree1421c8999c91c8b0b2a2f64ffb4245ee6030c839
parent8b0134cc14b9d4dba4477489c11f7c634c382e3e
power: supply: cpcap-charger: Allow changing constant charge voltage

Let's allow reconfiguring the cpcap-charger max charge voltage and
default to 4.2V that should be safe for the known users.

This allows the users to use 4.35V for the extra capacity if really
needed at a cost of probably shorter battery life. We check the
constant charge voltage limit set by the battery.

Some pieces of the property setting code is based on an earlier patch
from Pavel Machek <pavel@ucw.cz> but limited to configuring the charge
voltage for now.

Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Acked-by: 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-charger.c