diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-02 11:54:57 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-07 12:46:13 +0200 |
commit | fefac9f953a641c43523c268b3993e2b46f09623 (patch) | |
tree | 1303f2f789abfa3ee8a21b453a181e67bf497a7f /include | |
parent | 37af93a347107a5448e00a2a8a969a83a9ab0eb2 (diff) | |
download | barebox-fefac9f953a641c43523c268b3993e2b46f09623.tar.gz barebox-fefac9f953a641c43523c268b3993e2b46f09623.tar.xz |
clk: Add Linux functions to register a divider
Linux has clk_register_divider() and clk_register_divider_table(). Add
the same functions with the same prototypes for barebox to ease code
porting from Linux.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210602095507.24609-15-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clk.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index 9d09738dda..ba98c5307e 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -475,6 +475,10 @@ void clk_divider_free(struct clk *clk_divider); struct clk *clk_divider(const char *name, const char *parent, unsigned clk_flags, void __iomem *reg, u8 shift, u8 width, unsigned div_flags); +struct clk *clk_register_divider(struct device_d *dev, const char *name, + const char *parent_name, unsigned long flags, + void __iomem *reg, u8 shift, u8 width, + u8 clk_divider_flags, spinlock_t *lock); struct clk *clk_divider_one_based(const char *name, const char *parent, unsigned clk_flags, void __iomem *reg, u8 shift, u8 width, unsigned div_flags); @@ -482,6 +486,11 @@ struct clk *clk_divider_table(const char *name, const char *parent, unsigned clk_flags, void __iomem *reg, u8 shift, u8 width, const struct clk_div_table *table, unsigned div_flags); +struct clk *clk_register_divider_table(struct device_d *dev, const char *name, + const char *parent_name, unsigned long flags, + void __iomem *reg, u8 shift, u8 width, + u8 clk_divider_flags, const struct clk_div_table *table, + spinlock_t *lock); struct clk_fixed_factor { struct clk_hw hw; |