From: Sudeep Holla <sudeep.holla@kernel.org>
To: arm-scmi@vger.kernel.org
Cc: Sudeep Holla <sudeep.holla@kernel.org>, Peng Fan <peng.fan@oss.nxp.com>
Subject: [PATCH 4/4] firmware: arm_scmi: Skip unused performance-domain devices
Date: Fri, 02 Oct 2026 10:36:33 +0100 [thread overview]
Message-ID: <20261002-scmi_bus_fixes-v1-4-8695cbab3fe7@kernel.org> (raw)
In-Reply-To: <20261002-scmi_bus_fixes-v1-0-8695cbab3fe7@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.
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 230ee9f6f1aa..9a9a816eb119 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -571,6 +571,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",
@@ -597,10 +602,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
next prev parent reply other threads:[~2026-10-02 9:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 9:36 [PATCH 0/4] firmware: arm_scmi: Some fixes to address conflicts with fw_devlink Sudeep Holla
2026-10-02 9:36 ` [PATCH 1/4] firmware: arm_scmi: Avoid protocol devices in exclusive raw mode Sudeep Holla
2026-10-02 9:57 ` Hans de Goede
2026-10-02 9:36 ` [PATCH 2/4] firmware: arm_scmi: Skip requests for standard protocol devices Sudeep Holla
2026-10-02 10:18 ` Hans de Goede
2026-10-02 12:50 ` Sudeep Holla
2026-10-02 13:25 ` Sudeep Holla
2026-10-02 13:40 ` Hans de Goede
2026-10-02 13:56 ` Sudeep Holla
2026-10-03 13:13 ` Hans de Goede
2026-10-05 8:30 ` Sudeep Holla
2026-10-02 19:52 ` Sudeep Holla
2026-10-02 9:36 ` [PATCH 3/4] pinctrl: imx: Match the standard SCMI pinctrl device Sudeep Holla
2026-10-03 13:10 ` Peng Fan
2026-10-07 10:32 ` Linus Walleij
2026-10-07 14:22 ` Sudeep Holla
2026-10-02 9:36 ` Sudeep Holla [this message]
2026-10-03 13:15 ` [PATCH 4/4] firmware: arm_scmi: Skip unused performance-domain devices Hans de Goede
2026-10-03 13:09 ` [PATCH 0/4] firmware: arm_scmi: Some fixes to address conflicts with fw_devlink Peng Fan
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=20261002-scmi_bus_fixes-v1-4-8695cbab3fe7@kernel.org \
--to=sudeep.holla@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=peng.fan@oss.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