diff --git a/drivers/power/mmi_parallel_charger_iio/mmi_charger_pump_policy.c b/drivers/power/mmi_parallel_charger_iio/mmi_charger_pump_policy.c index cb20daa15cac..5c76dc8dd18a 100644 --- a/drivers/power/mmi_parallel_charger_iio/mmi_charger_pump_policy.c +++ b/drivers/power/mmi_parallel_charger_iio/mmi_charger_pump_policy.c @@ -675,6 +675,15 @@ void mmi_chrg_sm_work_func(struct work_struct *work) } } + if (batt_soc >= 80) { + //Read the vbat aggin after the soc above 80% + msleep(20); + rc = power_supply_get_property(chrg_list->chrg_dev[CP_MASTER]->chrg_psy, + POWER_SUPPLY_PROP_VOLTAGE_NOW, &prop); + if (!rc) + vbatt_volt = prop.intval*1000; + } + /*Initial setup pps request power by the battery voltage*/ chip->pd_request_volt = (2 * vbatt_volt) % 20000; chip->pd_request_volt = 2 * vbatt_volt - chip->pd_request_volt diff --git a/drivers/power/mmi_parallel_charger_iio/mmi_qc3p_cp_policy.c b/drivers/power/mmi_parallel_charger_iio/mmi_qc3p_cp_policy.c index 1415edf45995..779fd9963d74 100644 --- a/drivers/power/mmi_parallel_charger_iio/mmi_qc3p_cp_policy.c +++ b/drivers/power/mmi_parallel_charger_iio/mmi_qc3p_cp_policy.c @@ -603,6 +603,15 @@ void mmi_qc3p_chrg_sm_work_func(struct work_struct *work) chrg_list->chrg_dev[PMIC_SW]->charger_limited = true; } + if (batt_soc >= 80) { + //Read the vbat aggin after the soc above 80% + msleep(20); + rc = power_supply_get_property(chrg_list->chrg_dev[CP_MASTER]->chrg_psy, + POWER_SUPPLY_PROP_VOLTAGE_NOW, &prop); + if (!rc) + vbatt_volt = prop.intval*1000; + } + /*Initial setup qc3p request power by the battery voltage*/ chip->qc3p_request_volt = (2 * vbatt_volt) % 20000; chip->qc3p_request_volt = 2 * vbatt_volt - chip->qc3p_request_volt