* [PATCH v3 00/15] clk: introduce clk_determine_rate_noop() and update drivers to use it
@ 2026-05-06 0:48 Brian Masney
2026-05-06 0:48 ` [PATCH v3 02/15] clk: add clk_determine_rate_noop() Brian Masney
2026-05-06 0:49 ` [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop() Brian Masney
0 siblings, 2 replies; 6+ messages in thread
From: Brian Masney @ 2026-05-06 0:48 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Brian Masney
Cc: linux-clk, linux-kernel, Peng Fan, Abel Vesa, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, imx,
linux-arm-kernel, Anson Huang, Bjorn Andersson,
Geert Uytterhoeven, Andrea della Porta, Tudor Ambarus,
Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
Alim Akhtar, Sudeep Holla, Cristian Marussi, Orson Zhai,
Baolin Wang, Chunyan Zhang, Chun-Kuang Hu, Philipp Zabel,
Chunfeng Yun, Vinod Koul, Neil Armstrong, Matthias Brugger,
AngeloGioacchino Del Regno, Ulf Hansson, linux-arm-msm,
linux-renesas-soc, linux-samsung-soc, arm-scmi, dri-devel,
linux-mediatek, linux-phy, linux-pm
There are some clocks where the determine_rate clk op is just an empty
function that returns 0. This can be either because the rounding is
managed by the firmware/hardware, or the clock is capable of any rate.
Let's add a new new shared function to clk.c named
clk_determine_rate_noop(), and update all of the drivers that have an
empty determine_rate() ops to use this new shared function.
The first patch in this series also includes a minor cleanup to
drivers/clk/imx/clk-scu.c. I included it as the first patch so it
doesn't get buried in the middle of this series. I change this same
driver later in the series to use clk_determine_rate_noop().
Changes since v2:
https://lore.kernel.org/all/20260309-clk-det-rate-fw-managed-v2-0-c48ef5a3100a@redhat.com/
- Dropped the NOOP flag and just use a dedicated noop function.
Merge Strategy
--------------
All of this needs to be directly merged by Stephen as one series into
his tree. Subsystem maintainers: please leave a Reviewed-by or Acked-by
for Stephen. To reduce the noise, I am only CCing people on their
respective drivers.
Since there's only 3 drivers outside of drivers/clk that need to be
updated, I included them in this same series for completeness. These
should go through Stephen's tree as well.
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
Brian Masney (15):
clk: imx: scu: drop redundant init.ops variable assignment
clk: add clk_determine_rate_noop()
clk: hisilicon: hi3660-stub: use clk_determine_rate_noop()
clk: imx: scu: use clk_determine_rate_noop()
clk: qcom: rpm: use clk_determine_rate_noop()
clk: qcom: rpmh: use clk_determine_rate_noop()
clk: qcom: smd-rpm: use clk_determine_rate_noop()
clk: renesas: rzg2l-cpg: use clk_determine_rate_noop()
clk: rp1: use clk_determine_rate_noop()
clk: samsung: acpm: use clk_determine_rate_noop()
clk: scpi: use clk_determine_rate_noop()
clk: sprd: use clk_determine_rate_noop()
phy: mediatek: phy-mtk-hdmi-mt2701: use clk_determine_rate_noop()
pmdomain: mediatek: airoha: use clk_determine_rate_noop()
pmdomain: mediatek: mtk-mfg: use clk_determine_rate_noop()
drivers/clk/clk-rp1.c | 8 +-------
drivers/clk/clk-scpi.c | 14 +-------------
drivers/clk/clk.c | 18 ++++++++++++++++++
drivers/clk/hisilicon/clk-hi3660-stub.c | 12 +-----------
drivers/clk/imx/clk-scu.c | 24 +++---------------------
drivers/clk/qcom/clk-rpm.c | 15 ++-------------
drivers/clk/qcom/clk-rpmh.c | 8 +-------
drivers/clk/qcom/clk-smd-rpm.c | 13 +------------
drivers/clk/renesas/rzg2l-cpg.c | 8 +-------
drivers/clk/samsung/clk-acpm.c | 14 +-------------
drivers/clk/sprd/pll.c | 8 +-------
drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c | 8 +-------
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c | 8 +-------
drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c | 23 ++---------------------
include/linux/clk-provider.h | 1 +
15 files changed, 36 insertions(+), 146 deletions(-)
---
base-commit: 4cd074ae20bbcc293bbbce9163abe99d68ae6ae0
change-id: 20260505-clk-determine-rate-noop-17a544f78018
Best regards,
--
Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 02/15] clk: add clk_determine_rate_noop()
2026-05-06 0:48 [PATCH v3 00/15] clk: introduce clk_determine_rate_noop() and update drivers to use it Brian Masney
@ 2026-05-06 0:48 ` Brian Masney
2026-05-06 0:49 ` [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop() Brian Masney
1 sibling, 0 replies; 6+ messages in thread
From: Brian Masney @ 2026-05-06 0:48 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Brian Masney
Cc: linux-clk, linux-kernel, Abel Vesa, Peng Fan, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Anson Huang,
Bjorn Andersson, Geert Uytterhoeven, Andrea della Porta,
Tudor Ambarus, Krzysztof Kozlowski, Sylwester Nawrocki,
Chanwoo Choi, Alim Akhtar, Sudeep Holla, Cristian Marussi,
Orson Zhai, Baolin Wang, Chunyan Zhang, Chun-Kuang Hu,
Philipp Zabel, Chunfeng Yun, Vinod Koul, Neil Armstrong,
Matthias Brugger, AngeloGioacchino Del Regno, Ulf Hansson, imx,
linux-arm-kernel, linux-arm-msm, linux-renesas-soc,
linux-samsung-soc, arm-scmi, dri-devel, linux-mediatek, linux-phy,
linux-pm
Add a new helper clk_determine_rate_noop() that's for clocks where the
rate rounding is handled by the firmware/hardware, or the clock is
capable of any rate. The requested rate is passed through unchanged,
and the actual rate will be learned via recalc_rate() after the rate
is set.
This shared helper will be used to get rid of the driver-specific empty
determine rate implementations that are present in the tree.
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
To: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>
To: Brian Masney <bmasney@redhat.com>
To: Abel Vesa <abelvesa@kernel.org>
To: Peng Fan <peng.fan@nxp.com>
To: Frank Li <Frank.Li@nxp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
To: Pengutronix Kernel Team <kernel@pengutronix.de>
To: Fabio Estevam <festevam@gmail.com>
To: Anson Huang <anson.huang@nxp.com>
To: Bjorn Andersson <andersson@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
To: Andrea della Porta <andrea.porta@suse.com>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
To: Alim Akhtar <alim.akhtar@samsung.com>
To: Sudeep Holla <sudeep.holla@kernel.org>
To: Cristian Marussi <cristian.marussi@arm.com>
To: Orson Zhai <orsonzhai@gmail.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Chunyan Zhang <zhang.lyra@gmail.com>
To: Chun-Kuang Hu <chunkuang.hu@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Vinod Koul <vkoul@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Matthias Brugger <matthias.bgg@gmail.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Ulf Hansson <ulfh@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: arm-scmi@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-phy@lists.infradead.org
Cc: linux-pm@vger.kernel.org
---
drivers/clk/clk.c | 18 ++++++++++++++++++
include/linux/clk-provider.h | 1 +
2 files changed, 19 insertions(+)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 048adfa86a5d..956e147f4d4e 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -882,6 +882,24 @@ int clk_hw_determine_rate_no_reparent(struct clk_hw *hw,
}
EXPORT_SYMBOL_GPL(clk_hw_determine_rate_no_reparent);
+/**
+ * clk_determine_rate_noop - clk_ops::determine_rate noop implementation
+ * @hw: clk to determine rate on
+ * @req: rate request
+ *
+ * Noop determine rate for clocks where the rate rounding is handled by the
+ * firmware/hardware, or the clock is capable of any rate. The requested rate is
+ * passed through unchanged, and the actual rate will be learned via
+ * recalc_rate() after the rate is set.
+ *
+ * Returns: 0 always
+ */
+int clk_determine_rate_noop(struct clk_hw *hw, struct clk_rate_request *req)
+{
+ return 0;
+}
+EXPORT_SYMBOL_GPL(clk_determine_rate_noop);
+
/*** clk api ***/
static void clk_core_rate_unprotect(struct clk_core *core)
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index b01a38fef8cf..334b9211a157 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -1431,6 +1431,7 @@ int clk_mux_determine_rate_flags(struct clk_hw *hw,
unsigned long flags);
int clk_hw_determine_rate_no_reparent(struct clk_hw *hw,
struct clk_rate_request *req);
+int clk_determine_rate_noop(struct clk_hw *hw, struct clk_rate_request *req);
void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent);
void clk_hw_get_rate_range(struct clk_hw *hw, unsigned long *min_rate,
unsigned long *max_rate);
--
2.54.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop()
2026-05-06 0:48 [PATCH v3 00/15] clk: introduce clk_determine_rate_noop() and update drivers to use it Brian Masney
2026-05-06 0:48 ` [PATCH v3 02/15] clk: add clk_determine_rate_noop() Brian Masney
@ 2026-05-06 0:49 ` Brian Masney
2026-05-06 11:55 ` Tudor Ambarus
2026-05-06 13:47 ` Krzysztof Kozlowski
1 sibling, 2 replies; 6+ messages in thread
From: Brian Masney @ 2026-05-06 0:49 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Brian Masney
Cc: linux-clk, linux-kernel, Tudor Ambarus, Krzysztof Kozlowski,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, linux-samsung-soc
Drop the driver-specific empty determine_rate() function and use the new
shared clk_determine_rate_noop() helper.
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
To: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
To: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Brian Masney <bmasney@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-clk@vger.kernel.org
---
drivers/clk/samsung/clk-acpm.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/clk/samsung/clk-acpm.c b/drivers/clk/samsung/clk-acpm.c
index d8944160793a..7a07bfd4948b 100644
--- a/drivers/clk/samsung/clk-acpm.c
+++ b/drivers/clk/samsung/clk-acpm.c
@@ -72,18 +72,6 @@ static unsigned long acpm_clk_recalc_rate(struct clk_hw *hw,
clk->mbox_chan_id, clk->id);
}
-static int acpm_clk_determine_rate(struct clk_hw *hw,
- struct clk_rate_request *req)
-{
- /*
- * We can't figure out what rate it will be, so just return the
- * rate back to the caller. acpm_clk_recalc_rate() will be called
- * after the rate is set and we'll know what rate the clock is
- * running at then.
- */
- return 0;
-}
-
static int acpm_clk_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
@@ -95,7 +83,7 @@ static int acpm_clk_set_rate(struct clk_hw *hw, unsigned long rate,
static const struct clk_ops acpm_clk_ops = {
.recalc_rate = acpm_clk_recalc_rate,
- .determine_rate = acpm_clk_determine_rate,
+ .determine_rate = clk_determine_rate_noop,
.set_rate = acpm_clk_set_rate,
};
--
2.54.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop()
2026-05-06 0:49 ` [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop() Brian Masney
@ 2026-05-06 11:55 ` Tudor Ambarus
2026-05-06 13:47 ` Krzysztof Kozlowski
1 sibling, 0 replies; 6+ messages in thread
From: Tudor Ambarus @ 2026-05-06 11:55 UTC (permalink / raw)
To: Brian Masney, Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Krzysztof Kozlowski, Sylwester Nawrocki,
Chanwoo Choi, Alim Akhtar, linux-samsung-soc, Juan Yescas,
Peter Griffin, André Draszik
Acked-by: Tudor Ambarus <tudor.ambarus@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop()
2026-05-06 0:49 ` [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop() Brian Masney
2026-05-06 11:55 ` Tudor Ambarus
@ 2026-05-06 13:47 ` Krzysztof Kozlowski
2026-05-06 14:34 ` Brian Masney
1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-05-06 13:47 UTC (permalink / raw)
To: Brian Masney, Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Tudor Ambarus, Sylwester Nawrocki,
Chanwoo Choi, Alim Akhtar, linux-samsung-soc
On 06/05/2026 02:49, Brian Masney wrote:
> Drop the driver-specific empty determine_rate() function and use the new
> shared clk_determine_rate_noop() helper.
<form letter>
This is a friendly reminder during the review process.
It looks like you received a tag and forgot to add it.
...
If a tag was not added on purpose, please state in the patch changelog
or cover letter why and what changed.
</form letter>
Last part is important.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop()
2026-05-06 13:47 ` Krzysztof Kozlowski
@ 2026-05-06 14:34 ` Brian Masney
0 siblings, 0 replies; 6+ messages in thread
From: Brian Masney @ 2026-05-06 14:34 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Michael Turquette, Stephen Boyd, linux-clk, linux-kernel,
Tudor Ambarus, Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar,
linux-samsung-soc
Hi Krzysztof,
On Wed, May 06, 2026 at 03:47:33PM +0200, Krzysztof Kozlowski wrote:
> On 06/05/2026 02:49, Brian Masney wrote:
> > Drop the driver-specific empty determine_rate() function and use the new
> > shared clk_determine_rate_noop() helper.
>
> <form letter>
> This is a friendly reminder during the review process.
>
> It looks like you received a tag and forgot to add it.
>
> ...
>
> If a tag was not added on purpose, please state in the patch changelog
> or cover letter why and what changed.
> </form letter>
>
> Last part is important.
Sorry I didn't mention that I dropped the existing tags on the cover letter.
I felt that it changed enough in this version that I didn't feel
comfortable preserving the existing tags. The overall change is very simple,
but I didn't want to misrepresent the new work was reviewed by folks.
Brian
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-06 14:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 0:48 [PATCH v3 00/15] clk: introduce clk_determine_rate_noop() and update drivers to use it Brian Masney
2026-05-06 0:48 ` [PATCH v3 02/15] clk: add clk_determine_rate_noop() Brian Masney
2026-05-06 0:49 ` [PATCH v3 10/15] clk: samsung: acpm: use clk_determine_rate_noop() Brian Masney
2026-05-06 11:55 ` Tudor Ambarus
2026-05-06 13:47 ` Krzysztof Kozlowski
2026-05-06 14:34 ` Brian Masney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox