]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7606: wrap channel ranges & scales into struct
authorAlexandru Ardelean <aardelean@baylibre.com>
Thu, 19 Sep 2024 13:04:39 +0000 (16:04 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 30 Sep 2024 08:21:04 +0000 (09:21 +0100)
commitbbd478f2cb0e3352c0af9078ea51643c0a497fa8
treecfebca7d6a1036d754eb02f38b88eadee75068dc
parente571c1902116a376c96e59639820662d7d6a13da
iio: adc: ad7606: wrap channel ranges & scales into struct

With the addition of AD7606C-16,18 which have differential & bipolar
channels (and ranges), which can vary from channel to channel, we'll need
to keep more information about each channel range.

To do that, we'll add a 'struct ad7606_chan_scale' type to hold just
configuration for each channel.
This includes the scales per channel (which can be different with
AD7606C-16,18), as well as the range for each channel.
This driver was already keeping the range value for each channel before,
and since this is couple with the scales, it also makes sense to put them
in the same struct.

Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
Link: https://patch.msgid.link/20240919130444.2100447-5-aardelean@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7606.c
drivers/iio/adc/ad7606.h