Re: [PATCH] driver core: hand off fwnode ownership when shared fwnode owner is rejected

From: Peng Fan

Date: Wed Sep 30 2026 - 03:10:48 EST


Hi Sudeep,

On Tue, Sep 29, 2026 at 04:56:24PM +0100, Sudeep Holla wrote:
>On Tue, Sep 29, 2026 at 09:35:21AM +0100, Sudeep Holla wrote:
...
>> Yes, but this particular device is i.MX specific issue as it should
>> have never been there. So I will discard that in any future discussion.
>> Use the SCMI pinmux driver and get rid of SCMI pinctrl-imx.
>>
>
>Anyways, I cooked up a patch that may prevent the issue with pinmux.
>See if something like below on top -next helps.
>
>Regards,
>Sudeep
>
>-->8
>diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
>index 25197197db8e..cee7cc777724 100644
>--- a/drivers/firmware/arm_scmi/bus.c
>+++ b/drivers/firmware/arm_scmi/bus.c
>@@ -60,13 +60,6 @@ static int scmi_protocol_device_request(const struct scmi_device_id *id_table)
> pr_debug("Requesting SCMI device (%s) for protocol %x\n",
> id_table->name, id_table->protocol_id);
>
>- if (IS_ENABLED(CONFIG_ARM_SCMI_RAW_MODE_SUPPORT) &&
>- !IS_ENABLED(CONFIG_ARM_SCMI_RAW_MODE_SUPPORT_COEX)) {
>- pr_warn("SCMI Raw mode active. Rejecting '%s'/0x%02X\n",
>- id_table->name, id_table->protocol_id);
>- return -EINVAL;
>- }
>-
> /*
> * Find the matching protocol rdev list and then search of any
> * existent equally named device...fails if any duplicate found.
>@@ -181,12 +174,35 @@ static void scmi_protocol_device_unrequest(const struct scmi_device_id *id_table
> }
> }
>
Move static const struct scmi_device_id scmi_std_id_table[] here to avoid
build failure.

>+static bool scmi_device_id_in_std_id_table(const struct scmi_device_id *id)
>+{
>+ for (int i = 0; scmi_std_id_table[i].name[0]; i++) {
>+ if (scmi_std_id_table[i].protocol_id == id->protocol_id &&
>+ !strcmp(scmi_std_id_table[i].name, id->name))
>+ return true;
>+ }
>+
>+ return false;
>+}
>+

Tested your patch it works well, the pinmux issue gone. A very clean fix.

If you post a formal patch, feel free to add my
Tested-by: Peng Fan <peng.fan@xxxxxxx>

Thanks a lot.

Thanks,
Peng