summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-06-03 14:44:18 +0530
committerNiket Sirsi <nsirsi@nvidia.com>2011-06-06 13:00:57 -0700
commit2386c5ef045adc018865ac1d0fbebc8bced1556c (patch)
tree1f258b51231c5c7c08da579784edb24d6aafb568 /include
parent502c2becc54b49d26371f9b167f0c6f82a1bc37f (diff)
arm: mfd/regulator: tps80031: Fix I2C addressing
This change adds the possibility of addressing all addresses on the tps80031 I2C Bus. The interrupt registers and SMPS1/2 and VIO require using different I2C addresses to be reached correctly. bug 830904 Change-Id: I1b5b0d03e531c3c8a0551e5049055930e742e10f Reviewed-on: http://git-master/r/34866 Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Matt Wagner <mwagner@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/tps80031.h32
1 files changed, 25 insertions, 7 deletions
diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h
index 2f1a7baf44f5..9438b4602acb 100644
--- a/include/linux/mfd/tps80031.h
+++ b/include/linux/mfd/tps80031.h
@@ -71,6 +71,20 @@ enum {
TPS80031_INT_RES2,
};
+enum {
+ SLAVE_ID0 = 0,
+ SLAVE_ID1 = 1,
+ SLAVE_ID2 = 2,
+ SLAVE_ID3 = 3,
+};
+
+enum {
+ I2C_ID0_ADDR = 0x12,
+ I2C_ID1_ADDR = 0x48,
+ I2C_ID2_ADDR = 0x49,
+ I2C_ID3_ADDR = 0x4A,
+};
+
struct tps80031_subdev_info {
int id;
const char *name;
@@ -95,13 +109,17 @@ struct tps80031_platform_data {
* NOTE: the functions below are not intended for use outside
* of the TPS80031 sub-device drivers
*/
-extern int tps80031_write(struct device *dev, int reg, uint8_t val);
-extern int tps80031_writes(struct device *dev, int reg, int len, uint8_t *val);
-extern int tps80031_read(struct device *dev, int reg, uint8_t *val);
-extern int tps80031_reads(struct device *dev, int reg, int len, uint8_t *val);
-extern int tps80031_set_bits(struct device *dev, int reg, uint8_t bit_mask);
-extern int tps80031_clr_bits(struct device *dev, int reg, uint8_t bit_mask);
-extern int tps80031_update(struct device *dev, int reg, uint8_t val,
+extern int tps80031_write(struct device *dev, int sid, int reg, uint8_t val);
+extern int tps80031_writes(struct device *dev, int sid, int reg, int len,
+ uint8_t *val);
+extern int tps80031_read(struct device *dev, int sid, int reg, uint8_t *val);
+extern int tps80031_reads(struct device *dev, int sid, int reg, int len,
+ uint8_t *val);
+extern int tps80031_set_bits(struct device *dev, int sid, int reg,
+ uint8_t bit_mask);
+extern int tps80031_clr_bits(struct device *dev, int sid, int reg,
+ uint8_t bit_mask);
+extern int tps80031_update(struct device *dev, int sid, int reg, uint8_t val,
uint8_t mask);
extern int tps80031_power_off(void);