From: Brian Masney <bmasney@redhat.com>
To: Abel Vesa <abelvesa@kernel.org>, Peng Fan <peng.fan@nxp.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Maxime Ripard <mripard@kernel.org>
Cc: linux-clk@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Brian Masney <bmasney@redhat.com>
Subject: [PATCH 04/13] clk: imx: cpu: convert from round_rate() to determine_rate()
Date: Thu, 10 Jul 2025 17:10:36 -0400 [thread overview]
Message-ID: <20250710-clk-imx-round-rate-v1-4-5726f98e6d8d@redhat.com> (raw)
In-Reply-To: <20250710-clk-imx-round-rate-v1-0-5726f98e6d8d@redhat.com>
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/clk/imx/clk-cpu.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/imx/clk-cpu.c b/drivers/clk/imx/clk-cpu.c
index cb6ca4cf0535bab2d9d519c46a84564711aaf209..43637cb61693845f54b3bd1b92f548b43bc30caa 100644
--- a/drivers/clk/imx/clk-cpu.c
+++ b/drivers/clk/imx/clk-cpu.c
@@ -30,12 +30,14 @@ static unsigned long clk_cpu_recalc_rate(struct clk_hw *hw,
return clk_get_rate(cpu->div);
}
-static long clk_cpu_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *prate)
+static int clk_cpu_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
struct clk_cpu *cpu = to_clk_cpu(hw);
- return clk_round_rate(cpu->pll, rate);
+ req->rate = clk_round_rate(cpu->pll, req->rate);
+
+ return 0;
}
static int clk_cpu_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -66,7 +68,7 @@ static int clk_cpu_set_rate(struct clk_hw *hw, unsigned long rate,
static const struct clk_ops clk_cpu_ops = {
.recalc_rate = clk_cpu_recalc_rate,
- .round_rate = clk_cpu_round_rate,
+ .determine_rate = clk_cpu_determine_rate,
.set_rate = clk_cpu_set_rate,
};
--
2.50.0
next prev parent reply other threads:[~2025-07-10 21:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 21:10 [PATCH 00/13] clk: imx: convert from clk round_rate() to determine_rate() Brian Masney
2025-07-10 21:10 ` [PATCH 01/13] clk: imx: composite-8m: remove round_rate() in favor of determine_rate() Brian Masney
2025-07-24 22:16 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 02/13] clk: imx: composite-93: " Brian Masney
2025-07-24 22:16 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 03/13] clk: imx: busy: convert from round_rate() to determine_rate() Brian Masney
2025-07-24 22:16 ` Stephen Boyd
2025-07-10 21:10 ` Brian Masney [this message]
2025-07-24 22:16 ` [PATCH 04/13] clk: imx: cpu: " Stephen Boyd
2025-07-10 21:10 ` [PATCH 05/13] clk: imx: fixup-div: " Brian Masney
2025-07-24 22:16 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 06/13] clk: imx: fracn-gppll: " Brian Masney
2025-07-24 22:15 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 07/13] clk: imx: frac-pll: " Brian Masney
2025-07-24 22:15 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 08/13] clk: imx: pfd: " Brian Masney
2025-07-24 22:15 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 09/13] clk: imx: pll14xx: " Brian Masney
2025-07-24 22:15 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 10/13] clk: imx: pllv2: " Brian Masney
2025-07-24 22:15 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 11/13] clk: imx: pllv3: " Brian Masney
2025-07-24 22:15 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 12/13] clk: imx: pllv4: " Brian Masney
2025-07-24 22:15 ` Stephen Boyd
2025-07-10 21:10 ` [PATCH 13/13] clk: imx: scu: " Brian Masney
2025-07-24 22:15 ` Stephen Boyd
2025-07-15 6:57 ` [PATCH 00/13] clk: imx: convert from clk " Peng Fan
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=20250710-clk-imx-round-rate-v1-4-5726f98e6d8d@redhat.com \
--to=bmasney@redhat.com \
--cc=abelvesa@kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).