iio: adc: ad7944: add support for chain mode
authorDavid Lechner <dlechner@baylibre.com>
Thu, 25 Apr 2024 14:09:59 +0000 (09:09 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Apr 2024 19:53:25 +0000 (20:53 +0100)
commit64ce7d4348be630badad2af22030bebf028b2861
treea2181a9b75e50bbd0ca0e06f5e8863b3421f0bdc
parent73e49886a2834b79630cf4db6a98172aa066ce0e
iio: adc: ad7944: add support for chain mode

This adds support for the chain mode of the AD7944 ADC. This mode allows
multiple ADCs to be daisy-chained together. Data from all of the ADCs in
is read by reading multiple words from the first ADC in the chain.

Each chip in the chain adds an extra IIO input voltage channel to the
IIO device.

Only the wiring configuration where the SPI controller CS line is
connected to the CNV pin of all of the ADCs in the chain is supported
in this patch.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240425-iio-ad7944-chain-mode-v1-1-9d9220ff21e1@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7944.c