[PATCH v2 2/6] iio: accel: adis16201: add OF device ID table

From: Shehryar Ahmad

Date: Sun Sep 13 2026 - 04:55:26 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 | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/iio/accel/adis16201.c b/drivers/iio/accel/adis16201.c
index 1e76a3560..2ce5c409b 100644
--- a/drivers/iio/accel/adis16201.c
+++ b/drivers/iio/accel/adis16201.c
@@ -288,6 +288,13 @@ 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", 0 },
{ },
@@ -298,6 +305,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