diff options
author | 2013-09-18 18:18:02 +0530 | |
---|---|---|
committer | 2013-09-18 17:13:02 +0100 | |
commit | 00c877c69ba315d6c565a4df51c71b11e82cdeb8 (patch) | |
tree | 8b5dcf0d475476da3ee8c2cb310e9bce34e6d30a /drivers/regulator/core.c | |
parent | Linux 3.12-rc1 (diff) | |
download | linux-00c877c69ba315d6c565a4df51c71b11e82cdeb8.tar.gz linux-00c877c69ba315d6c565a4df51c71b11e82cdeb8.tar.bz2 linux-00c877c69ba315d6c565a4df51c71b11e82cdeb8.zip |
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/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 a01b8b3b70ca..5217c1964c32 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1186,6 +1186,8 @@ overflow_err: static int _regulator_get_enable_time(struct regulator_dev *rdev) { + if (rdev->constraints && rdev->constraints->enable_time) + return rdev->constraints->enable_time; if (!rdev->desc->ops->enable_time) return rdev->desc->enable_time; return rdev->desc->ops->enable_time(rdev); |