Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH 1/2] OPP: Introduce devm_pm_opp_set_config_regulators
@ 2024-06-06 11:33 Primoz Fiser
  2024-06-06 11:33 ` [PATCH 2/2] OPP: ti: Use devm_pm_opp_set_config_regulators Primoz Fiser
  0 siblings, 1 reply; 5+ messages in thread
From: Primoz Fiser @ 2024-06-06 11:33 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd, linux-pm,
	linux-kernel; +Cc: upstream

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-11  5:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 11:33 [PATCH 1/2] OPP: Introduce devm_pm_opp_set_config_regulators Primoz Fiser
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox