From a4a4069f4523a9ec6ee2741b9f3f3243b65594ba Mon Sep 17 00:00:00 2001 From: Abel Vesa Date: Wed, 29 May 2019 12:26:39 +0000 Subject: clk: imx: Add imx_obtain_fixed_clock clk_hw based variant In order to move to clk_hw based API, imx_obtain_fixed_clock_hw is added. The end goal here is to have all the clk providers use the clk_hw based API. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo --- drivers/clk/imx/clk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/clk/imx/clk.c') diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c index 9cd709787ea6..0ecb67a9494a 100644 --- a/drivers/clk/imx/clk.c +++ b/drivers/clk/imx/clk.c @@ -74,6 +74,17 @@ struct clk * __init imx_obtain_fixed_clock( return clk; } +struct clk_hw * __init imx_obtain_fixed_clock_hw( + const char *name, unsigned long rate) +{ + struct clk *clk; + + clk = imx_obtain_fixed_clock_from_dt(name); + if (IS_ERR(clk)) + clk = imx_clk_fixed(name, rate); + return __clk_get_hw(clk); +} + struct clk_hw * __init imx_obtain_fixed_clk_hw(struct device_node *np, const char *name) { -- cgit v1.2.3