Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / include / linux / i2c / twl.h
index 7897f30..6de90bf 100644 (file)
 #define TWL_MODULE_PM_MASTER   TWL4030_MODULE_PM_MASTER
 #define TWL_MODULE_PM_RECEIVER TWL4030_MODULE_PM_RECEIVER
 #define TWL_MODULE_RTC         TWL4030_MODULE_RTC
+#define TWL_MODULE_PWM         TWL4030_MODULE_PWM0
+
+#define TWL6030_MODULE_ID0     0x0D
+#define TWL6030_MODULE_ID1     0x0E
+#define TWL6030_MODULE_ID2     0x0F
 
 #define GPIO_INTR_OFFSET       0
 #define KEYPAD_INTR_OFFSET     1
@@ -239,6 +244,21 @@ int twl6030_interrupt_mask(u8 bit_mask, u8 offset);
 
 /*----------------------------------------------------------------------*/
 
+/*Interface Bit Register (INTBR) offsets
+ *(Use TWL_4030_MODULE_INTBR)
+ */
+
+#define REG_GPPUPDCTR1                 0x0F
+
+/*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */
+
+#define I2C_SCL_CTRL_PU                        BIT(0)
+#define I2C_SDA_CTRL_PU                        BIT(2)
+#define SR_I2C_SCL_CTRL_PU             BIT(4)
+#define SR_I2C_SDA_CTRL_PU             BIT(6)
+
+/*----------------------------------------------------------------------*/
+
 /*
  * Keypad register offsets (use TWL4030_MODULE_KEYPAD)
  * ... SIH/interrupt only
@@ -476,7 +496,7 @@ struct twl4030_madc_platform_data {
        int             irq_line;
 };
 
-/* Boards have uniqe mappings of {row, col} --> keycode.
+/* Boards have unique mappings of {row, col} --> keycode.
  * Column and row are 8 bits each, but range only from 0..7.
  * a PERSISTENT_KEY is "always on" and never reported.
  */
@@ -530,6 +550,7 @@ struct twl4030_power_data {
 };
 
 extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts);
+extern int twl4030_remove_script(u8 flags);
 
 struct twl4030_codec_audio_data {
        unsigned int    audio_mclk;
@@ -548,9 +569,9 @@ struct twl4030_codec_data {
        struct twl4030_codec_audio_data         *audio;
        struct twl4030_codec_vibra_data         *vibra;
 
-       /* twl6030 */
-       int audpwron_gpio;      /* audio power-on gpio */
-       int naudint_irq;        /* audio interrupt */
+       /* twl6040 */
+       int audpwron_gpio;      /* audio power-on gpio */
+       int naudint_irq;        /* audio interrupt */
 };
 
 struct twl4030_platform_data {
@@ -605,12 +626,7 @@ int twl4030_sih_setup(int module);
 #define TWL4030_VAUX3_DEV_GRP          0x1F
 #define TWL4030_VAUX3_DEDICATED                0x22
 
-#if defined(CONFIG_TWL4030_BCI_BATTERY) || \
-       defined(CONFIG_TWL4030_BCI_BATTERY_MODULE)
-       extern int twl4030charger_usb_en(int enable);
-#else
-       static inline int twl4030charger_usb_en(int enable) { return 0; }
-#endif
+static inline int twl4030charger_usb_en(int enable) { return 0; }
 
 /*----------------------------------------------------------------------*/
 
@@ -648,15 +664,15 @@ int twl4030_sih_setup(int module);
 #define TWL4030_REG_VUSB3V1    19
 
 /* TWL6030 SMPS/LDO's */
-/* EXTERNAL dc-to-dc buck convertor contollable via SR */
+/* EXTERNAL dc-to-dc buck convertor controllable via SR */
 #define TWL6030_REG_VDD1       30
 #define TWL6030_REG_VDD2       31
 #define TWL6030_REG_VDD3       32
 
 /* Non SR compliant dc-to-dc buck convertors */
-#define        TWL6030_REG_VMEM        33
+#define TWL6030_REG_VMEM       33
 #define TWL6030_REG_V2V1       34
-#define        TWL6030_REG_V1V29       35
+#define TWL6030_REG_V1V29      35
 #define TWL6030_REG_V1V8       36
 
 /* EXTERNAL LDOs */