diff mbox series

[v5.10.y-cip,v2,05/16] clk: mux: Introduce devm_clk_hw_register_mux_parent_hws()

Message ID 20250124090041.1401132-6-claudiu.beznea.uj@bp.renesas.com (mailing list archive)
State Accepted, archived
Delegated to: Nobuhiro Iwamatsu
Headers show
Series renesas: rzg3s: backport the RTC support | expand

Commit Message

Claudiu Beznea Jan. 24, 2025, 9 a.m. UTC
From: Marijn Suijten <marijn.suijten@somainline.org>

commit df63af17f3375239e0be124844f304b4a4b60665 upstream.

Add the devres variant of clk_hw_register_mux_hws() for registering a
mux clock with clk_hw parent pointers instead of parent names.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220629225331.357308-3-marijn.suijten@somainline.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---
 include/linux/clk-provider.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 9f34b4268e6a..50eaf1946009 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -988,6 +988,13 @@  struct clk *clk_register_mux_table(struct device *dev, const char *name,
 			      (parent_names), NULL, NULL, (flags), (reg),     \
 			      (shift), BIT((width)) - 1, (clk_mux_flags),     \
 			      NULL, (lock))
+#define devm_clk_hw_register_mux_parent_hws(dev, name, parent_hws,	      \
+					    num_parents, flags, reg, shift,   \
+					    width, clk_mux_flags, lock)       \
+	__devm_clk_hw_register_mux((dev), NULL, (name), (num_parents), NULL,  \
+				   (parent_hws), NULL, (flags), (reg),        \
+				   (shift), BIT((width)) - 1,		      \
+				   (clk_mux_flags), NULL, (lock))
 
 int clk_mux_val_to_index(struct clk_hw *hw, u32 *table, unsigned int flags,
 			 unsigned int val);