diff options
author | Ramakrishna Pallala <ramakrishna.pallala@intel.com> | 2012-05-05 14:34:26 +0530 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-05-05 20:28:11 -0700 |
commit | 9a8422d205ea142a27c2573e5ca3d2cc87d75260 (patch) | |
tree | 0a9d95c9b45028a25c0b0d9b46d28d899253a9e4 /include/linux/power | |
parent | b1f092f6480e0a9d8d5f99d3363e022952d1af83 (diff) |
max17042_battery: Add support for max17047/50 chip
max17047 is improved version of max17042 chip. It has few HW bug
fixes with minor changes in register set.
max17050 is same as max17047 chip except its silicon packging. So from
driver's point of view there is no difference btw max1047 and max1050.
This patch adds the support to dynamically detect the chip type and
adds steps to initialize the max17047 chip.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'include/linux/power')
-rw-r--r-- | include/linux/power/max17042_battery.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h index e01b167e66f0..89dd84f47c6e 100644 --- a/include/linux/power/max17042_battery.h +++ b/include/linux/power/max17042_battery.h @@ -116,6 +116,18 @@ enum max17042_register { MAX17042_VFSOC = 0xFF, }; +/* Registers specific to max17047/50 */ +enum max17047_register { + MAX17047_QRTbl00 = 0x12, + MAX17047_FullSOCThr = 0x13, + MAX17047_QRTbl10 = 0x22, + MAX17047_QRTbl20 = 0x32, + MAX17047_V_empty = 0x3A, + MAX17047_QRTbl30 = 0x42, +}; + +enum max170xx_chip_type {MAX17042, MAX17047}; + /* * used for setting a register to a desired value * addr : address for a register @@ -144,6 +156,7 @@ struct max17042_config_data { u16 shdntimer; /* 0x03F */ /* App data */ + u16 full_soc_thresh; /* 0x13 */ u16 design_cap; /* 0x18 */ u16 ichgt_term; /* 0x1E */ @@ -162,6 +175,10 @@ struct max17042_config_data { u16 lavg_empty; /* 0x36 */ u16 dqacc; /* 0x45 */ u16 dpacc; /* 0x46 */ + u16 qrtbl00; /* 0x12 */ + u16 qrtbl10; /* 0x22 */ + u16 qrtbl20; /* 0x32 */ + u16 qrtbl30; /* 0x42 */ /* Cell technology from power_supply.h */ u16 cell_technology; |