From: xuwei9 Date: Wed, 13 Mar 2019 08:10:03 +0000 (+0800) Subject: kernel:battery full to 99 fast X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=526cebafa6c16e68fb41179d07daf0a7a8b96c27;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git kernel:battery full to 99 fast battery full to 99 fast Change-Id: I048846a2769b0af49067a599f556b1b8bcea2a6f Signed-off-by: xuwei9 Reviewed-on: https://gerrit.mot.com/1320018 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- diff --git a/drivers/power/supply/s2mu00x_battery.c b/drivers/power/supply/s2mu00x_battery.c index df5226ca2b9b..aca8ea1ccf73 100644 --- a/drivers/power/supply/s2mu00x_battery.c +++ b/drivers/power/supply/s2mu00x_battery.c @@ -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;