diff options
author | Uwe Kleine-König <u.kleine-koenig@baylibre.com> | 2024-11-04 13:19:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-17 15:40:58 +0300 |
commit | cbb64f5d757fe18e5ac7a6ffb67e8264f2992996 (patch) | |
tree | 1e19db618c0c0fee20903568c739a371a23d9c5b /scripts/generate_rust_analyzer.py | |
parent | 24b89b747b1c0452bcd4d6aea6a9698b28cc1bd6 (diff) | |
download | linux-cbb64f5d757fe18e5ac7a6ffb67e8264f2992996.tar.xz |
iio: adc: ad7124: Disable all channels at probe time
commit 4be339af334c283a1a1af3cb28e7e448a0aa8a7c upstream.
When during a measurement two channels are enabled, two measurements are
done that are reported sequencially in the DATA register. As the code
triggered by reading one of the sysfs properties expects that only one
channel is enabled it only reads the first data set which might or might
not belong to the intended channel.
To prevent this situation disable all channels during probe. This fixes
a problem in practise because the reset default for channel 0 is
enabled. So all measurements before the first measurement on channel 0
(which disables channel 0 at the end) might report wrong values.
Fixes: 7b8d045e497a ("iio: adc: ad7124: allow more than 8 channels")
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20241104101905.845737-2-u.kleine-koenig@baylibre.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions