summaryrefslogtreecommitdiff
path: root/drivers/iio/dac/ad5686.c
diff options
context:
space:
mode:
authorStefan Popa <stefan.popa@analog.com>2018-06-04 17:22:07 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-06-10 16:30:09 +0300
commitd8084a048cca85e3316c685415fd15234665b160 (patch)
tree9f456d13eeeb617570f5dc986031e31593d1de16 /drivers/iio/dac/ad5686.c
parenta591525f43e7d17dc5f94f314d30f6e4da753d7b (diff)
downloadlinux-d8084a048cca85e3316c685415fd15234665b160.tar.xz
iio:dac:ad5686: Add AD5311R support
AD5311R is a single channel DAC with 10-bit precision and i2c interface. The device includes a 2.5V internal reference which is enabled by default. This device is similar to AD5691R/AD5692R/AD5693/AD5693R, the only difference is that it has 10-bit precision. Datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5310R_5311R.pdf Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac/ad5686.c')
-rw-r--r--drivers/iio/dac/ad5686.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
index e136f0fd38f0..2ddbfc3fdbae 100644
--- a/drivers/iio/dac/ad5686.c
+++ b/drivers/iio/dac/ad5686.c
@@ -221,6 +221,7 @@ static struct iio_chan_spec name[] = { \
AD5868_CHANNEL(7, 7, bits, _shift), \
}
+DECLARE_AD5693_CHANNELS(ad5311r_channels, 10, 6);
DECLARE_AD5676_CHANNELS(ad5672_channels, 12, 4);
DECLARE_AD5676_CHANNELS(ad5676_channels, 16, 0);
DECLARE_AD5686_CHANNELS(ad5684_channels, 12, 4);
@@ -231,6 +232,12 @@ DECLARE_AD5693_CHANNELS(ad5692r_channels, 14, 2);
DECLARE_AD5693_CHANNELS(ad5691r_channels, 12, 4);
static const struct ad5686_chip_info ad5686_chip_info_tbl[] = {
+ [ID_AD5311R] = {
+ .channels = ad5311r_channels,
+ .int_vref_mv = 2500,
+ .num_channels = 1,
+ .regmap_type = AD5693_REGMAP,
+ },
[ID_AD5671R] = {
.channels = ad5672_channels,
.int_vref_mv = 2500,