Skip to content

Commit

Permalink
power: smb-lib: Force suspend when cable out.
Browse files Browse the repository at this point in the history
Drawing 100mA in Unattached/SNK state is a violation
as well as per the Type-C spec.

Bug: 112876718
Bug: 110701774
Change-Id: I1bc352cd96b4b51c948a0b650a0bd0dda33b3ac2
Signed-off-by: Wasb Liu <[email protected]>
Signed-off-by: Ken Tsou <[email protected]>
Signed-off-by: Rapherion Rollerscaperers <[email protected]>
  • Loading branch information
Wasb Liu authored and PainKiller3 committed Apr 19, 2021
1 parent d1a0a73 commit 321d763
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/power/supply/qcom/smb-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -4852,8 +4852,8 @@ static void smblib_force_legacy_icl(struct smb_charger *chg, int pst)
vote(chg->usb_icl_votable, LEGACY_UNKNOWN_VOTER, true, 3000000);
break;
default:
smblib_err(chg, "Unknown APSD %d; forcing 500mA\n", pst);
vote(chg->usb_icl_votable, LEGACY_UNKNOWN_VOTER, true, 500000);
smblib_err(chg, "Unknown APSD %d; forcing suspend\n", pst);
vote(chg->usb_icl_votable, LEGACY_UNKNOWN_VOTER, true, 0);
break;
}
}
Expand Down Expand Up @@ -5258,7 +5258,7 @@ static void smblib_handle_typec_removal(struct smb_charger *chg)
cancel_delayed_work_sync(&chg->check_vbus_work);

/* reset input current limit voters */
vote(chg->usb_icl_votable, LEGACY_UNKNOWN_VOTER, true, 100000);
vote(chg->usb_icl_votable, LEGACY_UNKNOWN_VOTER, true, 0);
vote(chg->usb_icl_votable, PD_VOTER, false, 0);
vote(chg->usb_icl_votable, USB_PSY_VOTER, false, 0);
vote(chg->usb_icl_votable, DCP_VOTER, false, 0);
Expand Down

0 comments on commit 321d763

Please sign in to comment.