Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: mediatek: phy-mtk-hdmi-mt8173: convert from round_rate() to determine_rate()

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.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://patch.msgid.link/20251212-phy-clk-round-rate-v3-3-beae3962f767@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Brian Masney and committed by
Vinod Koul
be426724 ebed0849

+8 -8
+8 -8
drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c
··· 118 118 usleep_range(100, 150); 119 119 } 120 120 121 - static long mtk_hdmi_pll_round_rate(struct clk_hw *hw, unsigned long rate, 122 - unsigned long *parent_rate) 121 + static int mtk_hdmi_pll_determine_rate(struct clk_hw *hw, 122 + struct clk_rate_request *req) 123 123 { 124 124 struct mtk_hdmi_phy *hdmi_phy = to_mtk_hdmi_phy(hw); 125 125 126 - hdmi_phy->pll_rate = rate; 127 - if (rate <= 74250000) 128 - *parent_rate = rate; 126 + hdmi_phy->pll_rate = req->rate; 127 + if (req->rate <= 74250000) 128 + req->best_parent_rate = req->rate; 129 129 else 130 - *parent_rate = rate / 2; 130 + req->best_parent_rate = req->rate / 2; 131 131 132 - return rate; 132 + return 0; 133 133 } 134 134 135 135 static int mtk_hdmi_pll_set_rate(struct clk_hw *hw, unsigned long rate, ··· 223 223 .prepare = mtk_hdmi_pll_prepare, 224 224 .unprepare = mtk_hdmi_pll_unprepare, 225 225 .set_rate = mtk_hdmi_pll_set_rate, 226 - .round_rate = mtk_hdmi_pll_round_rate, 226 + .determine_rate = mtk_hdmi_pll_determine_rate, 227 227 .recalc_rate = mtk_hdmi_pll_recalc_rate, 228 228 }; 229 229