PD: config pd active is inactive status after cable plug out

Config pd active is inactive status while cable plug out happen.
then after cable plug in could first run mmi_pd30_start() then
run mmi_set_pd30_cap(). otherwise perhaps only run mmi_set_pd30_cap()
and pps will fail so charge adapter only out 5v/3A mode.

Change-Id: I6d3a186f4b7d47d62d2a3d34ca808a8a88936db0
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2134594
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
chailu1 2021-12-03 17:19:52 +08:00 • committed by Lu Chai
commit 1420b9f83b

View file

@ -1907,6 +1907,7 @@ static int mmi_discrete_usb_plugout(struct mmi_discrete_charger * chip)
{
chip->real_charger_type = POWER_SUPPLY_TYPE_UNKNOWN;
chip->typec_mode = MMI_POWER_SUPPLY_TYPEC_NONE;
chip->pd_active = MMI_POWER_SUPPLY_PD_INACTIVE;
if (chip->use_extcon)
mmi_notify_device_mode(chip, false);
vote(chip->usb_icl_votable, SW_ICL_MAX_VOTER, true, SDP_100_MA);