Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4a4069f authored by Abel Vesa's avatar Abel Vesa Committed by Shawn Guo
Browse files

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: default avatarAbel Vesa <abel.vesa@nxp.com>
Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 5b933e28
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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)
{
+3 −0
Original line number Diff line number Diff line
@@ -96,6 +96,9 @@ struct clk *clk_register_gate2(struct device *dev, const char *name,
struct clk * imx_obtain_fixed_clock(
			const char *name, unsigned long rate);

struct clk_hw *imx_obtain_fixed_clock_hw(
			const char *name, unsigned long rate);

struct clk_hw *imx_obtain_fixed_clk_hw(struct device_node *np,
				       const char *name);