aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/driver.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-12-21 07:21:52 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-03-03 09:49:23 -0500
commit31aae2beeb3d601d556b6a8c39085940ad1e9f42 (patch)
tree7a608cabf48e020c5d23e8a96a59c095f0946d2b /include/linux/regulator/driver.h
parent84b6826306119dc3c41ef9d7ed6c408112f63301 (diff)
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>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r--include/linux/regulator/driver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 31f2055eae28..592cd7c642c2 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -58,6 +58,9 @@ enum regulator_status {
58 * @get_optimum_mode: Get the most efficient operating mode for the regulator 58 * @get_optimum_mode: Get the most efficient operating mode for the regulator
59 * when running with the specified parameters. 59 * when running with the specified parameters.
60 * 60 *
61 * @enable_time: Time taken for the regulator voltage output voltage to
62 * stabalise after being enabled, in microseconds.
63 *
61 * @set_suspend_voltage: Set the voltage for the regulator when the system 64 * @set_suspend_voltage: Set the voltage for the regulator when the system
62 * is suspended. 65 * is suspended.
63 * @set_suspend_enable: Mark the regulator as enabled when the system is 66 * @set_suspend_enable: Mark the regulator as enabled when the system is
@@ -93,6 +96,9 @@ struct regulator_ops {
93 int (*set_mode) (struct regulator_dev *, unsigned int mode); 96 int (*set_mode) (struct regulator_dev *, unsigned int mode);
94 unsigned int (*get_mode) (struct regulator_dev *); 97 unsigned int (*get_mode) (struct regulator_dev *);
95 98
99 /* Time taken to enable the regulator */
100 int (*enable_time) (struct regulator_dev *);
101
96 /* report regulator status ... most other accessors report 102 /* report regulator status ... most other accessors report
97 * control inputs, this reports results of combining inputs 103 * control inputs, this reports results of combining inputs
98 * from Linux (and other sources) with the actual load. 104 * from Linux (and other sources) with the actual load.