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)
commit1229f82deaece681cda664d95c856b68062aa159
tree5b80bc9dc7b547b11ed0747b84c9a811b7900759
parent31b90a95ccbbb4b628578ac17e3b3cc8eeacfe31
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