mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
To: Brian Masney <bmasney@redhat.com>, Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	 Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Heiko Stuebner <heiko@sntech.de>,
	Stephen Boyd	 <sboyd@kernel.org>,
	Maxime Ripard <mripard@kernel.org>
Cc: linux-clk@vger.kernel.org, linux-phy@lists.infradead.org,
	 linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	 linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-rockchip@lists.infradead.org
Subject: Re: [PATCH v2 RESEND 4/9] phy: mediatek: phy-mtk-hdmi-mt8195: convert from round_rate() to determine_rate()
Date: Tue, 18 Nov 2025 11:24:22 +0100	[thread overview]
Message-ID: <815d7300e19db00f84091f0925b2e509c4453fa0.camel@collabora.com> (raw)
In-Reply-To: <20251106-phy-clk-route-rate-v2-resend-v1-4-e2058963bfb1@redhat.com>

Hi,

On Thu, 2025-11-06 at 18:25 -0500, 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 <bmasney@redhat.com>
> ---
>  drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
> b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
> index
> b38f3ae26b3f3d8c9e73b43d86510acf6cedb471..1426a2db984d53b91125b18f772
> 5738c44f19555 100644
> --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
> +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
> @@ -418,13 +418,13 @@ static int mtk_hdmi_pll_set_rate(struct clk_hw
> *hw, unsigned long rate,
>  	return mtk_hdmi_pll_calc(hdmi_phy, hw, rate, parent_rate);
>  }
>  
> -static long mtk_hdmi_pll_round_rate(struct clk_hw *hw, unsigned long
> rate,
> -				    unsigned long *parent_rate)
> +static int mtk_hdmi_pll_determine_rate(struct clk_hw *hw,
> +				       struct clk_rate_request *req)
>  {
>  	struct mtk_hdmi_phy *hdmi_phy = to_mtk_hdmi_phy(hw);
>  
> -	hdmi_phy->pll_rate = rate;
> -	return rate;
> +	hdmi_phy->pll_rate = req->rate;
> +	return 0;
>  }
>  
>  static unsigned long mtk_hdmi_pll_recalc_rate(struct clk_hw *hw,
> @@ -439,7 +439,7 @@ static const struct clk_ops mtk_hdmi_pll_ops = {
>  	.prepare = mtk_hdmi_pll_prepare,
>  	.unprepare = mtk_hdmi_pll_unprepare,
>  	.set_rate = mtk_hdmi_pll_set_rate,
> -	.round_rate = mtk_hdmi_pll_round_rate,
> +	.determine_rate = mtk_hdmi_pll_determine_rate,
>  	.recalc_rate = mtk_hdmi_pll_recalc_rate,
>  };
>  
Tested OK on Mediatek Genio 510-EVK (MT8370) and Genio 1200-EVK
(MT8395) boards.

Tested-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>

Regards,
Louis-Alexis

  reply	other threads:[~2025-11-18 10:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 23:25 [PATCH RESEND v2 0/9] phy: convert from clk " Brian Masney
2025-11-06 23:25 ` [PATCH v2 RESEND 1/9] phy: freescale: phy-fsl-samsung-hdmi: convert from " Brian Masney
2025-11-06 23:25 ` [PATCH v2 RESEND 2/9] phy: mediatek: phy-mtk-hdmi-mt2701: " Brian Masney
2025-11-06 23:25 ` [PATCH v2 RESEND 3/9] phy: mediatek: phy-mtk-hdmi-mt8173: " Brian Masney
2025-11-06 23:25 ` [PATCH v2 RESEND 4/9] phy: mediatek: phy-mtk-hdmi-mt8195: " Brian Masney
2025-11-18 10:24   ` Louis-Alexis Eyraud [this message]
2025-11-06 23:25 ` [PATCH v2 RESEND 5/9] phy: mediatek: phy-mtk-mipi-dsi-mt8173: " Brian Masney
2025-11-06 23:25 ` [PATCH v2 RESEND 6/9] phy: mediatek: phy-mtk-mipi-dsi-mt8183: " Brian Masney
2025-11-06 23:25 ` [PATCH v2 RESEND 7/9] phy: rockchip: phy-rockchip-inno-hdmi: " Brian Masney
2025-11-06 23:25 ` [PATCH v2 RESEND 8/9] phy: rockchip: phy-rockchip-samsung-hdptx: " Brian Masney
2025-11-06 23:25 ` [PATCH v2 RESEND 9/9] phy: ti: phy-j721e-wiz: " Brian Masney
2025-11-15  0:27 ` [PATCH RESEND v2 0/9] phy: convert from clk " Brian Masney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=815d7300e19db00f84091f0925b2e509c4453fa0.camel@collabora.com \
    --to=louisalexis.eyraud@collabora.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bmasney@redhat.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=kishon@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®