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-mipi-dsi-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-5-beae3962f767@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Brian Masney and committed by
Vinod Koul
8e6bb532 7a4ce5a9

+6 -4
+6 -4
drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c
··· 237 237 mtk_phy_clear_bits(base + MIPITX_DSI_PLL_CON0, RG_DSI_MPPLL_DIV_MSK); 238 238 } 239 239 240 - static long mtk_mipi_tx_pll_round_rate(struct clk_hw *hw, unsigned long rate, 241 - unsigned long *prate) 240 + static int mtk_mipi_tx_pll_determine_rate(struct clk_hw *hw, 241 + struct clk_rate_request *req) 242 242 { 243 - return clamp_val(rate, 50000000, 1250000000); 243 + req->rate = clamp_val(req->rate, 50000000, 1250000000); 244 + 245 + return 0; 244 246 } 245 247 246 248 static const struct clk_ops mtk_mipi_tx_pll_ops = { 247 249 .prepare = mtk_mipi_tx_pll_prepare, 248 250 .unprepare = mtk_mipi_tx_pll_unprepare, 249 - .round_rate = mtk_mipi_tx_pll_round_rate, 251 + .determine_rate = mtk_mipi_tx_pll_determine_rate, 250 252 .set_rate = mtk_mipi_tx_pll_set_rate, 251 253 .recalc_rate = mtk_mipi_tx_pll_recalc_rate, 252 254 };