]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:57:47 +0000 (09:57 +0200)
commit8394db2d4ffbfdb04c0475e414290b38e1d76b51
treeed8b08e38c444c89dd2f6e7c4d3bc5af32d3e857
parente0b504be6e42dce5b2d87c871093925e76e7b8a7
iio: adc: at91-sama5d2_adc: disable/prepare buffer on suspend/resume

[ Upstream commit 808175e21d9b7f866eda742e8970f27b78afe5db ]

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: 073c662017f2f ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/at91-sama5d2_adc.c