Merge remote-tracking branches 'regulator/topic/settle', 'regulator/topic/tps65910...
[muen/linux.git] / drivers / regulator / core.c
index e9f74331fc697d86b723e1a69379d636c9fe9162..e567fa54980b6df80c3ef4757aa57086986eca68 100644 (file)
@@ -2767,6 +2767,12 @@ static int _regulator_set_voltage_time(struct regulator_dev *rdev,
                ramp_delay = rdev->desc->ramp_delay;
        else if (rdev->constraints->settling_time)
                return rdev->constraints->settling_time;
+       else if (rdev->constraints->settling_time_up &&
+                (new_uV > old_uV))
+               return rdev->constraints->settling_time_up;
+       else if (rdev->constraints->settling_time_down &&
+                (new_uV < old_uV))
+               return rdev->constraints->settling_time_down;
 
        if (ramp_delay == 0) {
                rdev_dbg(rdev, "ramp_delay not set\n");