Merge commit 'main-jb-2012.08.03-B4' into t114-0806
[linux-2.6.git] / include / linux / mfd / tps80031.h
index 731dd07..974fc0d 100644 (file)
@@ -99,6 +99,15 @@ enum TPS80031_GPIO {
        TPS80031_GPIO_NR,
 };
 
+enum TPS80031_CLOCK32K {
+       TPS80031_CLOCK32K_AO,
+       TPS80031_CLOCK32K_G,
+       TPS80031_CLOCK32K_AUDIO,
+
+       /* Last entry */
+       TPS80031_CLOCK32K_NR,
+};
+
 enum {
        SLAVE_ID0 = 0,
        SLAVE_ID1 = 1,
@@ -113,12 +122,38 @@ enum {
        I2C_ID3_ADDR = 0x4A,
 };
 
-/* External power requests */
+/* External controls requests */
 enum tps80031_ext_control {
        PWR_REQ_INPUT_NONE      = 0x00000000,
        PWR_REQ_INPUT_PREQ1     = 0x00000001,
        PWR_REQ_INPUT_PREQ2     = 0x00000002,
        PWR_REQ_INPUT_PREQ3     = 0x00000004,
+       PWR_OFF_ON_SLEEP        = 0x00000008,
+       PWR_ON_ON_SLEEP         = 0x00000010,
+};
+
+enum tps80031_pupd_pins {
+       TPS80031_PREQ1 = 0,
+       TPS80031_PREQ2A,
+       TPS80031_PREQ2B,
+       TPS80031_PREQ2C,
+       TPS80031_PREQ3,
+       TPS80031_NRES_WARM,
+       TPS80031_PWM_FORCE,
+       TPS80031_CHRG_EXT_CHRG_STATZ,
+       TPS80031_SIM,
+       TPS80031_MMC,
+       TPS80031_GPADC_START,
+       TPS80031_DVSI2C_SCL,
+       TPS80031_DVSI2C_SDA,
+       TPS80031_CTLI2C_SCL,
+       TPS80031_CTLI2C_SDA,
+};
+
+enum tps80031_pupd_settings {
+       TPS80031_PUPD_NORMAL,
+       TPS80031_PUPD_PULLDOWN,
+       TPS80031_PUPD_PULLUP,
 };
 
 struct tps80031_subdev_info {
@@ -130,17 +165,23 @@ struct tps80031_subdev_info {
 struct tps80031_rtc_platform_data {
        int irq;
        struct rtc_time time;
+       int msecure_gpio;
 };
 
-struct tps80031_32kclock_plat_data {
-       unsigned en_clk32kao:1;
-       unsigned en_clk32kg:1;
-       unsigned en_clk32kaudio:1;
+struct tps80031_clk32k_init_data {
+       int clk32k_nr;
+       bool enable;
+       unsigned long ext_ctrl_flag;
 };
 
 struct tps80031_gpio_init_data {
        int gpio_nr;
-       enum tps80031_ext_control ext_control;
+       unsigned long ext_ctrl_flag;
+};
+
+struct tps80031_pupd_init_data {
+       int input_pin;
+       int setting;
 };
 
 struct tps80031_platform_data {
@@ -151,10 +192,18 @@ struct tps80031_platform_data {
        struct tps80031_32kclock_plat_data *clk32k_pdata;
        struct tps80031_gpio_init_data *gpio_init_data;
        int gpio_init_data_size;
+       struct tps80031_clk32k_init_data *clk32k_init_data;
+       int clk32k_init_data_size;
+       bool use_power_off;
+       struct tps80031_pupd_init_data *pupd_init_data;
+       int pupd_init_data_size;
+       struct tps80031_regulator_platform_data **regulator_pdata;
+       int num_regulator_pdata;
 };
 
 struct tps80031_bg_platform_data {
        int irq_base;
+       int battery_present;
 };
 
 /*
@@ -176,13 +225,13 @@ extern int tps80031_update(struct device *dev, int sid, int reg, uint8_t val,
 extern int tps80031_force_update(struct device *dev, int sid, int reg,
                                 uint8_t val, uint8_t mask);
 extern int tps80031_ext_power_req_config(struct device *dev,
-               enum tps80031_ext_control ext_pwr_ctrl, int preq_bit,
+               unsigned long ext_ctrl_flag, int preq_bit,
                int state_reg_add, int trans_reg_add);
 
-extern int tps80031_power_off(void);
-
 extern unsigned long tps80031_get_chip_info(struct device *dev);
 
 extern int tps80031_gpadc_conversion(int channle_no);
 
+extern int tps80031_get_pmu_version(struct device *dev);
+
 #endif /*__LINUX_MFD_TPS80031_H */