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: ti: phy-j721e-wiz: 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-9-beae3962f767@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Brian Masney and committed by
Vinod Koul
27287e3b 3d4ffdfc

+7 -4
+7 -4
drivers/phy/ti/phy-j721e-wiz.c
··· 935 935 return divider_recalc_rate(hw, parent_rate, val, div->table, 0x0, 2); 936 936 } 937 937 938 - static long wiz_clk_div_round_rate(struct clk_hw *hw, unsigned long rate, 939 - unsigned long *prate) 938 + static int wiz_clk_div_determine_rate(struct clk_hw *hw, 939 + struct clk_rate_request *req) 940 940 { 941 941 struct wiz_clk_divider *div = to_wiz_clk_div(hw); 942 942 943 - return divider_round_rate(hw, rate, prate, div->table, 2, 0x0); 943 + req->rate = divider_round_rate(hw, req->rate, &req->best_parent_rate, 944 + div->table, 2, 0x0); 945 + 946 + return 0; 944 947 } 945 948 946 949 static int wiz_clk_div_set_rate(struct clk_hw *hw, unsigned long rate, ··· 962 959 963 960 static const struct clk_ops wiz_clk_div_ops = { 964 961 .recalc_rate = wiz_clk_div_recalc_rate, 965 - .round_rate = wiz_clk_div_round_rate, 962 + .determine_rate = wiz_clk_div_determine_rate, 966 963 .set_rate = wiz_clk_div_set_rate, 967 964 }; 968 965