summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorBengt Jonsson <bengt.g.jonsson@stericsson.com>2011-06-08 17:13:14 +0200
committersaid m bagheri <ebgheri@steludxu2848.(none)>2011-06-29 10:30:33 +0200
commitf9cf9587beb5a5f2d57462d8bbbe1f726945e305 (patch)
tree6b43bb0dfb79576df103106baf4768c05fe4c711 /arch/arm/mach-ux500
parent1802321d8a25ab04a35a0df552d7bc41eca7f616 (diff)
arm: ux500: Added mode handling of Vintcore
The consumers of Vintcore (ULPCLK and USB) request current from Vintcore with regulator_set_optimum_mode. This will let Vintcore run in LP mode when possible. The purpose is to save power. ST-Ericsson Linux next: - ST-Ericsson ID: 337974 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: If6ab64e7d13e9012675047376fe8debc2aeccf26 Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24731
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c7
-rw-r--r--arch/arm/mach-ux500/clock-db8500.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 1408bd50dbb..06262bd6b2d 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -504,8 +504,13 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
.name = "V-INTCORE",
.min_uV = 1250000,
.max_uV = 1350000,
+ .input_uV = 1800000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
- REGULATOR_CHANGE_STATUS,
+ REGULATOR_CHANGE_STATUS |
+ REGULATOR_CHANGE_MODE |
+ REGULATOR_CHANGE_DRMS,
+ .valid_modes_mask = REGULATOR_MODE_NORMAL |
+ REGULATOR_MODE_IDLE,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers),
.consumer_supplies = ab8500_vintcore_consumers,
diff --git a/arch/arm/mach-ux500/clock-db8500.c b/arch/arm/mach-ux500/clock-db8500.c
index 5434fef0d3f..19a549fbcc6 100644
--- a/arch/arm/mach-ux500/clock-db8500.c
+++ b/arch/arm/mach-ux500/clock-db8500.c
@@ -139,6 +139,9 @@ static int ab_ulpclk_enable(struct clk *clk)
return PTR_ERR(reg);
clk->regulator = reg;
}
+ err = regulator_set_optimum_mode(clk->regulator, 1500);
+ if (unlikely(err < 0))
+ goto regulator_enable_error;
err = regulator_enable(clk->regulator);
if (unlikely(err))
goto regulator_enable_error;
@@ -168,6 +171,9 @@ static void ab_ulpclk_disable(struct clk *clk)
AB8500_SYSULPCLKCTRL1_ULPCLKREQ);
if (unlikely(regulator_disable(clk->regulator) || err))
goto out_err;
+
+ regulator_set_optimum_mode(clk->regulator, 0);
+
return;
out_err: