diff options
author | Fancy Fang <chen.fang@freescale.com> | 2015-08-21 14:19:27 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2016-01-14 10:59:54 -0600 |
commit | 2beb35cb4c789db4513f2cf0af805d53550f64ad (patch) | |
tree | fc126e1deb19270be1cc78490c330c30d70be71c /drivers/regulator | |
parent | d00a1fdb990341950578b01aac00658fb3bd1a8a (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 8a28116b5805..18a434f62053 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1865,6 +1865,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) { @@ -2001,6 +2002,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) { |