diff options
Diffstat (limited to 'drivers/regulator/pwm-regulator.c')
-rw-r--r-- | drivers/regulator/pwm-regulator.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index c24524242da2..1b88e0e15a70 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/delay.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/err.h> | 15 | #include <linux/err.h> |
@@ -194,12 +193,10 @@ static int pwm_regulator_set_voltage(struct regulator_dev *rdev, | |||
194 | unsigned int min_uV_duty = drvdata->continuous.min_uV_dutycycle; | 193 | unsigned int min_uV_duty = drvdata->continuous.min_uV_dutycycle; |
195 | unsigned int max_uV_duty = drvdata->continuous.max_uV_dutycycle; | 194 | unsigned int max_uV_duty = drvdata->continuous.max_uV_dutycycle; |
196 | unsigned int duty_unit = drvdata->continuous.dutycycle_unit; | 195 | unsigned int duty_unit = drvdata->continuous.dutycycle_unit; |
197 | unsigned int ramp_delay = rdev->constraints->ramp_delay; | ||
198 | int min_uV = rdev->constraints->min_uV; | 196 | int min_uV = rdev->constraints->min_uV; |
199 | int max_uV = rdev->constraints->max_uV; | 197 | int max_uV = rdev->constraints->max_uV; |
200 | int diff_uV = max_uV - min_uV; | 198 | int diff_uV = max_uV - min_uV; |
201 | struct pwm_state pstate; | 199 | struct pwm_state pstate; |
202 | int old_uV = pwm_regulator_get_voltage(rdev); | ||
203 | unsigned int diff_duty; | 200 | unsigned int diff_duty; |
204 | unsigned int dutycycle; | 201 | unsigned int dutycycle; |
205 | int ret; | 202 | int ret; |
@@ -233,13 +230,6 @@ static int pwm_regulator_set_voltage(struct regulator_dev *rdev, | |||
233 | return ret; | 230 | return ret; |
234 | } | 231 | } |
235 | 232 | ||
236 | if ((ramp_delay == 0) || !pwm_regulator_is_enabled(rdev)) | ||
237 | return 0; | ||
238 | |||
239 | /* Ramp delay is in uV/uS. Adjust to uS and delay */ | ||
240 | ramp_delay = DIV_ROUND_UP(abs(req_min_uV - old_uV), ramp_delay); | ||
241 | usleep_range(ramp_delay, ramp_delay + DIV_ROUND_UP(ramp_delay, 10)); | ||
242 | |||
243 | return 0; | 233 | return 0; |
244 | } | 234 | } |
245 | 235 | ||