From: Shehryar Ahmad <shehryar.amd@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux@analog.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Shehryar Ahmad" <shehryar.amd@gmail.com>
Subject: [PATCH 1/2] iio: accel: adis16209: add SPI device ID table
Date: Fri, 16 Oct 2026 16:45:26 +0500 [thread overview]
Message-ID: <20261016114527.128364-2-shehryar.amd@gmail.com> (raw)
In-Reply-To: <20261016114527.128364-1-shehryar.amd@gmail.com>
Add spi_device_id table for ADIS16209. Replace MODULE_ALIAS() with
MODULE_DEVICE_TABLE() which automatically generates the same module
alias.
Signed-off-by: Shehryar Ahmad <shehryar.amd@gmail.com>
---
drivers/iio/accel/adis16209.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/accel/adis16209.c b/drivers/iio/accel/adis16209.c
index 04e169f22..07a682d68 100644
--- a/drivers/iio/accel/adis16209.c
+++ b/drivers/iio/accel/adis16209.c
@@ -298,16 +298,22 @@ static int adis16209_probe(struct spi_device *spi)
return devm_iio_device_register(&spi->dev, indio_dev);
}
+static const struct spi_device_id adis16209_ids[] = {
+ { .name = "adis16209" },
+ { }
+};
+MODULE_DEVICE_TABLE(spi, adis16209_ids);
+
static struct spi_driver adis16209_driver = {
.driver = {
.name = "adis16209",
},
.probe = adis16209_probe,
+ .id_table = adis16209_ids,
};
module_spi_driver(adis16209_driver);
MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
MODULE_DESCRIPTION("Analog Devices ADIS16209 Dual-Axis Digital Inclinometer and Accelerometer");
MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("spi:adis16209");
MODULE_IMPORT_NS("IIO_ADISLIB");
--
2.56.0
next prev parent reply other threads:[~2026-10-16 11:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 11:45 [PATCH 0/2] iio: accel: adis16209: add missing SPI and OF matching table Shehryar Ahmad
2026-10-16 11:45 ` Shehryar Ahmad [this message]
2026-10-16 11:45 ` [PATCH 2/2] iio: accel: adis16209: Add OF device ID table Shehryar Ahmad
2026-10-16 13:34 ` [PATCH 0/2] iio: accel: adis16209: add missing SPI and OF matching table Andy Shevchenko
2026-10-17 0:11 ` Jonathan Cameron
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=20261016114527.128364-2-shehryar.amd@gmail.com \
--to=shehryar.amd@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
/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®