power: qpnp-smbcharger-mmi: Also Add AICL Rerun to Dual

Dual Battery slgorithm also needs the same AICL rerun.
Otherwise the ICL can drop and stay too low to recharge.

Change-Id: I97236a1342f24c46d14047dd0c1f6cdacd994ddb
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1366736
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-06-05 14:20:55 -05:00 • committed by Kenneth Kessler
commit d69fdb2a67

View file

@ -1962,6 +1962,7 @@ static int mmi_dual_charge_control(struct smb_mmi_charger *chg,
struct mmi_sm_params *main_p = &chg->sm_param[MAIN_BATT];
struct mmi_sm_params *flip_p = &chg->sm_param[FLIP_BATT];
static int demo_full_soc = 100;
bool is_chg_dis = get_effective_result(chg->chg_dis_votable);
chg_stat_main.charger_present = stat->charger_present;
chg_stat_flip.charger_present = stat->charger_present;
@ -2187,6 +2188,13 @@ vote_now:
vote(chg->fcc_votable, MMI_HB_VOTER,
true, (target_fcc >= 0) ? (target_fcc * 1000) : 0);
/* Rerun AICL to recover USB ICL from recharge */
if (is_chg_dis != get_effective_result(chg->chg_dis_votable)) {
power_supply_set_property(chg->qcom_psy,
POWER_SUPPLY_PROP_RERUN_AICL,
NULL);
}
if (!stat->charger_present &&
(chg_stat_main.batt_mv <= LOW_BATT_MV) &&
(chg_stat_flip.batt_mv <= LOW_BATT_MV)) {