On 8/11/25 1:45 AM, Brian Masney wrote:
> 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 <bmas...@redhat.com>
> ---
>  drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c 
> b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> index 
> 79db57ee90d1487b51f4ddadde870a275dd7b17b..0d4e578c8c6a08aad355aa8aa5a1cf75c7d354ed
>  100644
> --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
> @@ -1869,8 +1869,8 @@ static unsigned long 
> rk_hdptx_phy_clk_recalc_rate(struct clk_hw *hw,
>       return hdptx->hw_rate;
>  }
>  
> -static long rk_hdptx_phy_clk_round_rate(struct clk_hw *hw, unsigned long 
> rate,
> -                                     unsigned long *parent_rate)
> +static int rk_hdptx_phy_clk_determine_rate(struct clk_hw *hw,
> +                                        struct clk_rate_request *req)
>  {
>       struct rk_hdptx_phy *hdptx = to_rk_hdptx_phy(hw);
>  
> @@ -1879,9 +1879,9 @@ static long rk_hdptx_phy_clk_round_rate(struct clk_hw 
> *hw, unsigned long rate,
>        * To be dropped as soon as the RK DW HDMI QP bridge driver
>        * switches to make use of phy_configure().
>        */
> -     if (!hdptx->restrict_rate_change && rate != 
> hdptx->hdmi_cfg.tmds_char_rate) {
> +     if (!hdptx->restrict_rate_change && req->rate != 
> hdptx->hdmi_cfg.tmds_char_rate) {
>               struct phy_configure_opts_hdmi hdmi = {
> -                     .tmds_char_rate = rate,
> +                     .tmds_char_rate = req->rate,
>               };
>               int ret = rk_hdptx_phy_verify_hdmi_config(hdptx, &hdmi);
>  
> @@ -1896,7 +1896,9 @@ static long rk_hdptx_phy_clk_round_rate(struct clk_hw 
> *hw, unsigned long rate,
>        * hence ensure rk_hdptx_phy_clk_set_rate() won't be invoked with
>        * a different rate argument.
>        */
> -     return hdptx->hdmi_cfg.tmds_char_rate;
> +     req->rate = hdptx->hdmi_cfg.tmds_char_rate;
> +
> +     return 0;
>  }

This LGTM now, hence

Reviewed-by: Cristian Ciocaltea <cristian.ciocal...@collabora.com>

Reply via email to