]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7606: Introduce num_adc_channels
authorGuillaume Stols <gstols@baylibre.com>
Tue, 15 Oct 2024 13:56:19 +0000 (13:56 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Oct 2024 18:19:26 +0000 (19:19 +0100)
commitef67f16e365c7d4dd3c075fcc49422d500612b5a
treeebd4f4c0cb850618776fc3be894858fd39f761dd
parentbc69e9fffde41cbb865c4f22aef9aee58f82d61a
iio: adc: ad7606: Introduce num_adc_channels

This variable determines how many hardware channels has the chip,
oppositely to the num_channels that can contain more channels, e.g a
timestamp channel in our case. Introducing this variable avoids
decreasing the former num_channels variable when reading the ADC's
channels, and clarifies a bit the code.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-6-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7606.c
drivers/iio/adc/ad7606.h