mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Brian Masney <bmasney@redhat.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Julien Massot <julien.massot@collabora.com>,
	Maxime Ripard <mripard@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 1/4] media: i2c: ds90ub953: convert from round_rate() to determine_rate()
Date: Wed, 22 Oct 2025 10:17:51 +0300	[thread overview]
Message-ID: <291bb807-4d7c-4d8b-bfc2-586ad7388525@ideasonboard.com> (raw)
In-Reply-To: <20251016-media-clk-round-rate-resend-v1-1-446c522fdaaf@redhat.com>

Hi,

On 16/10/2025 19:16, 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/media/i2c/ds90ub953.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

 Tomi

> 
> diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c
> index e3fc9d66970a762d284955f14db48d7105b4b8c4..c18e88c1770b4efc17cb16f540177d0f56748e36 100644
> --- a/drivers/media/i2c/ds90ub953.c
> +++ b/drivers/media/i2c/ds90ub953.c
> @@ -1023,15 +1023,17 @@ static unsigned long ub953_clkout_recalc_rate(struct clk_hw *hw,
>  	return rate;
>  }
>  
> -static long ub953_clkout_round_rate(struct clk_hw *hw, unsigned long rate,
> -				    unsigned long *parent_rate)
> +static int ub953_clkout_determine_rate(struct clk_hw *hw,
> +				       struct clk_rate_request *req)
>  {
>  	struct ub953_data *priv = container_of(hw, struct ub953_data, clkout_clk_hw);
>  	struct ub953_clkout_data clkout_data;
>  
> -	ub953_calc_clkout_params(priv, rate, &clkout_data);
> +	ub953_calc_clkout_params(priv, req->rate, &clkout_data);
> +
> +	req->rate = clkout_data.rate;
>  
> -	return clkout_data.rate;
> +	return 0;
>  }
>  
>  static int ub953_clkout_set_rate(struct clk_hw *hw, unsigned long rate,
> @@ -1050,7 +1052,7 @@ static int ub953_clkout_set_rate(struct clk_hw *hw, unsigned long rate,
>  
>  static const struct clk_ops ub953_clkout_ops = {
>  	.recalc_rate	= ub953_clkout_recalc_rate,
> -	.round_rate	= ub953_clkout_round_rate,
> +	.determine_rate = ub953_clkout_determine_rate,
>  	.set_rate	= ub953_clkout_set_rate,
>  };
>  
> 


  reply	other threads:[~2025-10-22  7:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 16:16 [PATCH RESEND 0/4] media: convert from clk " Brian Masney
2025-10-16 16:16 ` [PATCH RESEND 1/4] media: i2c: ds90ub953: convert from " Brian Masney
2025-10-22  7:17   ` Tomi Valkeinen [this message]
2025-10-16 16:16 ` [PATCH RESEND 2/4] media: i2c: max96717: " Brian Masney
2025-10-16 16:16 ` [PATCH RESEND 3/4] media: i2c: tc358746: " Brian Masney
2025-10-16 16:16 ` [PATCH RESEND 4/4] media: platform: ti: omap3isp: isp: " 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=291bb807-4d7c-4d8b-bfc2-586ad7388525@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=bmasney@redhat.com \
    --cc=julien.massot@collabora.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=sboyd@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®