]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: accel: bma220: add open firmware table
authorPetre Rodan <petre.rodan@subdimension.ro>
Sun, 5 Oct 2025 13:12:17 +0000 (16:12 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Oct 2025 10:59:19 +0000 (11:59 +0100)
Add open firmware entry to the spi driver.

Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/bma220_spi.c

index 761f475a59425c1ccf903f22fcfc4bbf4c3d7d66..e1c25f48d9b39f48d1f0152dec7bd476d9c3b445 100644 (file)
@@ -28,10 +28,17 @@ static const struct acpi_device_id bma220_acpi_id[] = {
 };
 MODULE_DEVICE_TABLE(spi, bma220_spi_id);
 
+static const struct of_device_id bma220_of_spi_match[] = {
+       { .compatible = "bosch,bma220" },
+       { }
+};
+MODULE_DEVICE_TABLE(of, bma220_of_spi_match);
+
 static struct spi_driver bma220_spi_driver = {
        .driver = {
                .name = "bma220_spi",
                .pm = pm_sleep_ptr(&bma220_pm_ops),
+               .of_match_table = bma220_of_spi_match,
                .acpi_match_table = bma220_acpi_id,
        },
        .probe =            bma220_spi_probe,