diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-07-29 12:25:02 +0100 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 08:57:42 -0500 |
commit | 2ccf9427e89f10b0e26b20f438420f9f897060b5 (patch) | |
tree | 6945bb11dbb702635ae6ff1cbab590ab705379b5 /include | |
parent | 4a4d6e3faa06c246f76b96c350660f4b8ba2ea07 (diff) |
clk: clk-mux: implement remuxing on set_rate
Implement clk-mux remuxing if the CLK_SET_RATE_NO_REPARENT flag isn't
set. This implements determine_rate for clk-mux to propagate to each
parent and to choose the best one (like clk-divider this chooses the
parent which provides the fastest rate <= the requested rate).
The determine_rate op is implemented as a core helper function so that
it can be easily used by more complex clocks which incorporate muxes.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clk-provider.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index bb2d812b388c..d6057ebeabf2 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -419,6 +419,9 @@ unsigned long __clk_get_flags(struct clk *clk); bool __clk_is_prepared(struct clk *clk); bool __clk_is_enabled(struct clk *clk); struct clk *__clk_lookup(const char *name); +long __clk_mux_determine_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *best_parent_rate, + struct clk **best_parent_p); /* * FIXME clock api without lock protection |