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>
Mon, 10 Jun 2019 03:24:47 +0000 (11:24 +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 304767a78cd6fe0d6b361ad4d9a053b499480cd4..fe50723ee1f2756c17d7f8de2e6ebc44fc94537c 100644 (file)
@@ -861,7 +861,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;