From 1baac9bfe0f4bc11b719f222259b8bc0b45edcc8 Mon Sep 17 00:00:00 2001 From: xuwt2 Date: Mon, 25 Nov 2019 11:12:46 +0800 Subject: [PATCH] smb5-lib: Remove Force_5V setting in PD active PD adapter allowance voltage was setted to FORCE_5V, that cause PD can't charge under the vbus up to 9v this issue is introduced by QCom Rebase. use QCOM_BASE to isolate FORCE_5V setting in PD active Change-Id: I73d925b87e657f62516d7d3ee475f4ef0306195d Signed-off-by: xuwt2 Reviewed-on: https://gerrit.mot.com/1460627 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Cesar Augusto Marcelino dos Santos Reviewed-by: Haijian Ma Reviewed-by: Yonghua Yan Reviewed-by: Jianqi Yang Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1770256 Reviewed-by: Huosheng Liao --- drivers/power/supply/qcom/smb5-lib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power/supply/qcom/smb5-lib.c b/drivers/power/supply/qcom/smb5-lib.c index 97cf82a58723..da5c7347dbf5 100644 --- a/drivers/power/supply/qcom/smb5-lib.c +++ b/drivers/power/supply/qcom/smb5-lib.c @@ -4836,8 +4836,10 @@ int smblib_set_prop_pd_active(struct smb_charger *chg, } } +#ifdef QCOM_BASE smblib_usb_pd_adapter_allowance_override(chg, !!chg->pd_active ? FORCE_5V : FORCE_NULL); +#endif smblib_update_usb_type(chg); if (chg->real_charger_type == POWER_SUPPLY_TYPE_USB &&