summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@freescale.com>2015-08-21 14:19:27 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:22:48 +0800
commit4aebe641bf63c5470d166eaa8456e6242dbde794 (patch)
tree9823e5d9457813c539c847b5a4ef02cde0b02523 /drivers/regulator
parent7140a023c85c9acbf82c4fdda9372a02f197d333 (diff)
MLK-11395-3 regulator: consumer: add new event macros
Add two new regulator events macro 'REGULATOR_EVENT_PRE_DO_ENABLE' and 'REGULATOR_EVENT_PRE_DO_DISABLE', since some gpc operations should be required when MIPI PHY is powered on/off. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b2cb4f497ef6..43a74c36748b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2086,6 +2086,7 @@ static int _regulator_do_enable(struct regulator_dev *rdev)
{
int ret, delay;
+ _notifier_call_chain(rdev, REGULATOR_EVENT_PRE_DO_ENABLE, NULL);
/* Query before enabling in case configuration dependent. */
ret = _regulator_get_enable_time(rdev);
if (ret >= 0) {
@@ -2226,6 +2227,7 @@ static int _regulator_do_disable(struct regulator_dev *rdev)
{
int ret;
+ _notifier_call_chain(rdev, REGULATOR_EVENT_PRE_DO_DISABLE, NULL);
trace_regulator_disable(rdev_get_name(rdev));
if (rdev->ena_pin) {