linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 2/7] staging:iio:adis16080: Add device id table entry for the adis16100
Date: Wed,  9 Jan 2013 15:01:14 +0100	[thread overview]
Message-ID: <1357740079-12326-2-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1357740079-12326-1-git-send-email-lars@metafoo.de>

The adis16100 is very similar to the adis16080. The driver description already
states that the driver supports the adis16100 as-well. But so far the there is
no device id table for the adis16100 and the drivers does not bind to a device
named adis16100.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/gyro/Kconfig          | 4 ++--
 drivers/staging/iio/gyro/adis16080_core.c | 9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/iio/gyro/Kconfig b/drivers/staging/iio/gyro/Kconfig
index ea295b2..2f9467e 100644
--- a/drivers/staging/iio/gyro/Kconfig
+++ b/drivers/staging/iio/gyro/Kconfig
@@ -14,8 +14,8 @@ config ADIS16080
 	tristate "Analog Devices ADIS16080/100 Yaw Rate Gyroscope with SPI driver"
 	depends on SPI
 	help
-	  Say yes here to build support for Analog Devices adis16080/100 Yaw Rate
-	  Gyroscope with SPI.
+	  Say yes here to build support for Analog Devices ADIS16080, ADIS16100 Yaw
+	  Rate Gyroscope with SPI.
 
 config ADIS16130
 	tristate "Analog Devices ADIS16130 High Precision Angular Rate Sensor driver"
diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/staging/iio/gyro/adis16080_core.c
index 149ff99..0268f2a 100644
--- a/drivers/staging/iio/gyro/adis16080_core.c
+++ b/drivers/staging/iio/gyro/adis16080_core.c
@@ -185,6 +185,13 @@ static int adis16080_remove(struct spi_device *spi)
 	return 0;
 }
 
+static const struct spi_device_id adis16080_ids[] = {
+	{ "adis16080", 0 },
+	{ "adis16100", 0 },
+	{},
+};
+MODULE_DEVICE_TABLE(spi, adis16080_ids);
+
 static struct spi_driver adis16080_driver = {
 	.driver = {
 		.name = "adis16080",
@@ -192,10 +199,10 @@ static struct spi_driver adis16080_driver = {
 	},
 	.probe = adis16080_probe,
 	.remove = adis16080_remove,
+	.id_table = adis16080_ids,
 };
 module_spi_driver(adis16080_driver);
 
 MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
 MODULE_DESCRIPTION("Analog Devices ADIS16080/100 Yaw Rate Gyroscope Driver");
 MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("spi:adis16080");
-- 
1.8.0


  reply	other threads:[~2013-01-09 14:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-09 14:01 [PATCH 1/7] staging:iio:adis16080: Perform sign extension Lars-Peter Clausen
2013-01-09 14:01 ` Lars-Peter Clausen [this message]
2013-01-09 21:44   ` [PATCH 2/7] staging:iio:adis16080: Add device id table entry for the adis16100 Jonathan Cameron
2013-01-09 14:01 ` [PATCH 3/7] staging:iio:adis16080: Cleanup SPI transfer Lars-Peter Clausen
2013-01-09 21:45   ` Jonathan Cameron
2013-01-09 14:01 ` [PATCH 4/7] staging:iio:adis16080: be16 cleanups Lars-Peter Clausen
2013-01-09 21:49   ` Jonathan Cameron
2013-01-09 14:01 ` [PATCH 5/7] staging:iio:adis16080: Remove unnecessary lock Lars-Peter Clausen
2013-01-09 14:01 ` [PATCH 6/7] staging:iio:adis16080: Add scale and offset attributes Lars-Peter Clausen
2013-01-09 14:01 ` [PATCH 7/7] staging:iio:adis16080: Move out of staging Lars-Peter Clausen
2013-01-09 20:09 ` [PATCH 1/7] staging:iio:adis16080: Perform sign extension Jonathan Cameron
2013-01-09 20:34   ` Lars-Peter Clausen
2013-01-09 21:16     ` Jonathan Cameron
2013-01-26 10:32       ` 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=1357740079-12326-2-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.de \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.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;
as well as URLs for NNTP newsgroup(s).