From 818df77ea1d9b835e80675063dc5e8666c6fce7f Mon Sep 17 00:00:00 2001 From: xuwei9 Date: Wed, 27 Feb 2019 17:59:45 +0800 Subject: [PATCH] kernel: PD charger support PD charger need display turbo charger Change-Id: I09b90c6614e3fc1f7634a2edbb18b4e77961111b Signed-off-by: xuwei9 Reviewed-on: https://gerrit.mot.com/1314869 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/power/supply/s2mu00x_battery.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/power/supply/s2mu00x_battery.c b/drivers/power/supply/s2mu00x_battery.c index 8639991f1c0c..29a87f87d289 100644 --- a/drivers/power/supply/s2mu00x_battery.c +++ b/drivers/power/supply/s2mu00x_battery.c @@ -870,7 +870,9 @@ static void get_prop_charge_rate(struct s2mu00x_battery_info *battery) return; } - if(battery->cable_type == POWER_SUPPLY_TYPE_HV_MAINS) + if(battery->cable_type == POWER_SUPPLY_TYPE_HV_MAINS || + battery->cable_type == POWER_SUPPLY_TYPE_USB_PD || + battery->cable_type == POWER_SUPPLY_TYPE_PREPARE_TA ) battery->charger_rate = POWER_SUPPLY_CHARGE_RATE_TURBO; else battery->charger_rate = POWER_SUPPLY_CHARGE_RATE_NORMAL; -- 2.20.1