From: Jianqun Xu <jay.xu@rock-chips.com>
To: lgirdwood@gmail.com, broonie@kernel.org, ulf.hansson@linaro.org,
lee.jones@linaro.org, zhangchangzhong@huawei.com,
heiko@sntech.de
Cc: linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Jianqun Xu <jay.xu@rock-chips.com>
Subject: [PATCH v2 2/3] regulator: core: add pre-enable event notify to regulator
Date: Tue, 17 Aug 2021 11:38:47 +0800 [thread overview]
Message-ID: <20210817033848.1396749-3-jay.xu@rock-chips.com> (raw)
In-Reply-To: <20210817033848.1396749-1-jay.xu@rock-chips.com>
Notify the event about regulator to be enabled to driver.
The IO-DOMAIN driver on Rockchip SoCs will take this event and then to
configure the io-domain mode before regualtor_enable.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
v2: none
drivers/regulator/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f192bf19492e..d7dacc608509 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2654,6 +2654,9 @@ static int _regulator_enable(struct regulator *regulator)
goto err_consumer_disable;
}
+ _notifier_call_chain(rdev, REGULATOR_EVENT_PRE_ENABLE,
+ NULL);
+
ret = _regulator_do_enable(rdev);
if (ret < 0)
goto err_consumer_disable;
--
2.25.1
next prev parent reply other threads:[~2021-08-17 3:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 3:38 [PATCH v2 0/3] regulator pre-enable Jianqun Xu
2021-08-17 3:38 ` [PATCH v2 1/3] regulator: add PRE_ENABLE event define Jianqun Xu
2021-08-18 12:56 ` Mark Brown
2021-08-17 3:38 ` Jianqun Xu [this message]
2021-08-17 3:38 ` [PATCH v2 3/3] soc: rockchip: io-domain: do more thing about regulator notify Jianqun Xu
2021-08-17 14:36 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210817033848.1396749-3-jay.xu@rock-chips.com \
--to=jay.xu@rock-chips.com \
--cc=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=ulf.hansson@linaro.org \
--cc=zhangchangzhong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®