]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7124: set initial ADC mode to idle
authorDumitru Ceclan <mitrutzceclan@gmail.com>
Wed, 31 Jul 2024 12:37:25 +0000 (15:37 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 3 Aug 2024 15:05:53 +0000 (16:05 +0100)
commit6f055df6f65944b155c35fa7f790ca749471f0b6
tree3be623d1a626c9b273a13090f01844ce7ba993f2
parentb7eef979b7ac267187218a515ce4afb502fe18c7
iio: adc: ad7124: set initial ADC mode to idle

During setup the st->adc_control is 0, which corresponds to a continuous
conversion mode. The reset value for channel 1 is to enable it. The
combined effect of these two is that the ADC will start conversions for
channel 1 without them being read.
This is not neccessarily a problem, but it is an unexpected behavior.

Set the ADC state to idle during setup to avoid this.

Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240731-ad7124-fix-v1-4-46a76aa4b9be@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7124.c