spi: stm32: finalize message either on dma callback or EOT
authorAlain Volmat <alain.volmat@foss.st.com>
Wed, 7 Jul 2021 08:27:06 +0000 (10:27 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 11 Jul 2021 22:51:43 +0000 (23:51 +0100)
commit7ceb0b8a3ceddc36ae4ef1cba6c25a0e28ed65fc
tree880b3f26abebf315c757825b8f90532522369b58
parentdc6620c31326bc50fa22fd8900a9f995d0a04bc1
spi: stm32: finalize message either on dma callback or EOT

Depending on the usage, it is necessary to perform the finalize
message operation either upon receiving the EOT interruption,
eiher upon receiving the DMA callback. Indeed, when relying
on DMA, even if the SPI EOT IT has been received, it is
necessary to wait for the end of the DMA RX transaction before
accessing to the data.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/1625646426-5826-8-git-send-email-alain.volmat@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c