kernel:battery full to 99 fast
authorxuwei9 <xuwei9@lenovo.com>
Wed, 13 Mar 2019 08:10:03 +0000 (16:10 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:36:59 +0000 (17:36 +0800)
battery full to 99
fast

Change-Id: I048846a2769b0af49067a599f556b1b8bcea2a6f
Signed-off-by: xuwei9 <xuwei9@mt.com>
Reviewed-on: https://gerrit.mot.com/1320018
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 df5226ca2b9b44b6863ea7bfa6bffb7338eebc4c..aca8ea1ccf7374924d0b30111a9c447a006df40e 100644 (file)
@@ -3780,7 +3780,7 @@ static int get_property_from_fg(struct s2mu00x_battery_info *chip,
        return rc;
 }
 
-#define DEFAULT_BATT_CAPACITY  50
+#define DEFAULT_BATT_CAPACITY  500
 static int get_prop_batt_capacity(struct s2mu00x_battery_info *chip)
 {
        int capacity, rc;
@@ -3794,7 +3794,7 @@ static int get_prop_batt_capacity(struct s2mu00x_battery_info *chip)
                pr_smb(PR_STATUS, "Couldn't get capacity rc = %d\n", rc);
                capacity = DEFAULT_BATT_CAPACITY;
        }
-       return capacity;
+       return capacity / 10;
 }
 
 #define DEFAULT_BATT_TEMP              200
@@ -4303,6 +4303,7 @@ static int s2mu00x_battery_probe(struct platform_device *pdev)
        battery->temp_low_recovery = battery->pdata->temp_low_recovery;
 
        battery->max_rawsoc = battery->pdata->max_rawsoc;
+       battery->max_rawsoc_offset = battery->pdata->max_rawsoc_offset;
 
        battery->charging_disabled = false;
        battery->is_recharging = false;