Skip to contentSkip to conversation

iio: bmi270_i2c: Add MODULE_DEVICE_TABLE for BMI260/270

PATCH In review Derek J. Clark 3 participants 3 messages Jan 6 – Jan 11

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: bmi270_i2c: Add MODULE_DEVICE_TABLE for BMI260/270

Currently BMI260 & BMI270 devices do not automatically load this driver. To fix this, add missing MODULE_DEVICE_TABLE for the i2c, acpi, and of device tables so the driver will load when the hardware is detected.

Tested on my OneXPlayer F1 Pro.

---
 drivers/iio/imu/bmi270/bmi270_i2c.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/iio/imu/bmi270/bmi270_i2c.c +3 -0
index b909a421ad01..b92da4e0776f 100644
@@ -37,6 +37,7 @@ static const struct i2c_device_id bmi270_i2c_id[] = {
 	{ "bmi270", (kernel_ulong_t)&bmi270_chip_info },
 	{ }
 };
+MODULE_DEVICE_TABLE(i2c, bmi270_i2c_id);
 
 static const struct acpi_device_id bmi270_acpi_match[] = {
 	/* GPD Win Mini, Aya Neo AIR Pro, OXP Mini Pro, etc. */
@@ -45,12 +46,14 @@ static const struct acpi_device_id bmi270_acpi_match[] = {
 	{ "BMI0260",  (kernel_ulong_t)&bmi260_chip_info },
 	{ }
 };
+MODULE_DEVICE_TABLE(acpi, bmi270_acpi_match);
 
 static const struct of_device_id bmi270_of_match[] = {
 	{ .compatible = "bosch,bmi260", .data = &bmi260_chip_info },
 	{ .compatible = "bosch,bmi270", .data = &bmi270_chip_info },
 	{ }
 };
+MODULE_DEVICE_TABLE(of, bmi270_of_match);
 
 static struct i2c_driver bmi270_i2c_driver = {
 	.driver = {
Signature · 1 line
2.51.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Derek J. Clark

Currently BMI260 & BMI270 devices do not automatically load this driver. To fix this, add missing MODULE_DEVICE_TABLE for the i2c, acpi, and of device tables so the driver will load when the hardware is detected.

Tested on my OneXPlayer F1 Pro.

No objections,

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#2 lore raw
Quoted 11 lines · On Wed, 7 Jan 2026 23:04:53 +0200 Andy Shevchenko…
Quoted 6 lines · Derek J. Clark

Currently BMI260 & BMI270 devices do not automatically load this driver. To fix this, add missing MODULE_DEVICE_TABLE for the i2c, acpi, and of device tables so the driver will load when the hardware is detected.

Tested on my OneXPlayer F1 Pro.

No objections,

Applied to the togreg branch of iio.git and pushed out as testing.

These are always a bit of a corner case wrt to whether we should treat them as a fix. It never worked though so I'm not going to rush them in. If you want it applied to stable kernels, I'm fine with a request for that after the next merge window.

Thanks,

Jonathan