kernel:Troika do not support turbo charger rate
authorxuwei9 <xuwei9@lenovo.com>
Thu, 25 Apr 2019 07:07:34 +0000 (15:07 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:37:02 +0000 (17:37 +0800)
Troika  do not support
turbo charger rate

Change-Id: I77671320b8b30c36285d7448d0f2bc21539477c0
Signed-off-by: xuwei9 <xuwei9@mt.com>
Reviewed-on: https://gerrit.mot.com/1342646
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 0498a7f4a155589227a35bdff38bdbe4b07d7935..b9f28bf75d90b440ac0c36f8d76b3f7a2493424a 100644 (file)
@@ -869,7 +869,7 @@ static void get_prop_charge_rate(struct s2mu00x_battery_info *battery)
                battery->charger_rate = POWER_SUPPLY_CHARGE_RATE_NONE;
                return;
        }
-
+#if defined(CONFIG_SMALL_CHARGER)
        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 ||
@@ -877,7 +877,9 @@ static void get_prop_charge_rate(struct s2mu00x_battery_info *battery)
                battery->charger_rate = POWER_SUPPLY_CHARGE_RATE_TURBO;
        else
                battery->charger_rate = POWER_SUPPLY_CHARGE_RATE_NORMAL;
-
+#else
+       battery->charger_rate = POWER_SUPPLY_CHARGE_RATE_NORMAL;
+#endif
        if(prev_chg_rate != battery->charger_rate)
                printk(KERN_ERR "%s,charge_rate:%s\n",__func__,charge_rate[battery->charger_rate]);
 }