diff options
author | Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com> | 2012-02-06 16:37:33 +0200 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:57:35 +0200 |
commit | 0fe5e672ab78a75ca1e35a03bf053476006f74c8 (patch) | |
tree | cd51617f2d180729cd4959c8b898d3a39d289195 /drivers/regulator | |
parent | 1b5653d1ad664dc35c277e513503618c786d1a62 (diff) | |
download | kernel_samsung_tuna-0fe5e672ab78a75ca1e35a03bf053476006f74c8.tar.gz kernel_samsung_tuna-0fe5e672ab78a75ca1e35a03bf053476006f74c8.tar.bz2 kernel_samsung_tuna-0fe5e672ab78a75ca1e35a03bf053476006f74c8.zip |
MFD: TWL: Regulator: Add support for SYSEN
Previously SYSEN pin was configured only for the OMAP4460.
SYSEN 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: I7ec8d690f94d0143563b904844ef9155eef20a17
Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/twl-regulator.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 1632e77efaa..589448751f1 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -920,6 +920,18 @@ static struct regulator_ops twlsmps_ops = { .set_suspend_disable = twl6030ldo_suspend_disable, }; +static struct regulator_ops twl6030_external_control_pin_ops = { + .enable = twl6030reg_enable, + .disable = twl6030reg_disable, + .is_enabled = twl6030reg_is_enabled, + + .set_mode = twl6030reg_set_mode, + + .get_status = twl6030reg_get_status, + + .set_suspend_enable = twl6030ldo_suspend_enable, + .set_suspend_disable = twl6030ldo_suspend_disable, +}; /*----------------------------------------------------------------------*/ #define TWL4030_FIXED_LDO(label, offset, mVolts, num, turnon_delay, \ @@ -1032,6 +1044,18 @@ static struct regulator_ops twlsmps_ops = { }, \ } +#define TWL6030_EXTERNAL_CONTROL_PIN(label, offset, turnon_delay) { \ + .base = offset, \ + .delay = turnon_delay, \ + .desc = { \ + .name = #label, \ + .id = TWL6030_REG_##label, \ + .ops = &twl6030_external_control_pin_ops, \ + .type = REGULATOR_VOLTAGE, \ + .owner = THIS_MODULE, \ + }, \ + } + /* * We list regulators here if systems need some level of * software control over them after boot. @@ -1094,6 +1118,8 @@ static struct twlreg_info twl_regs[] = { TWL6032_ADJUSTABLE_SMPS(SMPS3, 0x34), TWL6032_ADJUSTABLE_SMPS(SMPS4, 0x10), TWL6032_ADJUSTABLE_SMPS(VIO, 0x16), + + TWL6030_EXTERNAL_CONTROL_PIN(SYSEN, 0x83, 0), }; static u8 twl_get_smps_offset(void) |