diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-09-18 18:18:02 +0530 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-18 17:13:02 +0100 |
commit | 00c877c69ba315d6c565a4df51c71b11e82cdeb8 (patch) | |
tree | 8b5dcf0d475476da3ee8c2cb310e9bce34e6d30a /drivers/regulator/of_regulator.c | |
parent | 272b98c6455f00884f0350f775c5342358ebb73f (diff) | |
download | op-kernel-dev-00c877c69ba315d6c565a4df51c71b11e82cdeb8.zip op-kernel-dev-00c877c69ba315d6c565a4df51c71b11e82cdeb8.tar.gz |
regulator: core: add support for configuring turn-on time through constraints
The turn-on time of the regulator depends on the regulator device's
electrical characteristics. Sometimes regulator turn-on time also
depends on the capacitive load on the given platform and it can be
more than the datasheet value.
The driver provides the enable-time as per datasheet.
Add support for configure the enable ramp time through regulator
constraints so that regulator core can take this value for enable
time for that regulator.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/of_regulator.c')
-rw-r--r-- | drivers/regulator/of_regulator.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 7827384..ea4f36f 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -23,6 +23,8 @@ static void of_get_regulation_constraints(struct device_node *np, const __be32 *min_uA, *max_uA, *ramp_delay; struct property *prop; struct regulation_constraints *constraints = &(*init_data)->constraints; + int ret; + u32 pval; constraints->name = of_get_property(np, "regulator-name", NULL); @@ -73,6 +75,10 @@ static void of_get_regulation_constraints(struct device_node *np, else constraints->ramp_disable = true; } + + ret = of_property_read_u32(np, "regulator-enable-ramp-delay", &pval); + if (!ret) + constraints->enable_time = pval; } /** |