mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
power: supply: cpcap-charger: Fix enable for 3.8V charge setting
Zero is a valid register value for for 3.8V charging.
Fixes: 0c9888e3c1
("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>
This commit is contained in:
parent
3ae5f06681
commit
6ffa8ace70
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user