]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: Implement deferred disable support
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 11 Sep 2011 08:53:50 +0000 (09:53 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 14 Sep 2011 09:58:23 +0000 (10:58 +0100)
commit6cb11b4a47aebec4f4b8f8cd36cc04aa35eda74b
treea4d9f7b306911bf7dfb692418c1ad82792d8c4ee
parent4b636c8dafd1bd3bc1b4449453f9d8088f6404dc
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>
drivers/regulator/core.c
include/linux/regulator/consumer.h
include/linux/regulator/driver.h