summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-07-17 16:45:14 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-07-17 16:45:14 +0200
commit3a008052e87426fdf3b29752432470a648453d69 (patch)
tree0c0fcd3c7ae3eec717caf3f9ba7452b7f1831a3f /include/linux
parent4f48c4961b86b4df1bcb4b1b535bc1c3d158b5af (diff)
regulator: tps6586x support for tps658623 and tps658643
From a regulator point of view those PMICs differentiate in their SM2 voltage tables. While the older tps658621a and tps658621d as utilised on Harmony resp. Ventana have a range from 3000 to 4550 mV the tps658623 goes from 1700 to 2475 mV and the tps658643 just from 1025 to 1800 mV. Using its VERSIONCRC register the type of PMIC is queried and the right ranges applied.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/tps6586x.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h
index 702cee59cc7b..b5e990e9f6ee 100644
--- a/include/linux/mfd/tps6586x.h
+++ b/include/linux/mfd/tps6586x.h
@@ -56,7 +56,6 @@ enum pwm_pfm_mode {
PWM_ONLY,
AUTO_PWM_PFM,
PWM_DEFAULT_VALUE,
-
};
enum slew_rate_settings {
@@ -71,6 +70,14 @@ enum slew_rate_settings {
SLEW_RATE_DEFAULT_VALUE,
};
+enum tps6586x_type {
+ TPS658621A = 0x15,
+ TPS658621D = 0x2c,
+ TPS658623 = 0x1b,
+ TPS658643 = 0x03,
+ TPS6586X_ANY = -1,
+};
+
struct tps6586x_settings {
/* SM0, SM1 and SM2 have PWM-only and auto PWM/PFM mode */
enum pwm_pfm_mode sm_pwm_mode;
@@ -128,5 +135,6 @@ extern int tps6586x_set_bits(struct device *dev, int reg, uint8_t bit_mask);
extern int tps6586x_clr_bits(struct device *dev, int reg, uint8_t bit_mask);
extern int tps6586x_update(struct device *dev, int reg, uint8_t val,
uint8_t mask);
+extern enum tps6586x_type tps6586x_gettype(struct device *dev);
#endif /*__LINUX_MFD_TPS6586X_H */