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>
Mon, 10 Jun 2019 03:24:46 +0000 (11:24 +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 0ac92b275f57836082d7429288bccf562a3a23ee..00e6e5ac65195bb7cf82fdff4ee857f24c57662a 100644 (file)
@@ -3667,7 +3667,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;
@@ -3681,7 +3681,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
@@ -4190,6 +4190,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;