]> asedeno.scripts.mit.edu Git - linux.git/commit
iio: adc: ad7606: Add support for AD7606B ADC
authorStefan Popa <stefan.popa@analog.com>
Wed, 21 Aug 2019 14:16:53 +0000 (17:16 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 25 Aug 2019 15:11:00 +0000 (16:11 +0100)
commitd2a415c86c6b07c10ba2decc7c9edb21d58f9c01
tree02b9ad85edcf551cb0cc6ce848ca06339390fa5e
parenta5913d009b28a2386326143c70fdbe577ea9478d
iio: adc: ad7606: Add support for AD7606B ADC

The AD7606B is a 16-bit ADC that supports simultaneous sampling of 8
channels. It is pin compatible to AD7606, but adds extra modes by
writing to the register map.

The AD7606B can be configured to work in software mode by setting all
oversampling pins to high. This mode is selected by default.
The oversampling ratio is configured from the OS_MODE register (address
0x08) with the addition of OS=128 and OS=256 that were not available in
hardware mode.

The device is configured to output data on a single spi channel, but this
configuration must be done right after restart. That is why the delay was
removed for devices which doesn't require it.

Moreover, in software mode, the range gpio has no longer its function.
Instead, the scale can be configured individually for each channel from
the RANGE_CH registers (address 0x03 to 0x06). Besides the already
supported ±10 V and ±5 V ranges, software mode can also accommodate the
±2.5 V range.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Co-developed-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7606.c
drivers/iio/adc/ad7606.h
drivers/iio/adc/ad7606_spi.c