From 26fdb536dc8747a0ec32cf716dab5c3dacbb4ca2 Mon Sep 17 00:00:00 2001 From: xuwei9 Date: Thu, 9 Jul 2020 10:39:50 +0800 Subject: [PATCH] kernel:distinguish type-c and microb cdp input setting Distinguish type-c and micro-b input setting Change-Id: Ibe01d2ea82821fe813389d6d861276f96021f800 Signed-off-by: xuwei9 Reviewed-on: https://gerrit.mot.com/1670666 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Lu Chai Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/power/supply/qcom/smb5-lib.c | 4 ++++ drivers/power/supply/qcom/smb5-lib.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/power/supply/qcom/smb5-lib.c b/drivers/power/supply/qcom/smb5-lib.c index c60a4724a623..1745585f6e51 100644 --- a/drivers/power/supply/qcom/smb5-lib.c +++ b/drivers/power/supply/qcom/smb5-lib.c @@ -10298,6 +10298,8 @@ static void mmi_heartbeat_work(struct work_struct *work) cl_usb = 1000; else if(chip->mmi.support_2a_dcp) cl_usb = 2000; + else if(chip->mmi.support_mb_dcp) + cl_usb = 1800; else cl_usb = 1500; else if (chip->real_charger_type == @@ -11893,6 +11895,8 @@ static int parse_mmi_dt(struct smb_charger *chg) chg->mmi.support_2a_dcp = of_property_read_bool(node, "qcom,support-2a-dcp"); + chg->mmi.support_mb_dcp = of_property_read_bool(node, "qcom,support-microb-dcp"); + return rc; } diff --git a/drivers/power/supply/qcom/smb5-lib.h b/drivers/power/supply/qcom/smb5-lib.h index a09c6dd9be75..67516ec72434 100644 --- a/drivers/power/supply/qcom/smb5-lib.h +++ b/drivers/power/supply/qcom/smb5-lib.h @@ -509,6 +509,7 @@ struct mmi_params { int is_otg_enable; bool force_chg_suspend; bool support_2a_dcp; + bool support_mb_dcp; bool test_mode; int test_mode_soc; int test_mode_temp;