diff options
author | Venkat Reddy Talla <vreddytalla@nvidia.com> | 2014-01-29 17:10:55 +0530 |
---|---|---|
committer | Laxman Dewangan <ldewangan@nvidia.com> | 2014-02-06 04:54:18 -0800 |
commit | f874edba21299ed089b4c1347e2062102c9b93bd (patch) | |
tree | 288fa4f1751723b9e7f564a222e9e710c0d704cf /include/linux/max17048_battery.h | |
parent | e0de82428b04c28628b4cc183ac9974457c7ce40 (diff) |
power: max17048: report scaled SoC by manipulating kernel threshold
Make kernel threshold SoC as 0% and scale the SoC read from device
as:
Read from device: 0 to threshold -> report 0%
Read from device: threshold+1 to 100% -> report as 1 to 100%.
Change-Id: I08db7ebc08f3f9bb7e69d7397ce5b5d7a98f516a
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/361480
(cherry picked from commit 826bbd7843f06a960f8f7832fd29f6357164646d)
Reviewed-on: http://git-master/r/364229
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'include/linux/max17048_battery.h')
-rw-r--r-- | include/linux/max17048_battery.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/max17048_battery.h b/include/linux/max17048_battery.h index bfbacc1cd8ab..1dfed8005cda 100644 --- a/include/linux/max17048_battery.h +++ b/include/linux/max17048_battery.h @@ -33,6 +33,7 @@ struct max17048_battery_model { struct max17048_platform_data { struct max17048_battery_model *model_data; const char *tz_name; + int threshold_soc; }; #ifdef CONFIG_BATTERY_MAX17048 extern void max17048_battery_status(int status); |