mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-24 19:25:07 -04:00
regulator: core: Add PRE_DISABLE notification
Add a PRE_DISABLE notification so that consumers can use a notifier to run any steps required to prepare for the regulator being switched off. Since the regulator disable can fail an abort notification is also added. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
f114040e3e
commit
a1c8a5512b
@@ -99,6 +99,8 @@ struct regmap;
|
||||
* Data passed is "struct pre_voltage_change_data"
|
||||
* ABORT_VOLTAGE_CHANGE Regulator voltage change failed for some reason.
|
||||
* Data passed is old voltage cast to (void *).
|
||||
* PRE_DISABLE Regulator is about to be disabled
|
||||
* ABORT_DISABLE Regulator disable failed for some reason
|
||||
*
|
||||
* NOTE: These events can be OR'ed together when passed into handler.
|
||||
*/
|
||||
@@ -113,6 +115,8 @@ struct regmap;
|
||||
#define REGULATOR_EVENT_DISABLE 0x80
|
||||
#define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE 0x100
|
||||
#define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200
|
||||
#define REGULATOR_EVENT_PRE_DISABLE 0x400
|
||||
#define REGULATOR_EVENT_ABORT_DISABLE 0x800
|
||||
|
||||
/**
|
||||
* struct pre_voltage_change_data - Data sent with PRE_VOLTAGE_CHANGE event
|
||||
|
||||
Reference in New Issue
Block a user