iio: adc: ad7173: refactor ain and vref selection
authorDumitru Ceclan <dumitru.ceclan@analog.com>
Fri, 7 Jun 2024 14:53:11 +0000 (17:53 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 25 Jun 2024 20:04:43 +0000 (21:04 +0100)
commitfc5cdff0654a2f77e68c4bd1c2f8426ab4a9de1e
tree012bd0456c75e738ea63248d249d82674124e73d
parent137a83a66f355a9e22039ebf39581ce922119d97
iio: adc: ad7173: refactor ain and vref selection

Move validation of analog inputs and reference voltage selection to
separate functions to reduce the size of the channel config parsing
function and improve readability.
Add defines for the number of analog inputs in a channel.

Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-5-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7173.c