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: Nicholas Troast <ntroast@codeaurora.org>
This commit is contained in:
Nicholas Troast 2016-10-04 17:07:26 -07:00
parent d4bff725a4
commit f79b613e2d

View file

@ -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) {