]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: stm32f7: stop dma transfer in case of NACK
authorAlain Volmat <alain.volmat@foss.st.com>
Mon, 20 Sep 2021 15:21:31 +0000 (17:21 +0200)
committerWolfram Sang <wsa@kernel.org>
Tue, 30 Nov 2021 09:22:11 +0000 (10:22 +0100)
commit474666ff2be65394110a4288b35e1e0b4350077d
tree7c0407ecad9e24657536e651bbd40e5fe1f56de9
parente97f091c88f2712382746bad8843ed854471651b
i2c: stm32f7: stop dma transfer in case of NACK

In case of receiving a NACK, the dma transfer should be stopped
to avoid feeding data into the FIFO.
Also ensure to properly return the proper error code and avoid
waiting for the end of the dma completion in case of
error happening during the transmission.

Fixes: 166f5f2182f8 ("i2c: i2c-stm32f7: Add DMA support")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-stm32f7.c