diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-07-29 07:25:02 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-08-19 15:27:18 -0400 |
commit | e366fdd72529c545ccf327569ee250c1673be221 (patch) | |
tree | 69139adc59e6ab101555f09544669793c385c250 /drivers/clk/clk-mux.c | |
parent | 819c1de344c5b8350bffd35be9a0fa74541292d3 (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>
Diffstat (limited to 'drivers/clk/clk-mux.c')
-rw-r--r-- | drivers/clk/clk-mux.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index b918dc370bd0..0811633fcc4d 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c | |||
@@ -104,6 +104,7 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index) | |||
104 | const struct clk_ops clk_mux_ops = { | 104 | const struct clk_ops clk_mux_ops = { |
105 | .get_parent = clk_mux_get_parent, | 105 | .get_parent = clk_mux_get_parent, |
106 | .set_parent = clk_mux_set_parent, | 106 | .set_parent = clk_mux_set_parent, |
107 | .determine_rate = __clk_mux_determine_rate, | ||
107 | }; | 108 | }; |
108 | EXPORT_SYMBOL_GPL(clk_mux_ops); | 109 | EXPORT_SYMBOL_GPL(clk_mux_ops); |
109 | 110 | ||