qcom-charger: smb2: configure stat pin for parallel charging

Currently the PMI stat pin is configured to output IRQ and SW
override status. Parallel charging requires the stat pin for
parallel enable status and under the control of HW, and hence
the change.

CRs-Fixed: 1060633
Change-Id: Ie93f874b90b5aed0a66e97186e4f1d69a1275c8b
Signed-off-by: Harry Yang <harryy@codeaurora.org>
This commit is contained in:
Harry Yang 2016-08-29 11:46:43 -07:00
parent ab26d09879
commit 0f527600ea

View file

@ -840,6 +840,16 @@ static int smb2_init_hw(struct smb2 *chip)
return rc;
}
/* configure PMI stat output to enable and disable parallel charging */
rc = smblib_masked_write(chg, STAT_CFG_REG,
STAT_PARALLEL_CFG_BIT | STAT_SW_OVERRIDE_CFG_BIT,
STAT_PARALLEL_CFG_BIT);
if (rc < 0) {
dev_err(chg->dev,
"Couldn't configure signal for parallel rc=%d\n", rc);
return rc;
}
return rc;
}