Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f79b613e authored by Nicholas Troast's avatar Nicholas Troast
Browse files

smb138x-charger: enable parallel current sensing



When parallel charging is enabled the charge current read by the fuel
gauage will not include the parallel charging current. Enable VCHG to
report the parallel charge current.

Change-Id: I6090d4163e760dc02a7dce45f1246bb59b2e195b
Signed-off-by: default avatarNicholas Troast <ntroast@codeaurora.org>
parent d4bff725
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1125,6 +1125,15 @@ static int smb138x_slave_probe(struct smb138x *chip)
		return rc;
	}

	/* enable parallel current sensing */
	rc = smblib_masked_write(chg, CFG_REG,
				 VCHG_EN_CFG_BIT, VCHG_EN_CFG_BIT);
	if (rc < 0) {
		dev_err(chg->dev, "Couldn't enable parallel current sensing rc=%d\n",
			rc);
		return rc;
	}

	/* keep at the end of probe, ready to serve before notifying others */
	rc = smb138x_init_parallel_psy(chip);
	if (rc < 0) {