mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
smb5-lib: Skip USB ICL vote for high or medium typec
When connect the device to the typec port of a PC with high or medium source advertise, the USB ICL is overridden by USB phy voter with 500mA. But for non-legacy typec, the typec source advertise should be prior to usb bc1.2. So add condition check when set the USB ICL vote from USB driver, if there is high or mid typec source advertise, and just skip the USB driver ICL voter. Change-Id: I519cf1afec40857ca640727fee6cc11f262af492 Signed-off-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/1355853 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1770259
This commit is contained in:
parent
431ef6f563
commit
e31bf366e3
1 changed files with 4 additions and 0 deletions
|
|
@ -4487,6 +4487,10 @@ static int smblib_handle_usb_current(struct smb_charger *chg,
|
|||
if (!rc && !val.intval)
|
||||
return 0;
|
||||
|
||||
typec_mode = smblib_get_prop_typec_mode(chg);
|
||||
if (typec_rp_med_high(chg, typec_mode))
|
||||
return 0;
|
||||
|
||||
/* if flash is active force 500mA */
|
||||
if ((usb_current < SDP_CURRENT_UA) && is_flash_active(chg))
|
||||
usb_current = SDP_CURRENT_UA;
|
||||
|
|
|
|||
Loading…
Reference in a new issue