diff options
author | Sivaram Nair <sivaramn@nvidia.com> | 2013-05-22 14:00:34 +0300 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:14:52 -0700 |
commit | 0cb8392c775b57d6f12327f5758f45998879b6fe (patch) | |
tree | 5a3519032ba03114550beec0513dae86e735f0a2 /include/linux/edpdev.h | |
parent | f62be2ee8e52ce4b7c0714145c4d30165d8eabfc (diff) |
EDP: calculating OCV from SOC lut
Not all fuel gauges provide OCV reading. This patch adds a lookup-table
based OCV calculation (choosen only if the board data provides a SOC vs
OCV lut).
Bug 1274401
Change-Id: I423b02a52464546f325a4828057aeb18aa50ae53
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/231561
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'include/linux/edpdev.h')
-rw-r--r-- | include/linux/edpdev.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/edpdev.h b/include/linux/edpdev.h index 1a917cadc826..c93bfa6d2313 100644 --- a/include/linux/edpdev.h +++ b/include/linux/edpdev.h @@ -41,6 +41,18 @@ struct psy_depletion_rbat_lut { unsigned int rbat; }; +/* + * Capacity -> OCV LUT + * Should be descending wrt capacity + * { .capacity = 0, ... } must be the last entry + * @capacity: battery capacity in percents + * @ocv: OCV in uV + */ +struct psy_depletion_ocv_lut { + unsigned int capacity; + unsigned int ocv; +}; + /* Power supply depletion EDP client */ struct psy_depletion_platform_data { char *power_supply; @@ -53,6 +65,7 @@ struct psy_depletion_platform_data { unsigned int ibat_nom; struct psy_depletion_ibat_lut *ibat_lut; struct psy_depletion_rbat_lut *rbat_lut; + struct psy_depletion_ocv_lut *ocv_lut; }; #endif |