[PATCH v3 3/7] iio: accel: adis16201: add OF device ID table
From: Shehryar Ahmad
Date: Wed Sep 16 2026 - 02:04:50 EST
Add of_device_id table for adis16201 and register it with
MODULE_DEVICE_TABLE() to enable device tree based matching.
Signed-off-by: Shehryar Ahmad <shehryar.amd@xxxxxxxxx>
---
drivers/iio/accel/adis16201.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/iio/accel/adis16201.c b/drivers/iio/accel/adis16201.c
index 2b76a6b3d..cbac23d4d 100644
--- a/drivers/iio/accel/adis16201.c
+++ b/drivers/iio/accel/adis16201.c
@@ -288,6 +288,12 @@ static int adis16201_probe(struct spi_device *spi)
return devm_iio_device_register(&spi->dev, indio_dev);
}
+static const struct of_device_id adis16201_of_match[] = {
+ { .compatible = "adi,adis16201" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, adis16201_of_match);
+
static const struct spi_device_id adis16201_ids[] = {
{ .name = "adis16201" },
{ }
@@ -297,6 +303,7 @@ MODULE_DEVICE_TABLE(spi, adis16201_ids);
static struct spi_driver adis16201_driver = {
.driver = {
.name = "adis16201",
+ .of_match_table = adis16201_of_match,
},
.probe = adis16201_probe,
.id_table = adis16201_ids,
--
2.43.0