]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging:iio:dac:ad5446: Add support for the AD5662
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 25 Apr 2012 07:45:01 +0000 (09:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2012 17:57:21 +0000 (10:57 -0700)
The AD5662 is compatible to the AD5660, but uses an external
reference instead of an internal.

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>
drivers/staging/iio/dac/ad5446.c
drivers/staging/iio/dac/ad5446.h

index 9dc67c806016da7716abc742fb27d70f92924773..00b138e56d247948651f953233c245595a9cce03 100644 (file)
@@ -217,6 +217,10 @@ static const struct ad5446_chip_info ad5446_chip_info_tbl[] = {
                .int_vref_mv = 1250,
                .write = ad5660_write,
        },
+       [ID_AD5662] = {
+               .channel = AD5446_CHANNEL_POWERDOWN(16, 16, 0),
+               .write = ad5660_write,
+       },
 };
 
 static int ad5446_read_raw(struct iio_dev *indio_dev,
@@ -370,6 +374,7 @@ static const struct spi_device_id ad5446_id[] = {
        {"ad5640-1250", ID_AD5640_1250},
        {"ad5660-2500", ID_AD5660_2500},
        {"ad5660-1250", ID_AD5660_1250},
+       {"ad5662", ID_AD5662},
        {}
 };
 MODULE_DEVICE_TABLE(spi, ad5446_id);
index 1a0fb4aebe8a1aa1dc448254d8dace491a387bc6..dfd68ce7427e9fb41233c4393dd4e2817431aba1 100644 (file)
@@ -83,6 +83,7 @@ enum ad5446_supported_device_ids {
        ID_AD5640_1250,
        ID_AD5660_2500,
        ID_AD5660_1250,
+       ID_AD5662,
 };
 
 #endif /* IIO_DAC_AD5446_H_ */