diff options
author | Kishore Kadiyala <kishore.kadiyala@ti.com> | 2010-07-09 20:19:05 +0530 |
---|---|---|
committer | Sebastien Jan <s-jan@ti.com> | 2010-07-20 10:47:31 +0200 |
commit | 39f27aef35d07a47621333910646747c2ecbc53e (patch) | |
tree | 8466c7beb8eceb9ed1f5ec8ad9a61712a702c860 /include | |
parent | a837f0c5689db931193046635324172eee1fd8f7 (diff) |
Adding card detect callback function and card detect configuration function for MMC1 Controller.
Card detect configuration function does initial configuration of the
MMC Control & PullUp-PullDown registers of Phoenix.
For MMC1 Controller, Card detect interrupt source is
twl6030 and the card detect call back function provides card present/absent
status by reading MMC Control register.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/twl.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 0754e1e91c05..b93f38e8a0dc 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h @@ -158,6 +158,16 @@ #define TWL6030_TOGGLE2 0x91 #define TWL6030_TOGGLE3 0x92 +/*TWL6030 MMC registers */ +#define TWL6030_MMCCTRL 0xEE +#define VMMC_AUTO_OFF (0x1 << 3) +#define SW_FC (0x1 << 2) +#define STS_MMC 0x1 + +#define TWL6030_CFG_INPUT_PUPD3 0xF2 +#define MMC_PU (0x1 << 3) +#define MMC_PD (0x1 << 2) + #define TWL4030_CLASS_ID 0x4030 #define TWL6030_CLASS_ID 0x6030 unsigned int twl_rev(void); @@ -189,6 +199,12 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); int twl6030_interrupt_unmask(u8 bit_mask, u8 offset); int twl6030_interrupt_mask(u8 bit_mask, u8 offset); +/* Card detect Configuration for MMC1 Controller on OMAP4 */ +int twl6030_mmc_card_detect_config(void); + +/* MMC1 Controller on OMAP4 uses Phoenix irq for Card detect */ +int twl6030_mmc_card_detect(struct device *dev, int slot); + int twl6030_register_notifier(struct notifier_block *nb, unsigned int events); int twl6030_unregister_notifier(struct notifier_block *nb, |