[PATCH 2/2] iio: accel: adis16209: Add OF device ID table
From: Shehryar Ahmad
Date: Fri Oct 16 2026 - 07:49:37 EST
Add of_device_id table for adis16209 and register it with
MODULE_DEVICE_TABLE() to enable device tree based matching.
Signed-off-by: Shehryar Ahmad <shehryar.amd@xxxxxxxxx>
---
drivers/iio/accel/adis16209.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/iio/accel/adis16209.c b/drivers/iio/accel/adis16209.c
index 07a682d68..2dd140dd5 100644
--- a/drivers/iio/accel/adis16209.c
+++ b/drivers/iio/accel/adis16209.c
@@ -298,6 +298,12 @@ static int adis16209_probe(struct spi_device *spi)
return devm_iio_device_register(&spi->dev, indio_dev);
}
+static const struct of_device_id adis16209_of_match[] = {
+ { .compatible = "adi,adis16209" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, adis16209_of_match);
+
static const struct spi_device_id adis16209_ids[] = {
{ .name = "adis16209" },
{ }
@@ -307,6 +313,7 @@ MODULE_DEVICE_TABLE(spi, adis16209_ids);
static struct spi_driver adis16209_driver = {
.driver = {
.name = "adis16209",
+ .of_match_table = adis16209_of_match,
},
.probe = adis16209_probe,
.id_table = adis16209_ids,
--
2.56.0