From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: Sudeep Holla <sudeep.holla@arm.com>,
Cristian Marussi <cristian.marussi@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Oleksii Moisieiev <oleksii_moisieiev@epam.com>,
Linus Walleij <linus.walleij@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-gpio@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 3/7] firmware: arm_scmi: bus: iterate the id_table
Date: Fri, 15 Dec 2023 19:56:31 +0800 [thread overview]
Message-ID: <20231215-pinctrl-scmi-v1-3-0fe35e4611f7@nxp.com> (raw)
In-Reply-To: <20231215-pinctrl-scmi-v1-0-0fe35e4611f7@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
There maybe more entries in driver->id_table, just like platform
driver of_match_table. So iterate the id_table, not only use the 1st
entry.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/arm_scmi/bus.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
index c999edd18cd3..aeb7da841b9d 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -282,14 +282,18 @@ EXPORT_SYMBOL_GPL(scmi_bus_type);
int scmi_driver_register(struct scmi_driver *driver, struct module *owner,
const char *mod_name)
{
+ const struct scmi_device_id *id_table = driver->id_table;
int retval;
if (!driver->probe)
return -EINVAL;
- retval = scmi_protocol_device_request(driver->id_table);
- if (retval)
- return retval;
+ while (id_table->name) {
+ retval = scmi_protocol_device_request(id_table);
+ if (retval)
+ return retval;
+ id_table++;
+ }
driver->driver.bus = &scmi_bus_type;
driver->driver.name = driver->name;
--
2.37.1
next prev parent reply other threads:[~2023-12-15 11:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 11:56 [PATCH 0/7] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Peng Fan (OSS)
2023-12-15 11:56 ` [PATCH 1/7] firmware: arm_scmi: introduce helper get_max_msg_size Peng Fan (OSS)
2023-12-22 15:30 ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 2/7] firmware: scmi: support compatible string Peng Fan (OSS)
2023-12-15 11:56 ` Peng Fan (OSS) [this message]
2023-12-22 15:40 ` [PATCH 3/7] firmware: arm_scmi: bus: iterate the id_table Cristian Marussi
2023-12-15 11:56 ` [PATCH 4/7] dt-bindings: firmware: arm,scmi: support pinctrl protocol Peng Fan (OSS)
2023-12-15 20:11 ` Rob Herring
2023-12-16 4:44 ` Peng Fan
2023-12-19 19:29 ` Marco Felsch
2023-12-20 1:58 ` Peng Fan
2023-12-20 12:30 ` Marco Felsch
2023-12-20 12:33 ` Peng Fan
2023-12-20 12:37 ` Marco Felsch
2023-12-21 1:31 ` Peng Fan
2023-12-20 11:42 ` Linus Walleij
2023-12-22 17:46 ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 5/7] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Peng Fan (OSS)
2023-12-22 15:58 ` Cristian Marussi
2023-12-22 16:26 ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 6/7] pinctrl: Implementation of the generic scmi-pinctrl driver Peng Fan (OSS)
2023-12-22 16:35 ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 7/7] pinctrl: scmi: implement pinctrl_scmi_imx_dt_node_to_map Peng Fan (OSS)
2023-12-22 17:43 ` Cristian Marussi
2023-12-23 2:14 ` 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=20231215-pinctrl-scmi-v1-3-0fe35e4611f7@nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=conor+dt@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleksii_moisieiev@epam.com \
--cc=peng.fan@nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=sudeep.holla@arm.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;
as well as URLs for NNTP newsgroup(s).