power: qpnp-smbcharger-mmi: Read BMS for Age

The basic state machine for charging incorrectly is reading
the qcom power supply instead of the bms power supply
for the charge full and charge full design.  This was
preventing the age calculation from occuring.

Change-Id: I8185529d9eec016b30bdc4c43a1c63c4cb0a6870
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1317787
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Kenny Kessler 2019-03-06 14:23:08 -06:00 • committed by Kenneth Kessler
commit 2bd42e76db

View file

@ -2472,7 +2472,7 @@ static void mmi_heartbeat_work(struct work_struct *work)
hb_resch_time = mmi_dual_charge_control(chip, &chg_stat);
} else if (!chip->factory_mode) {
cap_err = 0;
rc = power_supply_get_property(chip->qcom_psy,
rc = power_supply_get_property(chip->bms_psy,
POWER_SUPPLY_PROP_CHARGE_FULL,
&pval);
if (rc < 0) {
@ -2481,7 +2481,7 @@ static void mmi_heartbeat_work(struct work_struct *work)
} else
main_cap = pval.intval;
rc = power_supply_get_property(chip->qcom_psy,
rc = power_supply_get_property(chip->bms_psy,
POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
&pval);
if (rc < 0) {