public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: fixed-rate: add devm_clk_hw_register_fixed_rate_parent_data()
@ 2024-09-04 11:41 Nikita Shubin via B4 Relay
  2024-09-05 20:48 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Nikita Shubin via B4 Relay @ 2024-09-04 11:41 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: linux-clk, linux-kernel, Nikita Shubin

From: Nikita Shubin <nikita.shubin@maquefel.me>

Add devm_clk_hw_register_fixed_rate_parent_data(), devres-managed helper
to register fixed-rate clock with parent_data.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Hello Stephen!

Sending devm version of clk_hw_register_fixed_rate_parent_data(),
as promised in:

https://lore.kernel.org/lkml/79cb209c6c5a14ae4d6a015f714c58d4.sboyd@kernel.org/
---
 include/linux/clk-provider.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 4a537260f655..7e43caabb54b 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -393,6 +393,20 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
 #define devm_clk_hw_register_fixed_rate(dev, name, parent_name, flags, fixed_rate)  \
 	__clk_hw_register_fixed_rate((dev), NULL, (name), (parent_name), NULL, \
 				     NULL, (flags), (fixed_rate), 0, 0, true)
+/**
+ * devm_clk_hw_register_fixed_rate_parent_data - register fixed-rate clock with
+ * the clock framework
+ * @dev: device that is registering this clock
+ * @name: name of this clock
+ * @parent_data: parent clk data
+ * @flags: framework-specific flags
+ * @fixed_rate: non-adjustable clock rate
+ */
+#define devm_clk_hw_register_fixed_rate_parent_data(dev, name, parent_data, flags, \
+						    fixed_rate)			   \
+	__clk_hw_register_fixed_rate((dev), NULL, (name), NULL, NULL,		   \
+				     (parent_data), (flags), (fixed_rate), 0,	   \
+				     0, true)
 /**
  * clk_hw_register_fixed_rate_parent_hw - register fixed-rate clock with
  * the clock framework

---
base-commit: 88fac17500f4ea49c7bac136cf1b27e7b9980075
change-id: 20240904-devm_clk_hw_register_fixed_rate_parent_data-d24713019d24

Best regards,
-- 
Nikita Shubin <nikita.shubin@maquefel.me>



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

* Re: [PATCH] clk: fixed-rate: add devm_clk_hw_register_fixed_rate_parent_data()
  2024-09-04 11:41 [PATCH] clk: fixed-rate: add devm_clk_hw_register_fixed_rate_parent_data() Nikita Shubin via B4 Relay
@ 2024-09-05 20:48 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2024-09-05 20:48 UTC (permalink / raw)
  To: Michael Turquette, Nikita Shubin via B4 Relay, nikita.shubin
  Cc: linux-clk, linux-kernel, Nikita Shubin

Quoting Nikita Shubin via B4 Relay (2024-09-04 04:41:07)
> From: Nikita Shubin <nikita.shubin@maquefel.me>
> 
> Add devm_clk_hw_register_fixed_rate_parent_data(), devres-managed helper
> to register fixed-rate clock with parent_data.
> 
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---

Applied to clk-next

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

end of thread, other threads:[~2024-09-05 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 11:41 [PATCH] clk: fixed-rate: add devm_clk_hw_register_fixed_rate_parent_data() Nikita Shubin via B4 Relay
2024-09-05 20:48 ` Stephen Boyd

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