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: freescale: phy-fsl-samsung-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.

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

authored by

Brian Masney and committed by
Vinod Koul
efc389fa 5c87da03

+8 -5
+8 -5
drivers/phy/freescale/phy-fsl-samsung-hdmi.c
··· 570 570 return fract_div_phy; 571 571 } 572 572 573 - static long fsl_samsung_hdmi_phy_clk_round_rate(struct clk_hw *hw, 574 - unsigned long rate, unsigned long *parent_rate) 573 + static int fsl_samsung_hdmi_phy_clk_determine_rate(struct clk_hw *hw, 574 + struct clk_rate_request *req) 575 575 { 576 576 struct fsl_samsung_hdmi_phy *phy = to_fsl_samsung_hdmi_phy(hw); 577 - const struct phy_config *target_settings = fsl_samsung_hdmi_phy_find_settings(phy, rate); 577 + const struct phy_config *target_settings = fsl_samsung_hdmi_phy_find_settings(phy, 578 + req->rate); 578 579 579 580 if (target_settings == NULL) 580 581 return -EINVAL; 581 582 582 583 dev_dbg(phy->dev, "round_rate, closest rate = %u\n", target_settings->pixclk); 583 - return target_settings->pixclk; 584 + req->rate = target_settings->pixclk; 585 + 586 + return 0; 584 587 } 585 588 586 589 static int fsl_samsung_hdmi_phy_clk_set_rate(struct clk_hw *hw, ··· 602 599 603 600 static const struct clk_ops phy_clk_ops = { 604 601 .recalc_rate = phy_clk_recalc_rate, 605 - .round_rate = fsl_samsung_hdmi_phy_clk_round_rate, 602 + .determine_rate = fsl_samsung_hdmi_phy_clk_determine_rate, 606 603 .set_rate = fsl_samsung_hdmi_phy_clk_set_rate, 607 604 }; 608 605