]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: at91-sama5d2_adc: disable/prepare buffer on suspend/resume
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Wed, 3 Aug 2022 10:28:40 +0000 (13:28 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 15 Aug 2022 21:29:58 +0000 (22:29 +0100)
commitb076325463e7090b3d11bf67bdb7522c28b59460
tree5d08be83aa5c68570f095fd77f2a4d8a9de43928
parentfc6b29cfe51bb6588f951a856fc0751a50832815
iio: adc: at91-sama5d2_adc: disable/prepare buffer on suspend/resume

In case triggered buffers are enabled while system is suspended they will
not work anymore after resume. For this call at91_adc_buffer_postdisable()
on suspend and at91_adc_buffer_prepare() on resume. On tests it has been
seen that at91_adc_buffer_postdisable() call is not necessary but it has
been kept because it also does the book keeping for DMA. On resume path
there is no need to call at91_adc_configure_touch() as it is embedded in
at91_adc_buffer_prepare().

Fixes: 404c11cb61937 ("iio: adc: at91-sama5d2_adc: add support for DMA")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220803102855.2191070-5-claudiu.beznea@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/at91-sama5d2_adc.c