Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] platform: cznic: turris-omnia-mcu: Add missing MODULE_DEVICE_TABLE()
@ 2026-09-21 20:41 Ridham Khurana
  2026-10-01 11:42 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Ridham Khurana @ 2026-09-21 20:41 UTC (permalink / raw)
  To: Marek Behún
  Cc: soc, linux-arm-kernel, Arnd Bergmann, linux-kernel, Shuah Khan,
	Jori Koolstra, Brigham Campbell, linux-kernel-mentees,
	Ridham Khurana

The driver wires of_omnia_mcu_match into the i2c_driver's
.of_match_table but never exports it with MODULE_DEVICE_TABLE(), so no
module alias is generated and the module is not autoloaded when the MCU
is probed from the device tree.

Found by code inspection. Not tested on the hardware itself; with the
module built, the alias lookup

  $ modprobe -R 'of:Nsystem-controllerT(null)Ccznic,turris-omnia-mcu'

reports no match before this change and resolves to turris_omnia_mcu
after it.

Fixes: 992f1a3d4e88 ("platform: cznic: Add preliminary support for Turris Omnia MCU")
Signed-off-by: Ridham Khurana <khurana.ridham222@gmail.com>
---
Resend of the original posting, unchanged, widening Cc to the SoC tree
(drivers/platform/cznic goes upstream through it). No response to the
original posting or to the ping on Sep 9.

Build-tested on linux-next (next-20260921).

Link: https://lore.kernel.org/all/20260827113241.993923-1-khurana.ridham222@gmail.com/

 drivers/platform/cznic/turris-omnia-mcu-base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/cznic/turris-omnia-mcu-base.c b/drivers/platform/cznic/turris-omnia-mcu-base.c
index e8fc0d7b3343..f0416302a1f3 100644
--- a/drivers/platform/cznic/turris-omnia-mcu-base.c
+++ b/drivers/platform/cznic/turris-omnia-mcu-base.c
@@ -403,6 +403,7 @@ static const struct of_device_id of_omnia_mcu_match[] = {
 	{ .compatible = "cznic,turris-omnia-mcu" },
 	{}
 };
+MODULE_DEVICE_TABLE(of, of_omnia_mcu_match);
 
 static struct i2c_driver omnia_mcu_driver = {
 	.probe		= omnia_mcu_probe,
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] platform: cznic: turris-omnia-mcu: Add missing MODULE_DEVICE_TABLE()
  2026-09-21 20:41 [PATCH RESEND] platform: cznic: turris-omnia-mcu: Add missing MODULE_DEVICE_TABLE() Ridham Khurana
@ 2026-10-01 11:42 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-01 11:42 UTC (permalink / raw)
  To: Marek Behún, Ridham Khurana
  Cc: soc, linux-arm-kernel, Arnd Bergmann, linux-kernel, Shuah Khan,
	Jori Koolstra, Brigham Campbell, linux-kernel-mentees


On Mon, 21 Sep 2026 20:41:47 +0000, Ridham Khurana wrote:
> The driver wires of_omnia_mcu_match into the i2c_driver's
> .of_match_table but never exports it with MODULE_DEVICE_TABLE(), so no
> module alias is generated and the module is not autoloaded when the MCU
> is probed from the device tree.
> 
> Found by code inspection. Not tested on the hardware itself; with the
> module built, the alias lookup
> 
> [...]

Applied, thanks!

[1/1] platform: cznic: turris-omnia-mcu: Add missing MODULE_DEVICE_TABLE()
      https://git.kernel.org/soc/soc/c/59797443846bc2451c35816026bbb79d281c9f23

Best regards,
-- 
Krzysztof Kozlowski <krzk@kernel.org>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-01 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21 20:41 [PATCH RESEND] platform: cznic: turris-omnia-mcu: Add missing MODULE_DEVICE_TABLE() Ridham Khurana
2026-10-01 11:42 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox