]> Pileus Git - ~andy/linux/blobdiff - drivers/regulator/core.c
Merge remote-tracking branch 'regulator/topic/ramp' into regulator-next
[~andy/linux] / drivers / regulator / core.c
index 9f4ccf2b33409452372c1a9d79326d8bd17cffab..a01b8b3b70ca2fc3adb4e81d7f96358282115ba4 100644 (file)
@@ -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);