summaryrefslogtreecommitdiff
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-01 13:50:20 +0100
committerMark Brown <broonie@linaro.org>2013-09-01 13:50:20 +0100
commita89f5c759857b1d1a56a4d530ad30bc1cacc58c9 (patch)
tree8bf3973a36ad031894db5ee68866dcd6916c0bc3 /drivers/regulator/core.c
parent09f2dd88ff93a6d31e10dd5c25e2aa2a8b7b12ee (diff)
parent5b175952011adae30b531ab89cc24acb173b2ce4 (diff)
Merge remote-tracking branch 'regulator/topic/ramp' into regulator-next
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 9f4ccf2b3340..a01b8b3b70ca 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -988,7 +988,8 @@ static int set_machine_constraints(struct regulator_dev *rdev,
}
}
- if (rdev->constraints->ramp_delay && ops->set_ramp_delay) {
+ if ((rdev->constraints->ramp_delay || rdev->constraints->ramp_disable)
+ && ops->set_ramp_delay) {
ret = ops->set_ramp_delay(rdev, rdev->constraints->ramp_delay);
if (ret < 0) {
rdev_err(rdev, "failed to set ramp_delay\n");
@@ -2241,8 +2242,8 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
}
/* Call set_voltage_time_sel if successfully obtained old_selector */
- if (ret == 0 && _regulator_is_enabled(rdev) && old_selector >= 0 &&
- old_selector != selector && rdev->desc->ops->set_voltage_time_sel) {
+ if (ret == 0 && !rdev->constraints->ramp_disable && old_selector >= 0
+ && old_selector != selector) {
delay = rdev->desc->ops->set_voltage_time_sel(rdev,
old_selector, selector);