diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2018-04-09 09:59:21 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-04-16 12:25:09 -0400 |
commit | 6cc1eb507855612a983f9a66a9a13cdd48e16852 (patch) | |
tree | 933d82672108eaaf4e3cbdae6ad46ff1916be6f4 | |
parent | 4ad69b80e886a845f56ce0a3d10211208693d92b (diff) |
clk: meson: honor CLK_MUX_ROUND_CLOSEST in clk_regmap
Using __clk_mux_determine_rate effectively ignores CLK_MUX_ROUND_CLOSEST
if set the related clk_regmap mux instance.
Use clk_mux_determine_rate_flags() to make sure the flag is honored.
Fixes: ea11dda9e091 ("clk: meson: add regmap clocks")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r-- | drivers/clk/meson/clk-regmap.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/clk/meson/clk-regmap.c b/drivers/clk/meson/clk-regmap.c index 3645fdb62343..ab7a3556f5b2 100644 --- a/drivers/clk/meson/clk-regmap.c +++ b/drivers/clk/meson/clk-regmap.c | |||
@@ -153,10 +153,19 @@ static int clk_regmap_mux_set_parent(struct clk_hw *hw, u8 index) | |||
153 | val << mux->shift); | 153 | val << mux->shift); |
154 | } | 154 | } |
155 | 155 | ||
156 | static int clk_regmap_mux_determine_rate(struct clk_hw *hw, | ||
157 | struct clk_rate_request *req) | ||
158 | { | ||
159 | struct clk_regmap *clk = to_clk_regmap(hw); | ||
160 | struct clk_regmap_mux_data *mux = clk_get_regmap_mux_data(clk); | ||
161 | |||
162 | return clk_mux_determine_rate_flags(hw, req, mux->flags); | ||
163 | } | ||
164 | |||
156 | const struct clk_ops clk_regmap_mux_ops = { | 165 | const struct clk_ops clk_regmap_mux_ops = { |
157 | .get_parent = clk_regmap_mux_get_parent, | 166 | .get_parent = clk_regmap_mux_get_parent, |
158 | .set_parent = clk_regmap_mux_set_parent, | 167 | .set_parent = clk_regmap_mux_set_parent, |
159 | .determine_rate = __clk_mux_determine_rate, | 168 | .determine_rate = clk_regmap_mux_determine_rate, |
160 | }; | 169 | }; |
161 | EXPORT_SYMBOL_GPL(clk_regmap_mux_ops); | 170 | EXPORT_SYMBOL_GPL(clk_regmap_mux_ops); |
162 | 171 | ||