mmi_charger:enable adc when charger plugin

SC8541 ADC enable will cost extra current while standby.
Enable sc8541 adc when charger plug in.

Change-Id: I0d8cd2b680534a75e29d80cf955d705204bec02f
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2629340
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Lei Chen 2023-06-01 13:48:27 +08:00 • committed by Lei Chen
commit 4cccb0285a

View file

@ -1130,6 +1130,10 @@ static void psy_changed_work_func(struct work_struct *work)
if (chip->vbus_present)
chip->qc3p_active = mmi_qc3p_power_active(chip);
ret = mmi_charger_write_iio_chan(chip, CP_STATUS1, chip->vbus_present);
if (ret)
mmi_chrg_err(chip, "Unable to enable CP ADC: %d\n", ret);
if (chip->vbus_present
&& chip->pd_pps_support
&& !chip->factory_mode) {