]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: ad7476: Use correct channel for bit info
authorMatti Vaittinen <mazziesaccount@gmail.com>
Mon, 11 Aug 2025 08:51:06 +0000 (11:51 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Aug 2025 12:21:20 +0000 (13:21 +0100)
commit5e6847a02e44be0fa8e61d081d64666f6748793e
treedebecd1612b3e471ecbd21ecea63e3dfa07a394c
parent1003d539930177b552e48881c1805fd2bc20066a
iio: adc: ad7476: Use correct channel for bit info

The ad7476 supports ADCs which use separate GPIO for starting the
conversion. For such devices, the driver uses different channel
information if the GPIO is found. The bit information is still always
used from the original (non 'convstart') channels.

This has not been causing problems because the bit information for the
'convstart' -channel and the 'normal' -channel is identical. It,
however, will cause issues if an IC has different characteristics for an
'convstart' -channel and regular channel. Furthermore, this will cause
problems if a device always requires the convstart GPIO and thus only
defines the convstart channel.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/70619e39023bc497ef68cc1eff11943ab68cbdf8.1754901948.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7476.c