iio: adc: ad4030: move setting mode to update_scan_mode
authorDavid Lechner <dlechner@baylibre.com>
Mon, 10 Mar 2025 20:43:06 +0000 (15:43 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 7 Apr 2025 18:34:11 +0000 (19:34 +0100)
commitefaa981e679ac0cbc8d89b69aa4595e422826329
treebe7fd7d3652748d3c205a4fdf9c66b2c65676134
parentdc78e71d7c1534293eaf6d17c5ce83e547532cf9
iio: adc: ad4030: move setting mode to update_scan_mode

Move calling ad4030_set_mode() from the buffer preenable callback to
the update_scan_mode callback. This doesn't change any functionality
but is more logical since setting the mode is a function of the scan
mask and doesn't require an "undo" operation when the buffer is
disabled.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250310-iio-adc-ad4030-check-scan-type-err-v1-3-589e4ebd9711@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad4030.c