[PATCH v3 1/6] clk: Introduce devm_clk_hw_register_mux_parent_data()

Marek Vasut marex at denx.de
Fri Jun 24 18:32:30 PDT 2022


Add an API for clock mux that uses parent_data for the parent instead of
a string parent_name.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Abel Vesa <abel.vesa at nxp.com>
Cc: Fabio Estevam <festevam at gmail.com>
Cc: Jacky Bai <ping.bai at nxp.com>
Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cc: Lucas Stach <l.stach at pengutronix.de>
Cc: Michael Turquette <mturquette at baylibre.com>
Cc: Shawn Guo <shawnguo at kernel.org>
Cc: Stephen Boyd <sboyd at kernel.org>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-clk at vger.kernel.org
Cc: linux-imx at nxp.com
---
V3: New patch
---
 include/linux/clk-provider.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 8c6ad6ea53e52..1f5dff4507812 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -964,6 +964,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_data(dev, name, parent_data,	      \
+					     num_parents, flags, reg, shift,  \
+					     width, clk_mux_flags, lock)      \
+	__devm_clk_hw_register_mux((dev), NULL, (name), (num_parents),	      \
+			      NULL, NULL, (parent_data), (flags), (reg),      \
+			      (shift), BIT((width)) - 1, (clk_mux_flags),     \
+			      NULL, (lock))
 
 int clk_mux_val_to_index(struct clk_hw *hw, const u32 *table, unsigned int flags,
 			 unsigned int val);
-- 
2.35.1




More information about the linux-arm-kernel mailing list