kernel: PD charger support
authorxuwei9 <xuwei9@lenovo.com>
Wed, 27 Feb 2019 09:59:45 +0000 (17:59 +0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:30:51 +0000 (17:30 +0800)
PD charger need display
turbo charger

Change-Id: I09b90c6614e3fc1f7634a2edbb18b4e77961111b
Signed-off-by: xuwei9 <xuwei9@mt.com>
Reviewed-on: https://gerrit.mot.com/1314869
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/power/supply/s2mu00x_battery.c

index 8639991f1c0c29eccc37abf7e3da04c03b7324e3..29a87f87d289a7a914df205dcd8d8b91191d52f5 100644 (file)
@@ -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;