diff options
author | Laxman Dewangan | 2017-04-04 15:29:50 +0200 |
---|---|---|
committer | Mark Brown | 2017-04-05 19:25:10 +0200 |
commit | d6c1dc3f52e3a65f35c58433ba57d14c0bad902f (patch) | |
tree | 9b0d994afe52df7445db81c207fe922842d6f1c4 /drivers/regulator/core.c | |
parent | regulator: DT: Add settling time property for non-linear voltage change (diff) | |
download | kernel-qcow2-linux-d6c1dc3f52e3a65f35c58433ba57d14c0bad902f.tar.gz kernel-qcow2-linux-d6c1dc3f52e3a65f35c58433ba57d14c0bad902f.tar.xz kernel-qcow2-linux-d6c1dc3f52e3a65f35c58433ba57d14c0bad902f.zip |
regulator: Add settling time for non-linear voltage transition
Some regulators (some PWM regulators) have the voltage transition
non-linear i.e. exponentially. On such cases, the settling time
for voltage transition can not be presented in the voltage-ramp-delay.
Add new property for non-linear voltage transition and handle this
in getting the voltage settling time.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 04baac9a165b..3a641d64f8e1 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2753,6 +2753,8 @@ static int _regulator_set_voltage_time(struct regulator_dev *rdev, ramp_delay = rdev->constraints->ramp_delay; else if (rdev->desc->ramp_delay) ramp_delay = rdev->desc->ramp_delay; + else if (rdev->constraints->settling_time) + return rdev->constraints->settling_time; if (ramp_delay == 0) { rdev_dbg(rdev, "ramp_delay not set\n"); |