summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/ad7173.c
diff options
context:
space:
mode:
authorDumitru Ceclan <mitrutzceclan@gmail.com>2024-08-06 10:51:33 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-08-06 18:03:22 +0200
commit61cbfb5368dd50ed0d65ce21d305aa923581db2b (patch)
treec039cac30120f3b15b58831677e0b08f3bda933a /drivers/iio/adc/ad7173.c
parentiio: adc: ad_sigma_delta: fix irq_flags on irq request (diff)
downloadlinux-61cbfb5368dd50ed0d65ce21d305aa923581db2b.tar.xz
linux-61cbfb5368dd50ed0d65ce21d305aa923581db2b.zip
iio: adc: ad7124: fix DT configuration parsing
The cfg pointer is set before reading the channel number that the configuration should point to. This causes configurations to be shifted by one channel. For example setting bipolar to the first channel defined in the DT will cause bipolar mode to be active on the second defined channel. Fix by moving the cfg pointer setting after reading the channel number. Fixes: 7b8d045e497a ("iio: adc: ad7124: allow more than 8 channels") Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20240806085133.114547-1-dumitru.ceclan@analog.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ad7173.c')
0 files changed, 0 insertions, 0 deletions