From: Sudeep Holla <sudeep.holla@kernel.org>
To: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Sudeep Holla <sudeep.holla@kernel.org>,
Cristian Marussi <cristian.marussi@arm.com>,
Peng Fan <peng.fan@nxp.com>,
Hans de Goede <johannes.goede@oss.qualcomm.com>,
imx@lists.linux.dev, linux-gpio@vger.kernel.org
Subject: [PATCH v2 4/4] firmware: arm_scmi: Skip unused performance-domain devices
Date: Mon, 05 Oct 2026 10:04:35 +0100 [thread overview]
Message-ID: <20261005-scmi_bus_fixes-v2-4-34a51338875a@kernel.org> (raw)
In-Reply-To: <20261005-scmi_bus_fixes-v2-0-34a51338875a@kernel.org>
The SCMI performance-domain driver uses the named "perf" device only
when its firmware node declares #power-domain-cells. Otherwise its
probe returns without registering a provider, while the same SCMI
protocol may still be needed by the separate "cpufreq" device.
Do not create the "perf" device when the provider property is absent.
This avoids an unnecessary device claiming the protocol fwnode and
leaves cpufreq creation unchanged. Update the device-creation contract
to document that an intentionally omitted named device returns NULL.
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Tested-by: Peng Fan <peng.fan@nxp.com> #i.MX95 EVK
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
---
drivers/firmware/arm_scmi/bus.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
index 6be31b5121b3..b235d322330b 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -570,6 +570,11 @@ _scmi_device_create(struct fwnode_handle *fwnode, struct device *parent,
{
struct scmi_device *sdev;
+ /* The perf device is only needed when it provides power domains. */
+ if (protocol == SCMI_PROTOCOL_PERF && !strcmp(name, "perf") &&
+ !fwnode_property_present(fwnode, "#power-domain-cells"))
+ return NULL;
+
sdev = __scmi_device_create(fwnode, parent, protocol, name);
if (!sdev)
pr_err("(%pfwf) Failed to create device - protocol 0x%x (%s)\n",
@@ -596,10 +601,8 @@ _scmi_device_create(struct fwnode_handle *fwnode, struct device *parent,
*
* Return: The created device (or one of them if @name was NOT provided and
* multiple devices were created) or NULL if no device was created;
- * note that NULL indicates an error ONLY in case a specific @name
- * was provided: when @name param was not provided, a number of devices
- * could have been potentially created for a whole protocol, unless no
- * device was found to have been requested for that specific protocol.
+ * note that NULL can also indicate that a named device is not needed
+ * for this fwnode, or that no device was requested when @name is NULL.
*/
struct scmi_device *scmi_device_create(struct fwnode_handle *fwnode,
struct device *parent, int protocol,
--
2.43.0
prev parent reply other threads:[~2026-10-05 9:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 9:04 [PATCH v2 0/4] firmware: arm_scmi: Some fixes to address conflicts with fw_devlink Sudeep Holla
2026-10-05 9:04 ` [PATCH v2 1/4] firmware: arm_scmi: Avoid protocol devices in exclusive raw mode Sudeep Holla
2026-10-05 9:04 ` [PATCH v2 2/4] firmware: arm_scmi: Skip requests for standard protocol devices Sudeep Holla
2026-10-05 9:18 ` sashiko-bot
2026-10-05 9:31 ` Sudeep Holla
2026-10-05 9:04 ` [PATCH v2 3/4] pinctrl: imx: Match the standard SCMI pinctrl device Sudeep Holla
2026-10-07 11:17 ` Linus Walleij
2026-10-05 9:04 ` Sudeep Holla [this message]
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=20261005-scmi_bus_fixes-v2-4-34a51338875a@kernel.org \
--to=sudeep.holla@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=imx@lists.linux.dev \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=peng.fan@nxp.com \
/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