aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/driver.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-11 09:53:50 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-14 10:58:23 +0100
commitda07ecd93b196819dcec488b7ebec69a71f3819e (patch)
treea4d9f7b306911bf7dfb692418c1ad82792d8c4ee /include/linux/regulator/driver.h
parentASoC: ad193x: Setup regmap read and write flag masks for SPI (diff)
downloadlinux-dev-da07ecd93b196819dcec488b7ebec69a71f3819e.tar.xz
linux-dev-da07ecd93b196819dcec488b7ebec69a71f3819e.zip
regulator: Implement deferred disable support
It is a reasonably common pattern for hardware to require some delay after being quiesced before the disable has finalised, especially in mixed signal devices. For example, an active discharge may be required to ensure that the circuit starts up again in a known state. Avoid having to implement such delays in the regulator API by providing regulator_deferred_disable() which will do a regulator_disable() a specified number of milliseconds after it is called. Due to the reference counting done on regulators a deferred disable can be cancelled by doing another regulator_enable(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r--include/linux/regulator/driver.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 1a80bc77517d..12a1aa04b720 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -199,6 +199,9 @@ struct regulator_dev {
struct regulation_constraints *constraints;
struct regulator *supply; /* for tree */
+ struct delayed_work disable_work;
+ int deferred_disables;
+
void *reg_data; /* regulator_dev data */
#ifdef CONFIG_DEBUG_FS