regulator: Allow regulators to specify the time taken to ramp on enable
commit31aae2beeb3d601d556b6a8c39085940ad1e9f42
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 21 Dec 2009 12:21:52 +0000 (21 12:21 +0000)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 3 Mar 2010 14:49:23 +0000 (3 14:49 +0000)
tree7a608cabf48e020c5d23e8a96a59c095f0946d2b
parent84b6826306119dc3c41ef9d7ed6c408112f63301
regulator: Allow regulators to specify the time taken to ramp on enable

Regulators may sometimes take longer to enable than the control operation
used to do so, either because the regulator has ramp rate control used to
limit inrush current or because the control operation is very fast (GPIO
being the most common example of this).  In order to ensure that consumers
do not rely on the regulator before it is enabled provide an enable_time()
operation and have the core delay for that time before returning to the
caller.

This is implemented as a function since the ramp rate may be specified in
voltage per unit time and therefore the time depend on the configuration.
In future it would be desirable to allow the bulk operations to run the
delays for multiple enables in parallel but this is not currently supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/core.c
include/linux/regulator/driver.h