summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/of_regulator.c
diff options
context:
space:
mode:
authorLaxman Dewangan2017-04-04 15:29:50 +0200
committerMark Brown2017-04-05 19:25:10 +0200
commitd6c1dc3f52e3a65f35c58433ba57d14c0bad902f (patch)
tree9b0d994afe52df7445db81c207fe922842d6f1c4 /drivers/regulator/of_regulator.c
parentregulator: DT: Add settling time property for non-linear voltage change (diff)
downloadkernel-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/of_regulator.c')
-rw-r--r--drivers/regulator/of_regulator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 4f613ec99500..09d677d5d3f0 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -86,6 +86,10 @@ static void of_get_regulation_constraints(struct device_node *np,
constraints->ramp_disable = true;
}
+ ret = of_property_read_u32(np, "regulator-settling-time-us", &pval);
+ if (!ret)
+ constraints->settling_time = pval;
+
ret = of_property_read_u32(np, "regulator-enable-ramp-delay", &pval);
if (!ret)
constraints->enable_time = pval;