summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorHarald Geyer <harald@ccbib.org>2017-02-23 17:06:52 +0000
committerMark Brown <broonie@kernel.org>2017-03-24 19:13:42 +0000
commit264b88c9e5c86c92ca1d67689779362760baf651 (patch)
tree5d2cda2e7179053726745384098aafe03f75388f /drivers/regulator/core.c
parentd00b74613fb18dfd0a5aa99270ee2e72d5c808d7 (diff)
downloadop-kernel-dev-264b88c9e5c86c92ca1d67689779362760baf651.zip
op-kernel-dev-264b88c9e5c86c92ca1d67689779362760baf651.tar.gz
regulator: core: Add new notification for enabling of regulator
This is useful for devices, which need some time to start up, to help the drivers track how long the supply has been up already. Ie whether it can safely talk to the HW or needs to wait. Signed-off-by: Harald Geyer <harald@ccbib.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/core.c')
-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 04baac9..6b9bb1b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2162,6 +2162,8 @@ static int _regulator_enable(struct regulator_dev *rdev)
if (ret < 0)
return ret;
+ _notifier_call_chain(rdev, REGULATOR_EVENT_ENABLE,
+ NULL);
} else if (ret < 0) {
rdev_err(rdev, "is_enabled() failed: %d\n", ret);
return ret;
OpenPOWER on IntegriCloud