Skip to content

Commit

Permalink
clk: stm32h7: Switch to clk_divider.determine_rate
Browse files Browse the repository at this point in the history
.determine_rate is meant to replace .round_rate in CCF in the future.
Switch over to .determine_rate now that clk_divider_ops has gained
support for that.

Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20210702225145.2643303-6-martin.blumenstingl@googlemail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Martin Blumenstingl authored and Stephen Boyd committed Aug 6, 2021
1 parent d1e40bc commit f9d6b48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/clk/clk-stm32h7.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,10 +845,10 @@ static unsigned long odf_divider_recalc_rate(struct clk_hw *hw,
return clk_divider_ops.recalc_rate(hw, parent_rate);
}

static long odf_divider_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *prate)
static int odf_divider_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
return clk_divider_ops.round_rate(hw, rate, prate);
return clk_divider_ops.determine_rate(hw, req);
}

static int odf_divider_set_rate(struct clk_hw *hw, unsigned long rate,
Expand All @@ -875,7 +875,7 @@ static int odf_divider_set_rate(struct clk_hw *hw, unsigned long rate,

static const struct clk_ops odf_divider_ops = {
.recalc_rate = odf_divider_recalc_rate,
.round_rate = odf_divider_round_rate,
.determine_rate = odf_divider_determine_rate,
.set_rate = odf_divider_set_rate,
};

Expand Down

0 comments on commit f9d6b48

Please sign in to comment.