Skip to contentSkip to conversation

iio: dac: ad5446: fix OF module device table

PATCH Applied Can Peng 4 participants 4 messages Jul 14 – Jul 20

Subsystems (3)
lore
Share & tools
lore

Can Peng

author
#0 lore raw

PATCH 1/1 iio: dac: ad5446: fix OF module device table

The ad5446 I2C driver exports its OF match table with MODULE_DEVICE_TABLE(OF, ...).

The device table type is used by modpost when generating module aliases, and scripts/mod/file2alias.c matches the lowercase "of" type. Using "OF" prevents the OF table from being recognized, so no OF module alias is generated for the I2C driver.

Use the lowercase "of" type so OF-based module autoloading works.

Fixes 876d94024087 ("iio: dac: ad5446: Separate I2C/SPI into different drivers")
---
 drivers/iio/dac/ad5446-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5446-i2c.c +1 -1
index 9797fc3e57a9..286695e240c3 100644
@@ -83,7 +83,7 @@ static const struct of_device_id ad5446_i2c_of_ids[] = {
 	{ .compatible = "adi,ad5622", .data = &ad5622_chip_info },
 	{ }
 };
-MODULE_DEVICE_TABLE(OF, ad5446_i2c_of_ids);
+MODULE_DEVICE_TABLE(of, ad5446_i2c_of_ids);
 
 static struct i2c_driver ad5446_i2c_driver = {
 	.driver = {
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Can Peng

The ad5446 I2C driver exports its OF match table with MODULE_DEVICE_TABLE(OF, ...).

The device table type is used by modpost when generating module aliases, and scripts/mod/file2alias.c matches the lowercase "of" type. Using "OF" prevents the OF table from being recognized, so no OF module alias is generated for the I2C driver.

Use the lowercase "of" type so OF-based module autoloading works.

Good catch!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on v1 1/1
#2 lore raw
In reply to Can Peng
Quoted 8 lines · On Tue, 14 Jul 2026 17:18:45 +0800 Can Peng <[email protected]> wrote:

The ad5446 I2C driver exports its OF match table with MODULE_DEVICE_TABLE(OF, ...).

The device table type is used by modpost when generating module aliases, and scripts/mod/file2alias.c matches the lowercase "of" type. Using "OF" prevents the OF table from being recognized, so no OF module alias is generated for the I2C driver.

Quoted 5 lines

Use the lowercase "of" type so OF-based module autoloading works.

Fixes 876d94024087 ("iio: dac: ad5446: Separate I2C/SPI into different drivers")

---

This needs a Cc: stable tag, perhaps Jonathan can add it when applying.

FWIW,

Signature · 3 lines
Kind regards

CJD
#3 lore raw
Quoted 17 lines · On Wed, 15 Jul 2026 10:11:19 +0200 Joshua Crofts <[email protected]>…
Quoted 8 lines · On Tue, 14 Jul 2026 17:18:45 +0800 Can Peng <[email protected]> wrote:

The ad5446 I2C driver exports its OF match table with MODULE_DEVICE_TABLE(OF, ...).

The device table type is used by modpost when generating module aliases, and scripts/mod/file2alias.c matches the lowercase "of" type. Using "OF" prevents the OF table from being recognized, so no OF module alias is generated for the I2C driver.

Quoted 5 lines

Use the lowercase "of" type so OF-based module autoloading works.

Fixes 876d94024087 ("iio: dac: ad5446: Separate I2C/SPI into different drivers")

---

Quoted 6 lines

This needs a Cc: stable tag, perhaps Jonathan can add it when applying.

FWIW,

Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks

Jonathan