]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: bmi270_i2c: Add MODULE_DEVICE_TABLE for BMI260/270
authorDerek J. Clark <derekjohn.clark@gmail.com>
Tue, 6 Jan 2026 05:45:19 +0000 (05:45 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 11 Jan 2026 13:02:19 +0000 (13:02 +0000)
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.

Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/bmi270/bmi270_i2c.c

index b909a421ad0176ee414f2f96ff09db2297586ded..b92da4e0776fa50def450fcc93eb0f6f520570ab 100644 (file)
@@ -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 = {