diff options
author | Tony Lindgren <tony@atomide.com> | 2017-05-03 20:15:31 -0400 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2017-05-04 11:51:52 -0400 |
commit | 6ffa8ace7092a5414d5d387c54a66118eb90482b (patch) | |
tree | 506f5aef3761c62661bc4084f622e88c33734fe7 | |
parent | 3ae5f06681fc0e9ce6a0ac4f909aa7695e1f3228 (diff) |
power: supply: cpcap-charger: Fix enable for 3.8V charge setting
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>
-rw-r--r-- | drivers/power/supply/cpcap-charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c index 33ca1174070b..378fbdaba85b 100644 --- a/drivers/power/supply/cpcap-charger.c +++ b/drivers/power/supply/cpcap-charger.c | |||
@@ -262,7 +262,7 @@ static int cpcap_charger_set_state(struct cpcap_charger_ddata *ddata, | |||
262 | bool enable; | 262 | bool enable; |
263 | int error; | 263 | int error; |
264 | 264 | ||
265 | enable = max_voltage && (charge_current || trickle_current); | 265 | enable = (charge_current || trickle_current); |
266 | dev_dbg(ddata->dev, "%s enable: %i\n", __func__, enable); | 266 | dev_dbg(ddata->dev, "%s enable: %i\n", __func__, enable); |
267 | 267 | ||
268 | if (!enable) { | 268 | if (!enable) { |