iio: adc: ad7616: Add support for AD7616 ADC
authorBeniamin Bia <beniamin.bia@analog.com>
Tue, 2 Apr 2019 13:18:40 +0000 (16:18 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Apr 2019 12:22:29 +0000 (13:22 +0100)
commit7989b4bb23fe489996de7ad97b9327e804d7c158
treea7fb0fccddcfa7f6407512d44ef7f6dcad2550bf
parent6bf229abce7528bcf70c62d913eeabfc770ee72c
iio: adc: ad7616: Add support for AD7616 ADC

The AD7616 is a 12-bit ADC with 16 channels.

The AD7616 can be configured to work in hardware mode by controlling it via
gpio pins and read data via spi. No support for software mode yet, but it
is a work in progress.

This device requires a reset in order to update oversampling, so chip info
has got a new attribute to mark this.

The current assumption that this driver makes for AD7616, is that it's
working in Hardware Mode with Serial, Burst and Sequencer modes activated.
To activate them, following pins must be pulled high:
-SER/PAR
-SEQEN
And following must be pulled low:
-WR/BURST
-DB4/SEQEN

Datasheets:
Link: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7616.pdf
Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@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