From 6056eaab0561447bc0b110687ecf5d9b09c299f0 Mon Sep 17 00:00:00 2001 From: xuwei9 Date: Wed, 13 Mar 2019 16:10:03 +0800 Subject: [PATCH] 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 --- drivers/power/supply/s2mu00x_battery.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.20.1