summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRichard Zhu <Richard.Zhu@freescale.com>2014-12-25 14:28:06 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:21:10 -0500
commit8a2eb8d78224512be0f9345fdb3337aee73730b0 (patch)
treebd2c8c9cee804be625a31fd60beec8a56378675d /drivers/regulator
parent7d62b96de55ec87bbb573e1971098aa1a0014c7a (diff)
MLK-10058-2 regulator: consumer: define pre_xxx event macros
Some gpc operations are mandatory required when iMX6SX PCIe PHY is powered on/off. use the notify framwork to encapsulate the pre-operations in gpc driver - add two pre-xxx macros into consumer.h - kick off the pre-xxx events in enable/disalbe call back. Signed-off-by: Richard Zhu <Richard.Zhu@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 427cb625af0a..14241be2f6fb 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1752,6 +1752,7 @@ static int _regulator_do_enable(struct regulator_dev *rdev)
{
int ret, delay;
+ _notifier_call_chain(rdev, REGULATOR_EVENT_PRE_ENABLE, NULL);
/* Query before enabling in case configuration dependent. */
ret = _regulator_get_enable_time(rdev);
if (ret >= 0) {
@@ -1896,6 +1897,7 @@ static int _regulator_do_disable(struct regulator_dev *rdev)
{
int ret;
+ _notifier_call_chain(rdev, REGULATOR_EVENT_PRE_DISABLE, NULL);
trace_regulator_disable(rdev_get_name(rdev));
if (rdev->ena_pin) {