Commit 6ffa8ace authored by Tony Lindgren's avatar Tony Lindgren Committed by Sebastian Reichel

power: supply: cpcap-charger: Fix enable for 3.8V charge setting

Zero is a valid register value for for 3.8V charging.

Fixes: 0c9888e3 ("power: supply: cpcap-charger: Add minimal
CPCAP PMIC battery charger")
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parent 3ae5f066
......@@ -262,7 +262,7 @@ static int cpcap_charger_set_state(struct cpcap_charger_ddata *ddata,
bool enable;
int error;
enable = max_voltage && (charge_current || trickle_current);
enable = (charge_current || trickle_current);
dev_dbg(ddata->dev, "%s enable: %i\n", __func__, enable);
if (!enable) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment