Skip to content

Commit 6cc1eb5

Browse files
jbrun3tbebarino
authored andcommitted
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: ea11dda ("clk: meson: add regmap clocks") Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 4ad69b8 commit 6cc1eb5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/clk/meson/clk-regmap.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,19 @@ static int clk_regmap_mux_set_parent(struct clk_hw *hw, u8 index)
153153
val << mux->shift);
154154
}
155155

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+
156165
const struct clk_ops clk_regmap_mux_ops = {
157166
.get_parent = clk_regmap_mux_get_parent,
158167
.set_parent = clk_regmap_mux_set_parent,
159-
.determine_rate = __clk_mux_determine_rate,
168+
.determine_rate = clk_regmap_mux_determine_rate,
160169
};
161170
EXPORT_SYMBOL_GPL(clk_regmap_mux_ops);
162171

0 commit comments

Comments
 (0)