From: Primoz Fiser <primoz.fiser@norik.com>
To: Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: upstream@lists.phytec.de
Subject: [PATCH 1/2] OPP: Introduce devm_pm_opp_set_config_regulators
Date: Thu, 6 Jun 2024 13:33:33 +0200 [thread overview]
Message-ID: <20240606113334.396693-1-primoz.fiser@norik.com> (raw)
Introduce devm_pm_opp_set_config_regulators() function. This is device
managed version of dev_pm_opp_set_config_regulators so caller don't need
to worry about managing returned tokens.
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
---
include/linux/pm_opp.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index dd7c8441af42..fa515aab47c9 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -664,6 +664,16 @@ static inline int dev_pm_opp_set_config_regulators(struct device *dev,
return dev_pm_opp_set_config(dev, &config);
}
+static inline int devm_pm_opp_set_config_regulators(struct device *dev,
+ config_regulators_t helper)
+{
+ struct dev_pm_opp_config config = {
+ .config_regulators = helper,
+ };
+
+ return devm_pm_opp_set_config(dev, &config);
+}
+
static inline void dev_pm_opp_put_config_regulators(int token)
{
dev_pm_opp_clear_config(token);
--
2.25.1
next reply other threads:[~2024-06-06 11:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 11:33 Primoz Fiser [this message]
2024-06-06 11:33 ` [PATCH 2/2] OPP: ti: Use devm_pm_opp_set_config_regulators Primoz Fiser
2024-06-10 4:22 ` Viresh Kumar
2024-06-10 11:39 ` Primoz Fiser
2024-06-11 5:28 ` Viresh Kumar
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=20240606113334.396693-1-primoz.fiser@norik.com \
--to=primoz.fiser@norik.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=sboyd@kernel.org \
--cc=upstream@lists.phytec.de \
--cc=vireshk@kernel.org \
/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