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:
parent
d4bff725a4
commit
f79b613e2d
1 changed files with 9 additions and 0 deletions
|
@ -1125,6 +1125,15 @@ static int smb138x_slave_probe(struct smb138x *chip)
|
||||||
return rc;
|
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 */
|
/* keep at the end of probe, ready to serve before notifying others */
|
||||||
rc = smb138x_init_parallel_psy(chip);
|
rc = smb138x_init_parallel_psy(chip);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue