[PATCH 07/24] clk: divider: Add ro ops

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


The Linux version of the clk divider exports a clk_divider_ro_ops. Do
the same for barebox.

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

diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index 446b35e1ed..447c43dc93 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -302,6 +302,10 @@ const struct clk_ops clk_divider_ops = {
 	.round_rate = clk_divider_round_rate,
 };
 
+const struct clk_ops clk_divider_ro_ops = {
+	.recalc_rate = clk_divider_recalc_rate,
+};
+
 struct clk *clk_divider_alloc(const char *name, const char *parent,
 			      unsigned clk_flags, void __iomem *reg, u8 shift,
 			      u8 width, unsigned div_flags)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index b8674973fa..e1db903d74 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -451,6 +451,7 @@ struct clk_divider {
 #define CLK_MUX_READ_ONLY		(1 << 3) /* mux can't be changed */
 
 extern const struct clk_ops clk_divider_ops;
+extern const struct clk_ops clk_divider_ro_ops;
 
 unsigned long divider_recalc_rate(struct clk *clk, unsigned long parent_rate,
 		unsigned int val,
-- 
2.29.2




More information about the barebox mailing list