aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>2012-02-06 17:17:24 +0200
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:59:44 +0200
commit61e6cbba9a161d17787813dc74e2b97369f26346 (patch)
treec2197c604b90f1c0f8c52100359d8e8d9123fa86
parent94aab97ea48ef87128b085e98c03f2beb3371ec1 (diff)
downloadkernel_samsung_tuna-61e6cbba9a161d17787813dc74e2b97369f26346.zip
kernel_samsung_tuna-61e6cbba9a161d17787813dc74e2b97369f26346.tar.gz
kernel_samsung_tuna-61e6cbba9a161d17787813dc74e2b97369f26346.tar.bz2
MFD: TWL: Regulator: Add support for REGEN1
REGEN1 is added to platform data, so that it can be modelled as an regulator and the state of it can be controlled through drivers and board file. Change-Id: I3e3251d95841a8522db530b7826746e375e23ce6 Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
-rw-r--r--drivers/mfd/twl-core.c5
-rw-r--r--drivers/regulator/twl-regulator.c1
-rw-r--r--include/linux/i2c/twl.h2
3 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 48b2c78..96383d1 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1054,6 +1054,11 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
pdata->sysen, features);
if (IS_ERR(child))
return PTR_ERR(child);
+
+ child = add_regulator(TWL6030_REG_REGEN1,
+ pdata->sysen, features);
+ if (IS_ERR(child))
+ return PTR_ERR(child);
}
/* twl6032 regulators */
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 5894487..b75b425 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -1120,6 +1120,7 @@ static struct twlreg_info twl_regs[] = {
TWL6032_ADJUSTABLE_SMPS(VIO, 0x16),
TWL6030_EXTERNAL_CONTROL_PIN(SYSEN, 0x83, 0),
+ TWL6030_EXTERNAL_CONTROL_PIN(REGEN1, 0x7d, 0),
};
static u8 twl_get_smps_offset(void)
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 2122bef..2cdedaa 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -823,6 +823,7 @@ struct twl4030_platform_data {
/* External control pins */
struct regulator_init_data *sysen;
+ struct regulator_init_data *regen1;
};
/*----------------------------------------------------------------------*/
@@ -924,5 +925,6 @@ static inline int twl4030charger_usb_en(int enable) { return 0; }
/* External control pins */
#define TWL6030_REG_SYSEN 62
+#define TWL6030_REG_REGEN1 63
#endif /* End of __TWL4030_H */