summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-11-24 19:23:46 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-08 16:53:33 +0530
commitd454cee86edac49aca7bdc1d2357e69adfe829ee (patch)
tree7cba30a2f92311f487a89ca8469d9c71f16207ac /include
parentc0d0a8a770697079991a6338af01f86360c839f2 (diff)
mfd: tps80031: Support sleep configuration through platform data
Supporting the sleep configuration through platform data. Rearranging clock initialization to take external power control. Reviewed-on: http://git-master/r/67076 (cherry picked from commit 9da9d369bdbe988b98eec9b63085dfdb26de8237) Change-Id: I40c5a8608522dbc322e148b5d569e8f5a00faa21 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/67331
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/tps80031.h27
-rw-r--r--include/linux/regulator/tps80031-regulator.h4
2 files changed, 22 insertions, 9 deletions
diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h
index ef5502c5c767..c6aa7eadbedd 100644
--- a/include/linux/mfd/tps80031.h
+++ b/include/linux/mfd/tps80031.h
@@ -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,14 @@ 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,
};
struct tps80031_subdev_info {
@@ -132,15 +143,15 @@ struct tps80031_rtc_platform_data {
struct rtc_time time;
};
-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_platform_data {
@@ -151,6 +162,8 @@ 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;
};
struct tps80031_bg_platform_data {
@@ -177,7 +190,7 @@ 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);
diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h
index d84a8c48b4f0..1670d147fc3e 100644
--- a/include/linux/regulator/tps80031-regulator.h
+++ b/include/linux/regulator/tps80031-regulator.h
@@ -70,7 +70,7 @@ enum {
* @init_uV: initial micro volts which need to be set.
* @init_enable: Enable or do not enable the rails during initialization.
* @init_apply: Init parameter applied or not.
- * @ext_pwr_ctrl: External power request control.
+ * @ext_ctrl_flag: External control flag for sleep/power request control.
* @flags: Configuration flag to configure the rails. It should be ORed of
* above enums.
* @delay_us: Delay in microsecond after setting the desired voltage.
@@ -81,7 +81,7 @@ struct tps80031_regulator_platform_data {
int init_uV;
unsigned init_enable:1;
unsigned init_apply:1;
- unsigned int ext_pwr_ctrl;
+ unsigned int ext_ctrl_flag;
unsigned int flags;
int delay_us;
};