iio: adc: at91-sama5d2_adc: exit from write_raw() when buffers are enabled
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Wed, 3 Aug 2022 10:28:41 +0000 (13:28 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 15 Aug 2022 21:29:58 +0000 (22:29 +0100)
commitcf15a2b518b3e6991ef1c2f87e9a7f7e4afa7b77
tree14d26e46d4a2159fa5f22cc7317ef956d253d221
parent808175e21d9b7f866eda742e8970f27b78afe5db
iio: adc: at91-sama5d2_adc: exit from write_raw() when buffers are enabled

When buffers are enabled conversion may start asynchronously thus
allowing changes on actual hardware could lead to bad behavior. Thus
do not allow changing oversampling ratio and sample frequency when
if iio_device_claim_direct_mode() returns with error.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220803102855.2191070-6-claudiu.beznea@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/at91-sama5d2_adc.c