]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
power: supply: cpcap-charger: Fix enable for 3.8V charge setting
authorTony Lindgren <tony@atomide.com>
Thu, 4 May 2017 00:15:31 +0000 (17:15 -0700)
committerSebastian Reichel <sre@kernel.org>
Thu, 4 May 2017 15:51:52 +0000 (17:51 +0200)
Zero is a valid register value for for 3.8V charging.

Fixes: 0c9888e3c192 ("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: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/cpcap-charger.c

index 33ca1174070b7558905192bd96192ef79fd9488a..378fbdaba85ba6548ed7b3564347fac6bc514db2 100644 (file)
@@ -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) {