diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-03-28 16:11:04 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-29 17:49:08 +0000 |
commit | 422d765d2cb9a22ded86d8b63a1701e296436b81 (patch) | |
tree | 13d7164554f89224fe16d5d8f0f59b5a14771af2 /arch/arm/mach-ux500/board-mop500-regulators.c | |
parent | a1d494806698ae37c14b0c7fe9e6165e3b0c146c (diff) |
ARM: ux500: Turn off external regulator #1 when early HREFs suspend
When older variants of the HREF (earlier than v22) development
platform enter suspend mode, power down EXT_SUPPLY1.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-regulators.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 22dfaf3d979..2a2751e4aa8 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -11,6 +11,7 @@ #include <linux/kernel.h> #include <linux/regulator/machine.h> #include <linux/regulator/ab8500.h> +#include <mach/id.h> /* to identify older boards for fixes */ #include "board-mop500-regulators.h" static struct regulator_consumer_supply gpio_en_3v3_consumers[] = { @@ -494,3 +495,19 @@ static void ab8500_modify_reg_init(int id, u8 mask, u8 value) BUG_ON(1); } + +void mop500_regulator_init(void) +{ + struct regulator_init_data *regulator; + + /* + * Handle VextSupply1 on older boards than HREFP_V22_V1x + * (turn off in suspend) + */ + if (cpu_is_u8500v20() || cpu_is_u8500v21()) { + /* disable VextSupply1 in suspend */ + regulator = &ab8500_ext_regulators[AB8500_EXT_SUPPLY1]; + regulator->constraints.state_mem.disabled = 1; + regulator->constraints.state_standby.disabled = 1; + } +} |