kernel:turbo charger event of type-c
authorxuwei9 <xuwei9@lenovo.com>
Wed, 13 Mar 2019 10:14:06 +0000 (18:14 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:36:59 +0000 (17:36 +0800)
turbo charger type-c
event

Change-Id: I302816f48b55abe87a7fb69a1dfb9041ea9957c9
Signed-off-by: xuwei9 <xuwei9@mt.com>
Reviewed-on: https://gerrit.mot.com/1320067
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 444de6ce797e886b314c2fe6b443a54a3efca26f..bf71b7d13169e0dc9b51311f0b4b393fd197360a 100644 (file)
@@ -871,7 +871,8 @@ static void get_prop_charge_rate(struct s2mu00x_battery_info *battery)
 
        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->cable_type == POWER_SUPPLY_TYPE_PREPARE_TA ||
+               ((battery->rp_attach)&&(battery->rp_input_current == RP_CURRENT3)) )
                battery->charger_rate = POWER_SUPPLY_CHARGE_RATE_TURBO;
        else
                battery->charger_rate = POWER_SUPPLY_CHARGE_RATE_NORMAL;