aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c/twl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/i2c/twl.h')
-rw-r--r--include/linux/i2c/twl.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 4ebd7c32bc59..314218e79c4a 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -150,7 +150,12 @@
150#define MMC_PU (0x1 << 3) 150#define MMC_PU (0x1 << 3)
151#define MMC_PD (0x1 << 2) 151#define MMC_PD (0x1 << 2)
152 152
153 153#define TWL_SIL_TYPE(rev) ((rev) & 0x00FFFFFF)
154#define TWL_SIL_REV(rev) ((rev) >> 24)
155#define TWL_SIL_5030 0x09002F
156#define TWL5030_REV_1_0 0x00
157#define TWL5030_REV_1_1 0x10
158#define TWL5030_REV_1_2 0x30
154 159
155#define TWL4030_CLASS_ID 0x4030 160#define TWL4030_CLASS_ID 0x4030
156#define TWL6030_CLASS_ID 0x6030 161#define TWL6030_CLASS_ID 0x6030
@@ -180,6 +185,9 @@ int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg);
180int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); 185int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);
181int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); 186int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);
182 187
188int twl_get_type(void);
189int twl_get_version(void);
190
183int twl6030_interrupt_unmask(u8 bit_mask, u8 offset); 191int twl6030_interrupt_unmask(u8 bit_mask, u8 offset);
184int twl6030_interrupt_mask(u8 bit_mask, u8 offset); 192int twl6030_interrupt_mask(u8 bit_mask, u8 offset);
185 193
@@ -279,7 +287,12 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
279 *(Use TWL_4030_MODULE_INTBR) 287 *(Use TWL_4030_MODULE_INTBR)
280 */ 288 */
281 289
290#define REG_IDCODE_7_0 0x00
291#define REG_IDCODE_15_8 0x01
292#define REG_IDCODE_16_23 0x02
293#define REG_IDCODE_31_24 0x03
282#define REG_GPPUPDCTR1 0x0F 294#define REG_GPPUPDCTR1 0x0F
295#define REG_UNLOCK_TEST_REG 0x12
283 296
284/*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */ 297/*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */
285 298
@@ -288,6 +301,8 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
288#define SR_I2C_SCL_CTRL_PU BIT(4) 301#define SR_I2C_SCL_CTRL_PU BIT(4)
289#define SR_I2C_SDA_CTRL_PU BIT(6) 302#define SR_I2C_SDA_CTRL_PU BIT(6)
290 303
304#define TWL_EEPROM_R_UNLOCK 0x49
305
291/*----------------------------------------------------------------------*/ 306/*----------------------------------------------------------------------*/
292 307
293/* 308/*