Skip to content

Commit

Permalink
ARM: ux500: Turn off external regulator #1 when early HREFs suspend
Browse files Browse the repository at this point in the history
When older variants of the HREF (earlier than v22) development
platform enter suspend mode, power down EXT_SUPPLY1.

Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Lee Jones authored and broonie committed Mar 29, 2013
1 parent a1d4948 commit 422d765
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions arch/arm/mach-ux500/board-mop500-regulators.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down Expand Up @@ -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;
}
}
2 changes: 2 additions & 0 deletions arch/arm/mach-ux500/board-mop500-regulators.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ extern struct ab8500_regulator_platform_data ab8500_regulator_plat_data;
extern struct regulator_init_data tps61052_regulator;
extern struct regulator_init_data gpio_en_3v3_regulator;

void mop500_regulator_init(void);

#endif

0 comments on commit 422d765

Please sign in to comment.