]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7124: Really disable all channels at probe time
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Tue, 4 Feb 2025 11:50:23 +0000 (12:50 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 8 Feb 2025 15:16:30 +0000 (15:16 +0000)
commite903868b4ce73d1ba3663d5e0718424946cebd99
tree5c63b51156ae1e23fbdc998a3cc42f28b1a7e0df
parent5c2c07a18c7d9763bcc6e47466c6bbd40fcd61fc
iio: adc: ad7124: Really disable all channels at probe time

If one or more of the 16 channels are enabled and the driver is not
aware of that, unexpected things happen because different channels are
used than intended. To prevent that, all channels should be disabled at
probe time. In Commit 4be339af334c ("iio: adc: ad7124: Disable all
channels at probe time") I intended do that, however only the channels
that are potentially used by the driver and not all channels are
disabled since then. So disable all 16 channels and not only the used
ones.

Also fix the same issue in the .disable_all() callback.

Fixes: 4be339af334c ("iio: adc: ad7124: Disable all channels at probe time")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20250204115023.265813-2-u.kleine-koenig@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7124.c