diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-02 11:54:53 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-07 12:46:13 +0200 |
commit | 3f5fcff277e460250eea6bc2aaeab0b6ba7f781c (patch) | |
tree | 8562e36dca080a107d676179b185d80e3e486116 /include/linux | |
parent | 19dd6ce9874512783ea6e25dc8d387471547070d (diff) | |
download | barebox-3f5fcff277e460250eea6bc2aaeab0b6ba7f781c.tar.gz barebox-3f5fcff277e460250eea6bc2aaeab0b6ba7f781c.tar.xz |
clk: move fixed_factor to include/linux/clk.h
In Linux struct clk_fixed_factor is known to clk implementors. Do the
same in barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210602095507.24609-11-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/clk.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index edf64cd9aa..7140aa9509 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -480,6 +480,21 @@ 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_fixed_factor { + struct clk_hw hw; + int mult; + int div; + const char *parent; +}; + +static inline struct clk_fixed_factor *to_clk_fixed_factor(struct clk_hw *hw) +{ + return container_of(hw, struct clk_fixed_factor, hw); +} + +extern struct clk_ops clk_fixed_factor_ops; + struct clk *clk_fixed_factor(const char *name, const char *parent, unsigned int mult, unsigned int div, unsigned flags); |