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: rockchip: phy-rockchip-inno-hdmi: 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.

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

authored by

Brian Masney and committed by
Vinod Koul
2f787029 0484168a

+16 -14
+16 -14
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
··· 749 749 return vco; 750 750 } 751 751 752 - static long inno_hdmi_phy_rk3228_clk_round_rate(struct clk_hw *hw, 753 - unsigned long rate, 754 - unsigned long *parent_rate) 752 + static int inno_hdmi_phy_rk3228_clk_determine_rate(struct clk_hw *hw, 753 + struct clk_rate_request *req) 755 754 { 756 755 const struct pre_pll_config *cfg = pre_pll_cfg_table; 757 756 758 - rate = (rate / 1000) * 1000; 757 + req->rate = (req->rate / 1000) * 1000; 759 758 760 759 for (; cfg->pixclock != 0; cfg++) 761 - if (cfg->pixclock == rate && !cfg->fracdiv) 760 + if (cfg->pixclock == req->rate && !cfg->fracdiv) 762 761 break; 763 762 764 763 if (cfg->pixclock == 0) 765 764 return -EINVAL; 766 765 767 - return cfg->pixclock; 766 + req->rate = cfg->pixclock; 767 + 768 + return 0; 768 769 } 769 770 770 771 static int inno_hdmi_phy_rk3228_clk_set_rate(struct clk_hw *hw, ··· 836 835 .unprepare = inno_hdmi_phy_rk3228_clk_unprepare, 837 836 .is_prepared = inno_hdmi_phy_rk3228_clk_is_prepared, 838 837 .recalc_rate = inno_hdmi_phy_rk3228_clk_recalc_rate, 839 - .round_rate = inno_hdmi_phy_rk3228_clk_round_rate, 838 + .determine_rate = inno_hdmi_phy_rk3228_clk_determine_rate, 840 839 .set_rate = inno_hdmi_phy_rk3228_clk_set_rate, 841 840 }; 842 841 ··· 907 906 return inno->pixclock; 908 907 } 909 908 910 - static long inno_hdmi_phy_rk3328_clk_round_rate(struct clk_hw *hw, 911 - unsigned long rate, 912 - unsigned long *parent_rate) 909 + static int inno_hdmi_phy_rk3328_clk_determine_rate(struct clk_hw *hw, 910 + struct clk_rate_request *req) 913 911 { 914 912 const struct pre_pll_config *cfg = pre_pll_cfg_table; 915 913 916 - rate = (rate / 1000) * 1000; 914 + req->rate = (req->rate / 1000) * 1000; 917 915 918 916 for (; cfg->pixclock != 0; cfg++) 919 - if (cfg->pixclock == rate) 917 + if (cfg->pixclock == req->rate) 920 918 break; 921 919 922 920 if (cfg->pixclock == 0) 923 921 return -EINVAL; 924 922 925 - return cfg->pixclock; 923 + req->rate = cfg->pixclock; 924 + 925 + return 0; 926 926 } 927 927 928 928 static int inno_hdmi_phy_rk3328_clk_set_rate(struct clk_hw *hw, ··· 991 989 .unprepare = inno_hdmi_phy_rk3328_clk_unprepare, 992 990 .is_prepared = inno_hdmi_phy_rk3328_clk_is_prepared, 993 991 .recalc_rate = inno_hdmi_phy_rk3328_clk_recalc_rate, 994 - .round_rate = inno_hdmi_phy_rk3328_clk_round_rate, 992 + .determine_rate = inno_hdmi_phy_rk3328_clk_determine_rate, 995 993 .set_rate = inno_hdmi_phy_rk3328_clk_set_rate, 996 994 }; 997 995