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

Commit 42c86547 authored by Tomeu Vizoso's avatar Tomeu Vizoso Committed by Thierry Reding
Browse files

clk: Expose clk_hw_reparent() to providers



To be used by clock implementations for switching to a new parent during
rate change.

Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 07aaa0e5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2020,6 +2020,14 @@ static void clk_core_reparent(struct clk_core *clk,
	__clk_recalc_rates(clk, POST_RATE_CHANGE);
}

void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent)
{
	if (!hw)
		return;

	clk_core_reparent(hw->core, !new_parent ? NULL : new_parent->core);
}

/**
 * clk_has_parent - check if a clock is a possible parent for another
 * @clk: clock source
+1 −0
Original line number Diff line number Diff line
@@ -589,6 +589,7 @@ long __clk_mux_determine_rate_closest(struct clk_hw *hw, unsigned long rate,
			      unsigned long max_rate,
			      unsigned long *best_parent_rate,
			      struct clk_hw **best_parent_p);
void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent);

static inline void __clk_hw_set_clk(struct clk_hw *dst, struct clk_hw *src)
{