]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
phy: mediatek: phy-mtk-hdmi-mt8195: convert from round_rate() to determine_rate()
authorBrian Masney <bmasney@redhat.com>
Thu, 11 Dec 2025 23:16:22 +0000 (08:16 +0900)
committerVinod Koul <vkoul@kernel.org>
Wed, 24 Dec 2025 07:23:35 +0000 (12:53 +0530)
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Tested-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://patch.msgid.link/20251212-phy-clk-round-rate-v3-4-beae3962f767@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c

index b38f3ae26b3f3d8c9e73b43d86510acf6cedb471..1426a2db984d53b91125b18f7725738c44f19555 100644 (file)
@@ -418,13 +418,13 @@ static int mtk_hdmi_pll_set_rate(struct clk_hw *hw, unsigned long rate,
        return mtk_hdmi_pll_calc(hdmi_phy, hw, rate, parent_rate);
 }
 
-static long mtk_hdmi_pll_round_rate(struct clk_hw *hw, unsigned long rate,
-                                   unsigned long *parent_rate)
+static int mtk_hdmi_pll_determine_rate(struct clk_hw *hw,
+                                      struct clk_rate_request *req)
 {
        struct mtk_hdmi_phy *hdmi_phy = to_mtk_hdmi_phy(hw);
 
-       hdmi_phy->pll_rate = rate;
-       return rate;
+       hdmi_phy->pll_rate = req->rate;
+       return 0;
 }
 
 static unsigned long mtk_hdmi_pll_recalc_rate(struct clk_hw *hw,
@@ -439,7 +439,7 @@ static const struct clk_ops mtk_hdmi_pll_ops = {
        .prepare = mtk_hdmi_pll_prepare,
        .unprepare = mtk_hdmi_pll_unprepare,
        .set_rate = mtk_hdmi_pll_set_rate,
-       .round_rate = mtk_hdmi_pll_round_rate,
+       .determine_rate = mtk_hdmi_pll_determine_rate,
        .recalc_rate = mtk_hdmi_pll_recalc_rate,
 };