diff options
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 22dfaf3d979a..2a2751e4aa8a 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/regulator/machine.h> | 12 | #include <linux/regulator/machine.h> |
13 | #include <linux/regulator/ab8500.h> | 13 | #include <linux/regulator/ab8500.h> |
14 | #include <mach/id.h> /* to identify older boards for fixes */ | ||
14 | #include "board-mop500-regulators.h" | 15 | #include "board-mop500-regulators.h" |
15 | 16 | ||
16 | static struct regulator_consumer_supply gpio_en_3v3_consumers[] = { | 17 | 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) | |||
494 | 495 | ||
495 | BUG_ON(1); | 496 | BUG_ON(1); |
496 | } | 497 | } |
498 | |||
499 | void mop500_regulator_init(void) | ||
500 | { | ||
501 | struct regulator_init_data *regulator; | ||
502 | |||
503 | /* | ||
504 | * Handle VextSupply1 on older boards than HREFP_V22_V1x | ||
505 | * (turn off in suspend) | ||
506 | */ | ||
507 | if (cpu_is_u8500v20() || cpu_is_u8500v21()) { | ||
508 | /* disable VextSupply1 in suspend */ | ||
509 | regulator = &ab8500_ext_regulators[AB8500_EXT_SUPPLY1]; | ||
510 | regulator->constraints.state_mem.disabled = 1; | ||
511 | regulator->constraints.state_standby.disabled = 1; | ||
512 | } | ||
513 | } | ||
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h index 9ca4869a6f23..3d4c412d0b7a 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.h +++ b/arch/arm/mach-ux500/board-mop500-regulators.h | |||
@@ -18,4 +18,6 @@ extern struct ab8500_regulator_platform_data ab8500_regulator_plat_data; | |||
18 | extern struct regulator_init_data tps61052_regulator; | 18 | extern struct regulator_init_data tps61052_regulator; |
19 | extern struct regulator_init_data gpio_en_3v3_regulator; | 19 | extern struct regulator_init_data gpio_en_3v3_regulator; |
20 | 20 | ||
21 | void mop500_regulator_init(void); | ||
22 | |||
21 | #endif | 23 | #endif |