From: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
To: linus.walleij@linaro.org, brgl@kernel.org, jic23@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
morbidrsa@gmail.com, jth@kernel.org, wim@linux-watchdog.org,
linux@roeck-us.net, nathan@kernel.org, nsc@kernel.org
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, linux-serial@vger.kernel.org,
linux-watchdog@vger.kernel.org, linux-kbuild@vger.kernel.org,
Jose Javier Rodriguez Barbarin
<dev-josejavier.rodriguez@duagon.com>,
Jorge Sanjuan Garcia <dev-jorge.sanjuangarcia@duagon.com>
Subject: [PATCH 1/2] mcb: Add missing modpost build support
Date: Thu, 27 Nov 2025 16:54:51 +0100 [thread overview]
Message-ID: <20251127155452.42660-2-dev-josejavier.rodriguez@duagon.com> (raw)
In-Reply-To: <20251127155452.42660-1-dev-josejavier.rodriguez@duagon.com>
mcb bus is not prepared to autoload client drivers with the data defined on
the drivers' MODULE_DEVICE_TABLE. modpost cannot access to mcb_table_id
inside MODULE_DEVICE_TABLE so the data declared inside is ignored.
Add modpost build support for accessing to the mcb_table_id coded on device
drivers' MODULE_DEVICE_TABLE.
Reviewed-by: Jorge Sanjuan Garcia <dev-jorge.sanjuangarcia@duagon.com>
Signed-off-by: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
---
scripts/mod/devicetable-offsets.c | 3 +++
scripts/mod/file2alias.c | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c
index d3d00e85edf7..8e89d07a9337 100644
--- a/scripts/mod/devicetable-offsets.c
+++ b/scripts/mod/devicetable-offsets.c
@@ -209,6 +209,9 @@ int main(void)
DEVID_FIELD(rio_device_id, asm_did);
DEVID_FIELD(rio_device_id, asm_vid);
+ DEVID(mcb_device_id);
+ DEVID_FIELD(mcb_device_id, device);
+
DEVID(ulpi_device_id);
DEVID_FIELD(ulpi_device_id, vendor);
DEVID_FIELD(ulpi_device_id, product);
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index b3333560b95e..f02dfc186730 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1144,6 +1144,14 @@ static void do_rio_entry(struct module *mod, void *symval)
module_alias_printf(mod, true, "rapidio:%s", alias);
}
+/* Looks like: mcb:16zN */
+static void do_mcb_entry(struct module *mod, void *symval)
+{
+ DEF_FIELD(symval, mcb_device_id, device);
+
+ module_alias_printf(mod, false, "mcb:16z%03d", device);
+}
+
/* Looks like: ulpi:vNpN */
static void do_ulpi_entry(struct module *mod, void *symval)
{
@@ -1446,6 +1454,7 @@ static const struct devtable devtable[] = {
{"cpu", SIZE_cpu_feature, do_cpu_entry},
{"mei", SIZE_mei_cl_device_id, do_mei_entry},
{"rapidio", SIZE_rio_device_id, do_rio_entry},
+ {"mcb", SIZE_mcb_device_id, do_mcb_entry},
{"ulpi", SIZE_ulpi_device_id, do_ulpi_entry},
{"hdaudio", SIZE_hda_device_id, do_hda_entry},
{"sdw", SIZE_sdw_device_id, do_sdw_entry},
--
2.51.1
next prev parent reply other threads:[~2025-11-27 15:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 15:54 [PATCH 0/2] mcb: Add modpost support for processing MODULE_DEVICE_TABLE Jose Javier Rodriguez Barbarin
2025-11-27 15:54 ` Jose Javier Rodriguez Barbarin [this message]
2025-11-27 16:10 ` [PATCH 1/2] mcb: Add missing modpost build support Andy Shevchenko
2025-11-28 7:54 ` Jiri Slaby
2025-11-28 9:02 ` Andy Shevchenko
2025-11-28 10:35 ` Jose Javier Rodriguez Barbarin
2025-11-27 15:54 ` [PATCH 2/2] mcb: Remove MODULE_ALIAS from all mcb client drivers Jose Javier Rodriguez Barbarin
2025-11-27 16:12 ` Andy Shevchenko
2025-11-28 10:38 ` Jose Javier Rodriguez Barbarin
2025-11-27 16:16 ` [PATCH 0/2] mcb: Add modpost support for processing MODULE_DEVICE_TABLE Andy Shevchenko
2025-11-28 10:46 ` Jose Javier Rodriguez Barbarin
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=20251127155452.42660-2-dev-josejavier.rodriguez@duagon.com \
--to=dev-josejavier.rodriguez@duagon.com \
--cc=andy@kernel.org \
--cc=brgl@kernel.org \
--cc=dev-jorge.sanjuangarcia@duagon.com \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=jirislaby@kernel.org \
--cc=jth@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=morbidrsa@gmail.com \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=nuno.sa@analog.com \
--cc=wim@linux-watchdog.org \
/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