charging: config ICL after BC1.2 done

Third charging ic IINLIM bits will be changed auto
when BC1.2 done. So we need to Ignore the Rp
changes unless BC1.2 done.

Change-Id: Ib04c9702af17c0540ca8014f4ebaeb3dcc084b66
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2138036
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
mahj8 2021-12-08 09:19:46 +08:00 • committed by Haijian Ma
commit c59e7704a2

View file

@ -1869,7 +1869,14 @@ int mmi_discrete_config_typec_mode(struct mmi_discrete_charger *chip, int val)
if (val != chip->typec_mode) {
chip->typec_mode = val;
update_sw_icl_max(chip);
/*
* Third charging ic IINLIM bits will be changed auto
* when BC1.2 done. So we need to Ignore the Rp
* changes unless BC1.2 done.
*/
if (chip->real_charger_type != POWER_SUPPLY_TYPE_UNKNOWN)
update_sw_icl_max(chip);
if (chip->usb_psy)
power_supply_changed(chip->usb_psy);