Re: [PATCH v5 6/6] clk: scmi: Add i.MX95 OEM extension support for SCMI clock driver

From: Sebin Francis

Date: Tue Nov 04 2025 - 07:31:32 EST


Hi Peng,

On 09/10/25 09:18, Peng Fan wrote:
- Introduce 'clk-scmi-oem.c' to support vendor-specific OEM extensions
for the SCMI clock driver, allows clean integration of vendor-specific
features without impacting the core SCMI clock driver logic.
- Extend 'clk-scmi.h' with 'scmi_clk_oem' structure and related declarations.
- Initialize OEM extensions via 'scmi_clk_oem_init()'.
- Support querying OEM-specific features and setting spread spectrum.
- Pass 'scmi_device' to 'scmi_clk_ops_select()' for OEM data access.

Signed-off-by: Peng Fan <peng.fan@xxxxxxx>

Thanks for the patch. I only have a minor comment, otherwise the patch looks good.

[...]

+
+int scmi_clk_oem_init(struct scmi_device *sdev)
+{
+ const struct scmi_handle *handle = sdev->handle;
+ int i, size = ARRAY_SIZE(info);
+
+ for (i = 0; i < size; i++) {
+ if (strcmp(handle->version->vendor_id, SCMI_IMX_VENDOR) ||
+ strcmp(handle->version->sub_vendor_id, SCMI_IMX_SUBVENDOR))
+ continue;
+ if (info[i].compatible &&
+ !of_machine_is_compatible(info[i].compatible))
+ continue;
+
+ break;
+ }
+
+ if (i < size)
+ dev_set_drvdata(&sdev->dev, (void *)info[i].data);
+
+ return 0;
+}

This above logic is tailor made for IMX is it possible to make it generic?

diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c
index bf85924d61985eb9e596419349eb883e3817de73..1ed2091e3d4a951c8662db4c94dee4b9c98b8326 100644
--- a/drivers/clk/clk-scmi.c
+++ b/drivers/clk/clk-scmi.c
@@ -14,6 +14,8 @@
#include <linux/scmi_protocol.h>
#include <asm/div64.h>
+#include "clk-scmi.h"

[...]


Thanks
Sebin