]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: stm32f7: use proper DMAENGINE API for termination
authorAlain Volmat <alain.volmat@foss.st.com>
Mon, 20 Sep 2021 15:21:32 +0000 (17:21 +0200)
committerWolfram Sang <wsa@kernel.org>
Tue, 30 Nov 2021 09:22:14 +0000 (10:22 +0100)
commit815c8ceadbe3e766a4c870f937d26264300f7228
tree5b80bc9dc7b547b11ed0747b84c9a811b7900759
parent64d07e152fe572bafce203e2273e1809b6baffc6
i2c: stm32f7: use proper DMAENGINE API for termination

dmaengine_terminate_all() is deprecated in favor of explicitly saying if
it should be sync or async.  Here, we use dmaengine_terminate_sync in
i2c_xfer and i2c_smbus_xfer handlers and rely on
dmaengine_terminate_async within interrupt handlers
(transmission error cases).
dmaengine_synchronize is added within i2c_xfer and i2c_smbus_xfer handler
to finalize terminate started in interrupt handlers.

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