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-samsung-hdptx: 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: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
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-8-beae3962f767@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Brian Masney and committed by
Vinod Koul
3d4ffdfc 2f787029

+9 -6
+9 -6
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
··· 1838 1838 return hdptx->hw_rate; 1839 1839 } 1840 1840 1841 - static long rk_hdptx_phy_clk_round_rate(struct clk_hw *hw, unsigned long rate, 1842 - unsigned long *parent_rate) 1841 + static int rk_hdptx_phy_clk_determine_rate(struct clk_hw *hw, 1842 + struct clk_rate_request *req) 1843 1843 { 1844 1844 struct rk_hdptx_phy *hdptx = to_rk_hdptx_phy(hw); 1845 1845 ··· 1848 1848 * To be dropped as soon as the RK DW HDMI QP bridge driver 1849 1849 * switches to make use of phy_configure(). 1850 1850 */ 1851 - if (!hdptx->restrict_rate_change && rate != hdptx->hdmi_cfg.tmds_char_rate) { 1851 + if (!hdptx->restrict_rate_change && req->rate != hdptx->hdmi_cfg.tmds_char_rate) { 1852 1852 struct phy_configure_opts_hdmi hdmi = { 1853 - .tmds_char_rate = rate, 1853 + .tmds_char_rate = req->rate, 1854 1854 }; 1855 1855 int ret = rk_hdptx_phy_verify_hdmi_config(hdptx, &hdmi); 1856 1856 ··· 1865 1865 * hence ensure rk_hdptx_phy_clk_set_rate() won't be invoked with 1866 1866 * a different rate argument. 1867 1867 */ 1868 - return DIV_ROUND_CLOSEST_ULL(hdptx->hdmi_cfg.tmds_char_rate * 8, hdptx->hdmi_cfg.bpc); 1868 + req->rate = DIV_ROUND_CLOSEST_ULL(hdptx->hdmi_cfg.tmds_char_rate * 8, 1869 + hdptx->hdmi_cfg.bpc); 1870 + 1871 + return 0; 1869 1872 } 1870 1873 1871 1874 static int rk_hdptx_phy_clk_set_rate(struct clk_hw *hw, unsigned long rate, ··· 1898 1895 .prepare = rk_hdptx_phy_clk_prepare, 1899 1896 .unprepare = rk_hdptx_phy_clk_unprepare, 1900 1897 .recalc_rate = rk_hdptx_phy_clk_recalc_rate, 1901 - .round_rate = rk_hdptx_phy_clk_round_rate, 1898 + .determine_rate = rk_hdptx_phy_clk_determine_rate, 1902 1899 .set_rate = rk_hdptx_phy_clk_set_rate, 1903 1900 }; 1904 1901