diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-09-04 10:10:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-09-08 10:14:45 +0100 |
commit | 2fafbce25063ae2732f2f2d9f853f1d97145eab5 (patch) | |
tree | 344fe7ea9647545c1ba2ec4b80493357c8c69ef3 /drivers/iio/dac/ad5446.c | |
parent | ce56ade6ae74e604a4b5d6ea5b1d58960fa8e7aa (diff) | |
download | op-kernel-dev-2fafbce25063ae2732f2f2d9f853f1d97145eab5.zip op-kernel-dev-2fafbce25063ae2732f2f2d9f853f1d97145eab5.tar.gz |
iio:ad5446: Add support for the ad5300/ad5310/ad5320
The ad5300/ad5310/ad5320 is a family of single channel DACs with a SPI interface
similar to the ad5601/ad5611/ad5621 but use a different shift factor for the
data word.
While we are at it also reorder the device part numbers in the ad5446 driver
Kconfig to be ordered alphabetically.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/dac/ad5446.c')
-rw-r--r-- | drivers/iio/dac/ad5446.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c index 7f11c1c..2b0968f 100644 --- a/drivers/iio/dac/ad5446.c +++ b/drivers/iio/dac/ad5446.c @@ -321,6 +321,9 @@ static int ad5660_write(struct ad5446_state *st, unsigned val) * parts are supported here. */ enum ad5446_supported_spi_device_ids { + ID_AD5300, + ID_AD5310, + ID_AD5320, ID_AD5444, ID_AD5446, ID_AD5450, @@ -341,6 +344,18 @@ enum ad5446_supported_spi_device_ids { }; static const struct ad5446_chip_info ad5446_spi_chip_info[] = { + [ID_AD5300] = { + .channel = AD5446_CHANNEL_POWERDOWN(8, 16, 4), + .write = ad5446_write, + }, + [ID_AD5310] = { + .channel = AD5446_CHANNEL_POWERDOWN(10, 16, 2), + .write = ad5446_write, + }, + [ID_AD5320] = { + .channel = AD5446_CHANNEL_POWERDOWN(12, 16, 0), + .write = ad5446_write, + }, [ID_AD5444] = { .channel = AD5446_CHANNEL(12, 16, 2), .write = ad5446_write, @@ -418,6 +433,9 @@ static const struct ad5446_chip_info ad5446_spi_chip_info[] = { }; static const struct spi_device_id ad5446_spi_ids[] = { + {"ad5300", ID_AD5300}, + {"ad5310", ID_AD5310}, + {"ad5320", ID_AD5320}, {"ad5444", ID_AD5444}, {"ad5446", ID_AD5446}, {"ad5450", ID_AD5450}, |