[PATCH 17/24] clk: Add Linux functions to register a mux

Sascha Hauer s.hauer at pengutronix.de
Wed Jun 2 02:55:00 PDT 2021


Linux has clk_register_mux(). Add the same function with the same
prototype for barebox to ease code porting from Linux.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/clk/clk-mux.c | 10 ++++++++++
 include/linux/clk.h   |  5 +++++
 2 files changed, 15 insertions(+)

diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index 464593b619..e7e4369ce0 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -98,3 +98,13 @@ struct clk *clk_mux(const char *name, unsigned clk_flags, void __iomem *reg,
 
 	return m;
 }
+
+struct clk *clk_register_mux(struct device_d *dev, const char *name,
+		const char * const *parent_names, u8 num_parents,
+		unsigned long flags,
+		void __iomem *reg, u8 shift, u8 width,
+		u8 clk_mux_flags, spinlock_t *lock)
+{
+	return clk_mux(name, flags, reg, shift, width, parent_names,
+		       num_parents, clk_mux_flags);
+}
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 950fecd7e0..0d2fb488bc 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -589,6 +589,11 @@ void clk_mux_free(struct clk *clk_mux);
 struct clk *clk_mux(const char *name, unsigned clk_flags, void __iomem *reg,
 		    u8 shift, u8 width, const char * const *parents,
 		    u8 num_parents, unsigned mux_flags);
+struct clk *clk_register_mux(struct device_d *dev, const char *name,
+		const char * const *parent_names, u8 num_parents,
+		unsigned long flags,
+		void __iomem *reg, u8 shift, u8 width,
+		u8 clk_mux_flags, spinlock_t *lock);
 
 struct clk_gate {
 	struct clk_hw hw;
-- 
2.29.2




More information about the barebox mailing list