Linux has clk_register_fixed_factor(). Add the same function with the same prototype for barebox to ease code porting from Linux. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/clk/clk-fixed-factor.c | 7 +++++++ include/linux/clk.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index 4f1a07c629..fd4a3805f1 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -77,6 +77,13 @@ struct clk *clk_fixed_factor(const char *name, return &f->hw.clk; } +struct clk *clk_register_fixed_factor(struct device_d *dev, const char *name, + const char *parent_name, unsigned long flags, + unsigned int mult, unsigned int div) +{ + return clk_fixed_factor(name, parent_name, mult, div, flags); +} + /** * of_fixed_factor_clk_setup() - Setup function for simple fixed factor clock */ diff --git a/include/linux/clk.h b/include/linux/clk.h index 04dd4b0116..01bda4d94f 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -509,6 +509,9 @@ 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); +struct clk *clk_register_fixed_factor(struct device_d *dev, const char *name, + const char *parent_name, unsigned long flags, + unsigned int mult, unsigned int div); /** * struct clk_fractional_divider - adjustable fractional divider clock -- 2.29.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox