aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2013-12-06 07:51:45 -0500
committerLee Jones <lee.jones@linaro.org>2014-01-21 03:28:01 -0500
commite0a3da80c65dc427c30829eb3e361507f843778f (patch)
tree433fe00ea3f9f7f7ad0887ba13067bc92620b052 /include
parentaf66b3c0934e350059646651958306565313e145 (diff)
mfd: tps6586x: Add version detection
Use the VERSIONCRC to determine the exact device version. According to the datasheet this register can be used as device identifier. The identification is needed since some tps6586x regulators use a different voltage table. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Thierry Reding <treding@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/tps6586x.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h
index 87994542573b..cbecec2e353a 100644
--- a/include/linux/mfd/tps6586x.h
+++ b/include/linux/mfd/tps6586x.h
@@ -13,6 +13,12 @@
13#define TPS6586X_SLEW_RATE_SET 0x08 13#define TPS6586X_SLEW_RATE_SET 0x08
14#define TPS6586X_SLEW_RATE_MASK 0x07 14#define TPS6586X_SLEW_RATE_MASK 0x07
15 15
16/* VERSION CRC */
17#define TPS658621A 0x15
18#define TPS658621CD 0x2c
19#define TPS658623 0x1b
20#define TPS658643 0x03
21
16enum { 22enum {
17 TPS6586X_ID_SYS, 23 TPS6586X_ID_SYS,
18 TPS6586X_ID_SM_0, 24 TPS6586X_ID_SM_0,
@@ -97,5 +103,6 @@ extern int tps6586x_clr_bits(struct device *dev, int reg, uint8_t bit_mask);
97extern int tps6586x_update(struct device *dev, int reg, uint8_t val, 103extern int tps6586x_update(struct device *dev, int reg, uint8_t val,
98 uint8_t mask); 104 uint8_t mask);
99extern int tps6586x_irq_get_virq(struct device *dev, int irq); 105extern int tps6586x_irq_get_virq(struct device *dev, int irq);
106extern int tps6586x_get_version(struct device *dev);
100 107
101#endif /*__LINUX_MFD_TPS6586X_H */ 108#endif /*__LINUX_MFD_TPS6586X_H */