mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
smb5-lib: fixed BC1.2 current override type-c current
ICL is set to 1000ma when BC1.2 result is OCP charger with med or high type-c rp current. (think plus usb-c book charger pack) So don't override USB icl when type-c rp current is med or high. Change-Id: Id3f9daedfbcf905b99612ba1977b2c710a764cba Signed-off-by: Haijian Ma <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/1465715 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key Reviewed-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/1503915 Reviewed-on: https://gerrit.mot.com/1770998
This commit is contained in:
parent
aa30dcf596
commit
e9fc550caf
1 changed files with 6 additions and 2 deletions
|
|
@ -5973,6 +5973,7 @@ static void update_sw_icl_max(struct smb_charger *chg, int val)
|
|||
static void smblib_handle_apsd_done(struct smb_charger *chg, bool rising)
|
||||
{
|
||||
const struct apsd_result *apsd_result;
|
||||
int typec_mode;
|
||||
|
||||
if (!rising)
|
||||
return;
|
||||
|
|
@ -5989,8 +5990,11 @@ static void smblib_handle_apsd_done(struct smb_charger *chg, bool rising)
|
|||
smblib_notify_device_mode(chg, true);
|
||||
break;
|
||||
case OCP_CHARGER_BIT:
|
||||
vote(chg->usb_icl_votable, SW_ICL_MAX_VOTER, true,
|
||||
OCP_CURRENT_UA);
|
||||
typec_mode = smblib_get_prop_typec_mode(chg);
|
||||
if (!typec_rp_med_high(chg, typec_mode)) {
|
||||
vote(chg->usb_icl_votable, SW_ICL_MAX_VOTER, true,
|
||||
OCP_CURRENT_UA);
|
||||
}
|
||||
break;
|
||||
case DCP_CHARGER_BIT:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue