[PATCH 09/24] clk: mux: Add ro ops

Sascha Hauer s.hauer at pengutronix.de
Wed Jun 2 02:54:52 PDT 2021


The Linux version of the clk muxr exports a clk_mux_ro_ops. Do
the same for barebox.

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

diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index bd5b50ad18..464593b619 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -48,6 +48,10 @@ const struct clk_ops clk_mux_ops = {
 	.set_parent = clk_mux_set_parent,
 };
 
+const struct clk_ops clk_mux_ro_ops = {
+	.get_parent = clk_mux_get_parent,
+};
+
 struct clk *clk_mux_alloc(const char *name, unsigned clk_flags, void __iomem *reg,
 		u8 shift, u8 width, const char * const *parents, u8 num_parents,
 		unsigned mux_flags)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index ede2b676fe..edf64cd9aa 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -504,6 +504,7 @@ struct clk_mux {
 #define to_clk_mux(_hw) container_of(_hw, struct clk_mux, hw)
 
 extern const struct clk_ops clk_mux_ops;
+extern const struct clk_ops clk_mux_ro_ops;
 
 struct clk *clk_mux_alloc(const char *name, unsigned clk_flags,
 			  void __iomem *reg, u8 shift, u8 width,
-- 
2.29.2




More information about the barebox mailing list