From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
To: Paul Walmsley <paul@pwsan.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@armlinux.org.uk>,
Andreas Kemnade <andreas@kemnade.info>,
Kevin Hilman <khilman@baylibre.com>,
Roger Quadros <rogerq@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Liviu Dudau <liviu.dudau@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Maxime Ripard <mripard@kernel.org>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney@redhat.com>
Cc: linux-clk@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Brian Masney <bmasney@redhat.com>
Subject: Re: [PATCH 1/3] ARM: OMAP1: clock: convert from round_rate() to determine_rate()
Date: Sun, 13 Jul 2025 22:35:06 +0200 [thread overview]
Message-ID: <6172340.lOV4Wx5bFT@dell> (raw)
In-Reply-To: <20250710-arm32-clk-round-rate-v1-1-a9146b77aca9@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2213 bytes --]
On Friday, 11 July 2025 01:42:16 CEST 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>
Acked-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> ---
> arch/arm/mach-omap1/clock.c | 19 +++++++++++++------
> 1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
> index 83381e23fab983522ca01b8feffb861b02fee730..afc6404f62d39c4ddbac6f1ee04d889be6c47186 100644
> --- a/arch/arm/mach-omap1/clock.c
> +++ b/arch/arm/mach-omap1/clock.c
> @@ -705,14 +705,21 @@ static unsigned long omap1_clk_recalc_rate(struct clk_hw *hw, unsigned long p_ra
> return clk->rate;
> }
>
> -static long omap1_clk_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *p_rate)
> +static int omap1_clk_determine_rate(struct clk_hw *hw,
> + struct clk_rate_request *req)
> {
> struct omap1_clk *clk = to_omap1_clk(hw);
>
> - if (clk->round_rate != NULL)
> - return clk->round_rate(clk, rate, p_rate);
> + if (clk->round_rate != NULL) {
> + req->rate = clk->round_rate(clk, req->rate,
> + &req->best_parent_rate);
>
> - return omap1_clk_recalc_rate(hw, *p_rate);
> + return 0;
> + }
> +
> + req->rate = omap1_clk_recalc_rate(hw, req->best_parent_rate);
> +
> + return 0;
> }
>
> static int omap1_clk_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long p_rate)
> @@ -771,7 +778,7 @@ const struct clk_ops omap1_clk_gate_ops = {
>
> const struct clk_ops omap1_clk_rate_ops = {
> .recalc_rate = omap1_clk_recalc_rate,
> - .round_rate = omap1_clk_round_rate,
> + .determine_rate = omap1_clk_determine_rate,
> .set_rate = omap1_clk_set_rate,
> .init = omap1_clk_init_op,
> };
> @@ -784,7 +791,7 @@ const struct clk_ops omap1_clk_full_ops = {
> .disable_unused = omap1_clk_disable_unused,
> #endif
> .recalc_rate = omap1_clk_recalc_rate,
> - .round_rate = omap1_clk_round_rate,
> + .determine_rate = omap1_clk_determine_rate,
> .set_rate = omap1_clk_set_rate,
> .init = omap1_clk_init_op,
> };
>
>
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-07-13 20:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 23:42 [PATCH 0/3] ARM: convert from clk round_rate() to determine_rate() Brian Masney
2025-07-10 23:42 ` [PATCH 1/3] ARM: OMAP1: clock: convert from " Brian Masney
2025-07-13 20:35 ` Janusz Krzysztofik [this message]
2025-07-10 23:42 ` [PATCH 2/3] ARM: OMAP2+: " Brian Masney
2025-07-10 23:42 ` [PATCH 3/3] ARM: versatile: " Brian Masney
2025-07-11 8:51 ` Sudeep Holla
2025-07-11 17:45 ` Linus Walleij
2025-10-01 6:14 ` Linus Walleij
2025-09-14 12:04 ` [PATCH 0/3] ARM: convert from clk " Brian Masney
2025-09-15 23:21 ` (subset) " Kevin Hilman
2025-09-15 23:24 ` Kevin Hilman
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=6172340.lOV4Wx5bFT@dell \
--to=jmkrzyszt@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=bmasney@redhat.com \
--cc=khilman@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=liviu.dudau@arm.com \
--cc=lpieralisi@kernel.org \
--cc=mripard@kernel.org \
--cc=paul@pwsan.com \
--cc=rogerq@kernel.org \
--cc=sboyd@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=tony@atomide.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.