aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-06-26 04:45:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-26 17:57:30 -0400
commit779c0c4619f57ab0d573468baa7a791db402e9f9 (patch)
tree73566250d890a48828d984ab2919e950d8f1498b /drivers/iio
parent90e6dc7c274dca8a9198e3525488ea991719a799 (diff)
iio:dac:ad5446: Add support for the AD5450/51/52/53
This patch adds support for the Analog Devices AD5450/51/52/53 Digital-to-Analog converters. The AD5452 and AD5453 are software compatible to the existing AD5444 and AD5446. The AD5450 and AD5451 are similar but have a smaller resolution. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/dac/Kconfig6
-rw-r--r--drivers/iio/dac/ad5446.c12
-rw-r--r--drivers/iio/dac/ad5446.h2
3 files changed, 17 insertions, 3 deletions
diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
index 92fb3a003510..afd207e171cf 100644
--- a/drivers/iio/dac/Kconfig
+++ b/drivers/iio/dac/Kconfig
@@ -59,9 +59,9 @@ config AD5446
59 tristate "Analog Devices AD5446 and similar single channel DACs driver" 59 tristate "Analog Devices AD5446 and similar single channel DACs driver"
60 depends on SPI 60 depends on SPI
61 help 61 help
62 Say yes here to build support for Analog Devices AD5444, AD5446, 62 Say yes here to build support for Analog Devices AD5444, AD5446, AD5450,
63 AD5512A, AD5541A, AD5542A, AD5543, AD5553, AD5601, AD5611, AD5620, 63 AD5451, AD5452, AD5453, AD5512A, AD5541A, AD5542A, AD5543, AD5553, AD5601,
64 AD5621, AD5640, AD5660, AD5662 DACs. 64 AD5611, AD5620, AD5621, AD5640, AD5660, AD5662 DACs.
65 65
66 To compile this driver as a module, choose M here: the 66 To compile this driver as a module, choose M here: the
67 module will be called ad5446. 67 module will be called ad5446.
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
index 49f557fc673b..2ca5059ef89e 100644
--- a/drivers/iio/dac/ad5446.c
+++ b/drivers/iio/dac/ad5446.c
@@ -147,6 +147,14 @@ static const struct ad5446_chip_info ad5446_chip_info_tbl[] = {
147 .channel = AD5446_CHANNEL(14, 16, 0), 147 .channel = AD5446_CHANNEL(14, 16, 0),
148 .write = ad5446_write, 148 .write = ad5446_write,
149 }, 149 },
150 [ID_AD5450] = {
151 .channel = AD5446_CHANNEL(8, 16, 6),
152 .write = ad5446_write,
153 },
154 [ID_AD5451] = {
155 .channel = AD5446_CHANNEL(10, 16, 4),
156 .write = ad5446_write,
157 },
150 [ID_AD5541A] = { 158 [ID_AD5541A] = {
151 .channel = AD5446_CHANNEL(16, 16, 0), 159 .channel = AD5446_CHANNEL(16, 16, 0),
152 .write = ad5446_write, 160 .write = ad5446_write,
@@ -346,6 +354,10 @@ static int ad5446_remove(struct spi_device *spi)
346static const struct spi_device_id ad5446_id[] = { 354static const struct spi_device_id ad5446_id[] = {
347 {"ad5444", ID_AD5444}, 355 {"ad5444", ID_AD5444},
348 {"ad5446", ID_AD5446}, 356 {"ad5446", ID_AD5446},
357 {"ad5450", ID_AD5450},
358 {"ad5451", ID_AD5451},
359 {"ad5452", ID_AD5444}, /* ad5452 is compatible to the ad5444 */
360 {"ad5453", ID_AD5446}, /* ad5453 is compatible to the ad5446 */
349 {"ad5512a", ID_AD5512A}, 361 {"ad5512a", ID_AD5512A},
350 {"ad5541a", ID_AD5541A}, 362 {"ad5541a", ID_AD5541A},
351 {"ad5542a", ID_AD5541A}, /* ad5541a and ad5542a are compatible */ 363 {"ad5542a", ID_AD5541A}, /* ad5541a and ad5542a are compatible */
diff --git a/drivers/iio/dac/ad5446.h b/drivers/iio/dac/ad5446.h
index dfd68ce7427e..2934269a56d5 100644
--- a/drivers/iio/dac/ad5446.h
+++ b/drivers/iio/dac/ad5446.h
@@ -71,6 +71,8 @@ struct ad5446_chip_info {
71enum ad5446_supported_device_ids { 71enum ad5446_supported_device_ids {
72 ID_AD5444, 72 ID_AD5444,
73 ID_AD5446, 73 ID_AD5446,
74 ID_AD5450,
75 ID_AD5451,
74 ID_AD5541A, 76 ID_AD5541A,
75 ID_AD5512A, 77 ID_AD5512A,
76 ID_AD5553, 78 ID_AD5553,