From: Shehryar Ahmad <shehryar.amd@gmail.com>
To: jic23@kernel.org
Cc: nuno.sa@analog.com, Michael.Hennerich@analog.com,
dlechner@baylibre.com, andy@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
gregkh@linuxfoundation.org, linux@analog.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev, devicetree@vger.kernel.org,
Shehryar Ahmad <shehryar.amd@gmail.com>
Subject: [PATCH v2 2/6] iio: accel: adis16201: add OF device ID table
Date: Sun, 13 Sep 2026 13:53:03 +0500 [thread overview]
Message-ID: <20260913085307.13846-3-shehryar.amd@gmail.com> (raw)
In-Reply-To: <20260913085307.13846-1-shehryar.amd@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2026-09-13 8:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 8:53 [PATCH v2 0/6] iio: accel: merge adis16203 into mainline adis16201 and remove from staging Shehryar Ahmad
2026-09-13 8:53 ` [PATCH v2 1/6] iio: accel: adis16201: add SPI device ID table Shehryar Ahmad
2026-09-13 8:53 ` Shehryar Ahmad [this message]
2026-09-13 8:53 ` [PATCH v2 3/6] iio: accel: adis16201: prepare driver to support additional parts Shehryar Ahmad
2026-09-13 8:53 ` [PATCH v2 4/6] iio: accel: adis16201: add ADIS16203 support Shehryar Ahmad
2026-09-13 8:53 ` [PATCH v2 5/6] staging: iio: accel: remove adis16203, merged into mainline adis16201 driver Shehryar Ahmad
2026-09-13 8:53 ` [PATCH v2 6/6] dt-bindings: iio: accel: adi,adis16201: add adis16203 compatible Shehryar Ahmad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260913085307.13846-3-shehryar.amd@gmail.com \
--to=shehryar.amd@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®