[PATCH 05/14] clk: divider: Add ro ops
Sascha Hauer
s.hauer at pengutronix.de
Tue May 18 04:49:20 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 edbba941b7..080aaa58a2 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -302,6 +302,10 @@ struct clk_ops clk_divider_ops = {
.round_rate = clk_divider_round_rate,
};
+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 654845023a..d0bcdd7ac3 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 struct clk_ops clk_divider_ops;
+extern 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