Rockchip io-domain care about regulator pre-enable
Jianqun Xu (3):
regulator: add PRE_ENABLE event define
regulator: core: add pre-enable event notify to regulator
soc: rockchip: io-domain: do more thing about regulator notify
drivers/regulator/core.c | 3 +++
drivers/soc/rockchip/io-domain.c | 6 ++++++
include/linux/regulator/consumer.h | 2 ++
3 files changed, 11 insertions(+)
--
v2:
- remove patch "regulator: core: notify regulator enable with the voltage value"
- use "uV = regulator_get_voltage(supply->reg);" but from notify data
v1:
- first
2.25.1
Add REGULATOR_EVENT_PRE_ENABLE to allow to notify driver that the
regulator is about to enabled.
Signed-off-by: Jianqun Xu <[email protected]>
---
v2: none
include/linux/regulator/consumer.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 20e84a84fb77..edd31f0dad17 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -102,6 +102,7 @@ struct regulator_dev;
* Data passed is old voltage cast to (void *).
* PRE_DISABLE Regulator is about to be disabled
* ABORT_DISABLE Regulator disable failed for some reason
+ * PRE_ENABLE Regulator is about to be enabled
*
* NOTE: These events can be OR'ed together when passed into handler.
*/
@@ -119,6 +120,7 @@ struct regulator_dev;
#define REGULATOR_EVENT_PRE_DISABLE 0x400
#define REGULATOR_EVENT_ABORT_DISABLE 0x800
#define REGULATOR_EVENT_ENABLE 0x1000
+#define REGULATOR_EVENT_PRE_ENABLE 0x2000
/*
* Regulator errors that can be queried using regulator_get_error_flags
--
2.25.1
On Tue, Aug 17, 2021 at 11:38:46AM +0800, Jianqun Xu wrote:
> Add REGULATOR_EVENT_PRE_ENABLE to allow to notify driver that the
> regulator is about to enabled.
This doesn't apply against current code, please check and resend.