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

authored by

Brian Masney and committed by
Vinod Koul
0484168a 8e6bb532

+6 -4
+6 -4
drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c
··· 97 97 mtk_phy_clear_bits(base + MIPITX_PLL_PWR, AD_DSI_PLL_SDM_PWR_ON); 98 98 } 99 99 100 - static long mtk_mipi_tx_pll_round_rate(struct clk_hw *hw, unsigned long rate, 101 - unsigned long *prate) 100 + static int mtk_mipi_tx_pll_determine_rate(struct clk_hw *hw, 101 + struct clk_rate_request *req) 102 102 { 103 - return clamp_val(rate, 125000000, 1600000000); 103 + req->rate = clamp_val(req->rate, 125000000, 1600000000); 104 + 105 + return 0; 104 106 } 105 107 106 108 static const struct clk_ops mtk_mipi_tx_pll_ops = { 107 109 .enable = mtk_mipi_tx_pll_enable, 108 110 .disable = mtk_mipi_tx_pll_disable, 109 - .round_rate = mtk_mipi_tx_pll_round_rate, 111 + .determine_rate = mtk_mipi_tx_pll_determine_rate, 110 112 .set_rate = mtk_mipi_tx_pll_set_rate, 111 113 .recalc_rate = mtk_mipi_tx_pll_recalc_rate, 112 114 };