charging: dcp current base on dtsi config in mmi charger

dcp_pmax is config in mmi charger dtsi,
dcp current setting base on dcp_pmax

Change-Id: I7257cb586557bcf24a93ac4f53f5b50339731eb1
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2093336
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-10-19 17:58:39 +08:00 • committed by Haijian Ma
commit 1a0e36fd6b
2 changed files with 2 additions and 3 deletions

View file

@ -520,8 +520,8 @@ static int mmi_get_rp_based_dcp_current(struct mmi_discrete_charger *chg, int ty
/* fall through */
default:
rp_ua = DCP_CURRENT_UA;
if (chg->usb_dcp_curr_max > 0)
rp_ua = chg->usb_dcp_curr_max;
if (chg->constraint.dcp_pmax > 0)
rp_ua = (chg->constraint.dcp_pmax / 5) * 1000;
}
return rp_ua;

View file

@ -97,7 +97,6 @@ struct mmi_discrete_charger {
bool vbus_enabled;
int real_charger_type;
int usb_dcp_curr_max;
int hvdcp2_max_icl_ua;
/* extcon for VBUS / ID notification to USB for type-c only */