mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
power: Rerun AICL if charging disable/enable
It is found that the USB settled ICL drop down when battery charging is disabled for full charge, but the ICL does not adaptively increase for incremental system load or recharge. In that case, it draws current from battery even a charger is attached. In order to recover from that situation, rerun AICL is an effective way to recover the USB ICL. Change-Id: Ic08691817bb51276187db558cdd5addd07fc85f0 Signed-off-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/1364085 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Kenneth Kessler <kennykessler@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
5889409334
commit
9519f45eea
1 changed files with 8 additions and 0 deletions
|
|
@ -2223,6 +2223,7 @@ static void mmi_basic_charge_sm(struct smb_mmi_charger *chip,
|
|||
struct mmi_temp_zone *zone;
|
||||
struct mmi_sm_params *prm = &chip->sm_param[BASE_BATT];
|
||||
bool voltage_full;
|
||||
bool is_chg_dis = get_effective_result(chip->chg_dis_votable);
|
||||
static int demo_full_soc = 100;
|
||||
|
||||
mmi_info(chip, "SMBMMI: batt_mv = %d, batt_ma %d, batt_soc %d,"
|
||||
|
|
@ -2400,6 +2401,13 @@ static void mmi_basic_charge_sm(struct smb_mmi_charger *chip,
|
|||
vote(chip->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(chip->chg_dis_votable)) {
|
||||
power_supply_set_property(chip->qcom_psy,
|
||||
POWER_SUPPLY_PROP_RERUN_AICL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (prm->pres_temp_zone == ZONE_HOT) {
|
||||
prm->batt_health = POWER_SUPPLY_HEALTH_OVERHEAT;
|
||||
} else if (prm->pres_temp_zone == ZONE_COLD) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue