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

drm/msm/hdmi_pll_8960: 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.

Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Patchwork: https://patchwork.freedesktop.org/patch/667982/
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-4-4a91ccf239cf@redhat.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

authored by

Brian Masney and committed by
Dmitry Baryshkov
0d7db6f3 47008535

+7 -5
+7 -5
drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
··· 373 373 return pll->pixclk; 374 374 } 375 375 376 - static long hdmi_pll_round_rate(struct clk_hw *hw, unsigned long rate, 377 - unsigned long *parent_rate) 376 + static int hdmi_pll_determine_rate(struct clk_hw *hw, 377 + struct clk_rate_request *req) 378 378 { 379 - const struct pll_rate *pll_rate = find_rate(rate); 379 + const struct pll_rate *pll_rate = find_rate(req->rate); 380 380 381 - return pll_rate->rate; 381 + req->rate = pll_rate->rate; 382 + 383 + return 0; 382 384 } 383 385 384 386 static int hdmi_pll_set_rate(struct clk_hw *hw, unsigned long rate, ··· 404 402 .enable = hdmi_pll_enable, 405 403 .disable = hdmi_pll_disable, 406 404 .recalc_rate = hdmi_pll_recalc_rate, 407 - .round_rate = hdmi_pll_round_rate, 405 + .determine_rate = hdmi_pll_determine_rate, 408 406 .set_rate = hdmi_pll_set_rate, 409 407 }; 410 408