From 63ebcc1b0c305b88daa63141781b3e7ebb00a5fc Mon Sep 17 00:00:00 2001 From: mahj8 Date: Sat, 29 Jan 2022 16:46:59 +0800 Subject: [PATCH] charging: report power max 30W when usb type is qc3p As "turbopower connected" appears twice, so report power max 30W when usb type is qc3p. Change-Id: Ife81a9763022d74079b091eed0b33c535885e57b Signed-off-by: mahj8 Reviewed-on: https://gerrit.mot.com/2181964 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- .../power/mmi_discrete_charger/mmi_discrete_charger_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/power/mmi_discrete_charger/mmi_discrete_charger_core.c b/drivers/power/mmi_discrete_charger/mmi_discrete_charger_core.c index d7fa08a41fc3..9fbc11c3bf08 100644 --- a/drivers/power/mmi_discrete_charger/mmi_discrete_charger_core.c +++ b/drivers/power/mmi_discrete_charger/mmi_discrete_charger_core.c @@ -2262,9 +2262,10 @@ static int mmi_discrete_get_chg_info(void *data, struct mmi_charger_info *chg_in chip->chg_info.chrg_pmax_mw = chip->constraint.dcp_pmax; else if (usb_type == POWER_SUPPLY_TYPE_USB_HVDCP) chip->chg_info.chrg_pmax_mw = 7500; - else if (usb_type == POWER_SUPPLY_TYPE_USB_HVDCP_3 || - usb_type == POWER_SUPPLY_TYPE_USB_HVDCP_3P5) + else if (usb_type == POWER_SUPPLY_TYPE_USB_HVDCP_3) chip->chg_info.chrg_pmax_mw = chip->constraint.hvdcp_pmax; + else if (usb_type == POWER_SUPPLY_TYPE_USB_HVDCP_3P5) + chip->chg_info.chrg_pmax_mw = 30000; else if (usb_type == POWER_SUPPLY_TYPE_USB_PD) chip->chg_info.chrg_pmax_mw = chip->constraint.pd_pmax; else