aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
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,
988 } 988 }
989 } 989 }
990 990
991 if (rdev->constraints->ramp_delay && ops->set_ramp_delay) { 991 if ((rdev->constraints->ramp_delay || rdev->constraints->ramp_disable)
992 && ops->set_ramp_delay) {
992 ret = ops->set_ramp_delay(rdev, rdev->constraints->ramp_delay); 993 ret = ops->set_ramp_delay(rdev, rdev->constraints->ramp_delay);
993 if (ret < 0) { 994 if (ret < 0) {
994 rdev_err(rdev, "failed to set ramp_delay\n"); 995 rdev_err(rdev, "failed to set ramp_delay\n");
@@ -2241,8 +2242,8 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
2241 } 2242 }
2242 2243
2243 /* Call set_voltage_time_sel if successfully obtained old_selector */ 2244 /* Call set_voltage_time_sel if successfully obtained old_selector */
2244 if (ret == 0 && _regulator_is_enabled(rdev) && old_selector >= 0 && 2245 if (ret == 0 && !rdev->constraints->ramp_disable && old_selector >= 0
2245 old_selector != selector && rdev->desc->ops->set_voltage_time_sel) { 2246 && old_selector != selector) {
2246 2247
2247 delay = rdev->desc->ops->set_voltage_time_sel(rdev, 2248 delay = rdev->desc->ops->set_voltage_time_sel(rdev,
2248 old_selector, selector); 2249 old_selector, selector);