regulator: Add notifier event on regulator disable
The intended use case is for drivers which disable regulators to save power but need to do some work to restore the hardware state when restarting. If the supplies are not actually disabled due to board limits or sharing with other active devices this notifier allows the driver to avoid unneeded reinitialisation, particularly when used with runtime PM. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
committed by
Liam Girdwood
parent
6faa7e0a4b
commit
84b6826306
@@ -89,8 +89,9 @@
|
||||
* REGULATION_OUT Regulator output is out of regulation.
|
||||
* FAIL Regulator output has failed.
|
||||
* OVER_TEMP Regulator over temp.
|
||||
* FORCE_DISABLE Regulator shut down by software.
|
||||
* FORCE_DISABLE Regulator forcibly shut down by software.
|
||||
* VOLTAGE_CHANGE Regulator voltage changed.
|
||||
* DISABLE Regulator was disabled.
|
||||
*
|
||||
* NOTE: These events can be OR'ed together when passed into handler.
|
||||
*/
|
||||
@@ -102,6 +103,7 @@
|
||||
#define REGULATOR_EVENT_OVER_TEMP 0x10
|
||||
#define REGULATOR_EVENT_FORCE_DISABLE 0x20
|
||||
#define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40
|
||||
#define REGULATOR_EVENT_DISABLE 0x80
|
||||
|
||||
struct regulator;
|
||||
|
||||
|
Reference in New Issue
Block a user