[PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP
From: Brian Masney
Date: Mon Mar 09 2026 - 10:40:30 EST
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, or the clock is capable of any rate. Add a
new flag for these type of clocks, and update the clk core so that the
determine_rate() clk op is not required when this flag is set.
Based on discussions with Stephen at Linux Plumbers Conference, he
suggested adding a flag for this particular case. So let's add a new
flag, and update the clk core so that the determine_rate() clk op is
not required when this flag is set.
This series adds the flag, some kunit tests, and updates all of the
relevant drivers under drivers/clk to use the new flag.
Once this is merged, and in Linus's tree, I can update the few remaining
clk drivers that are outside of drivers/clk via those subsystems at a
later time.
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.
To reduce the noise, I am only CCing people on their respective drivers.
Note this series depends on 3 previously-posted patches in this git pull
to Stephen for v7.1.
https://lore.kernel.org/linux-clk/aZuK4-QJCXUeSxtL@xxxxxxxxxx/
Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
---
Changes in v2:
- Renamed CLK_ROUNDING_FW_MANAGED to CLK_ROUNDING_NOOP
- In clk.c, give an error on probe if the clk implements a
determine_rate() op and has CLK_ROUNDING_NOOP set.
- Dropped renesas/rzg2l-cpg change since they plan to fill out this
driver's determine_rate op.
- Link to v1: https://lore.kernel.org/r/20260226-clk-det-rate-fw-managed-v1-0-4421dd2f6dc6@xxxxxxxxxx
---
Brian Masney (12):
clk: add new flag CLK_ROUNDING_NOOP
clk: test: add test suite for CLK_ROUNDING_NOOP flag
clk: rp1: drop determine_rate op and use CLK_ROUNDING_NOOP flag
clk: scpi: drop determine_rate op and use CLK_ROUNDING_NOOP flag
clk: hisilicon: hi3660-stub: drop determine_rate op and use CLK_ROUNDING_NOOP flag
clk: imx: scu: drop redundant init.ops variable assignment
clk: imx: scu: drop determine_rate op and use CLK_ROUNDING_NOOP flag
clk: qcom: rpm: drop determine_rate op and use CLK_ROUNDING_NOOP flag
clk: qcom: rpmh: drop determine_rate op and use CLK_ROUNDING_NOOP flag
clk: qcom: smd-rpm: drop determine_rate op and use CLK_ROUNDING_NOOP flag
clk: samsung: acpm: drop determine_rate op and use CLK_ROUNDING_NOOP flag
clk: sprd: drop determine_rate op and use CLK_ROUNDING_NOOP flag
drivers/clk/clk-rp1.c | 11 +----
drivers/clk/clk-scpi.c | 14 +-----
drivers/clk/clk.c | 31 ++++++++++--
drivers/clk/clk_test.c | 85 +++++++++++++++++++++++++++++++++
drivers/clk/hisilicon/clk-hi3660-stub.c | 14 +-----
drivers/clk/imx/clk-scu.c | 23 +--------
drivers/clk/qcom/clk-rpm.c | 16 ++-----
drivers/clk/qcom/clk-rpmh.c | 8 +---
drivers/clk/qcom/clk-smd-rpm.c | 15 +-----
drivers/clk/samsung/clk-acpm.c | 14 +-----
drivers/clk/sprd/pll.c | 7 ---
drivers/clk/sprd/pll.h | 2 +-
include/linux/clk-provider.h | 2 +
13 files changed, 129 insertions(+), 113 deletions(-)
---
base-commit: 7d6661873f6b54c75195780a40d66bad3d482d8f
change-id: 20260226-clk-det-rate-fw-managed-4b8d061f31be
prerequisite-patch-id: 59198edc95aca82a29327137ad2af82ec13295b6
prerequisite-patch-id: 8932e170649711d7a80c57784033a37faadd519b
prerequisite-patch-id: 91c7b1851c5d77e504c49ce6bf14b3f8b84e826a
Best regards,
--
Brian Masney <bmasney@xxxxxxxxxx>