diff options
author | Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com> | 2012-02-06 16:37:33 +0200 |
---|---|---|
committer | Dmytro Kedrovskyi <x0169235@ti.com> | 2012-02-22 22:59:40 +0200 |
commit | 740c1a2534993b2ac7022db04c2e08547e1a713e (patch) | |
tree | 3f9c71863da889e7bf2505e7fc0546ec8799b36e /drivers/regulator | |
parent | 8eea5f9be09d777c2f47659c2442bc4ec740ff90 (diff) | |
download | kernel_samsung_espresso10-740c1a2534993b2ac7022db04c2e08547e1a713e.zip kernel_samsung_espresso10-740c1a2534993b2ac7022db04c2e08547e1a713e.tar.gz kernel_samsung_espresso10-740c1a2534993b2ac7022db04c2e08547e1a713e.tar.bz2 |
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 1632e77..5894487 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) |