Clément Le Goffic
6aae87fe7f
i2c: stm32f7: unmap DMA mapped buffer
...
Before each I2C transfer using DMA, the I2C buffer is DMA'pped to make
sure the memory buffer is DMA'able. This is handle in the function
`stm32_i2c_prep_dma_xfer()`.
If the transfer fails for any reason the I2C buffer must be unmap.
Use the dma_callback to factorize the code and fix this issue.
Note that the `stm32f7_i2c_dma_callback()` is now called in case of DMA
transfer success and error and that the `complete()` on the dma_complete
completion structure is done inconditionnally in case of transfer
success or error as well as the `dmaengine_terminate_async()`.
This is allowed as a `complete()` in case transfer error has no effect
as well as a `dmaengine_terminate_async()` on a transfer success.
Also fix the unneeded cast and remove not more needed variables.
Fixes: 7ecc8cfde5 ("i2c: i2c-stm32f7: Add DMA support")
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com >
Cc: <stable@vger.kernel.org > # v4.18+
Acked-by: Alain Volmat <alain.volmat@foss.st.com >
Signed-off-by: Andi Shyti <andi.shyti@kernel.org >
Link: https://lore.kernel.org/r/20250704-i2c-upstream-v4-2-84a095a2c728@foss.st.com
2025-07-10 11:58:33 +02:00
..
2025-03-12 12:24:52 +01:00
2025-03-12 12:24:52 +01:00
2024-11-17 11:58:14 +01:00
2025-01-14 11:09:47 +01:00
2025-03-18 21:53:53 +01:00
2025-03-20 14:37:47 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-03-18 21:53:54 +01:00
2025-03-18 21:53:54 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-05-16 21:06:09 +02:00
2024-11-17 11:58:14 +01:00
2025-04-13 21:33:44 +02:00
2025-05-19 22:23:57 +02:00
2025-06-25 23:38:33 +02:00
2025-03-18 21:53:53 +01:00
2025-05-23 10:02:27 +02:00
2024-11-24 16:03:51 +01:00
2025-06-30 19:57:08 +02:00
2025-05-14 17:28:24 +02:00
2025-05-19 22:23:55 +02:00
2025-05-23 10:02:27 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2025-05-19 22:23:57 +02:00
2025-03-18 21:53:54 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-25 22:42:25 +02:00
2024-11-17 11:58:14 +01:00
2025-01-07 23:46:10 +01:00
2025-05-19 22:23:57 +02:00
2024-11-17 11:58:14 +01:00
2025-06-21 22:17:02 +02:00
2025-06-12 10:05:31 +02:00
2025-03-18 21:53:54 +01:00
2024-12-02 11:34:44 -08:00
2025-05-19 22:23:54 +02:00
2025-02-26 23:23:33 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-07-01 18:37:38 +02:00
2025-05-23 10:02:27 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-03-18 21:53:54 +01:00
2025-03-18 21:53:54 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-05-19 22:23:55 +02:00
2025-05-19 22:23:55 +02:00
2024-11-17 11:58:14 +01:00
2025-07-10 11:58:33 +02:00
2024-11-17 11:58:14 +01:00
2025-05-19 22:23:57 +02:00
2025-05-19 22:23:55 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2025-06-30 13:42:11 +03:00
2025-06-12 10:05:31 +02:00
2025-05-20 22:49:21 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-05-19 22:23:57 +02:00
2024-11-17 11:58:14 +01:00
2025-06-25 22:45:48 +02:00
2024-11-17 11:58:57 +01:00
2025-05-19 22:23:54 +02:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-03-12 12:24:53 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2025-07-10 11:58:33 +02:00
2024-11-17 11:58:14 +01:00
2025-07-10 11:58:33 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-05-19 22:23:57 +02:00
2025-06-25 22:49:57 +02:00
2025-05-19 22:23:55 +02:00
2025-05-19 22:23:55 +02:00
2024-11-17 11:58:14 +01:00
2025-05-19 22:23:55 +02:00
2025-05-23 10:02:27 +02:00
2025-05-19 22:23:55 +02:00
2025-05-23 17:28:07 +02:00
2025-05-19 22:23:55 +02:00
2025-05-23 10:02:27 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-07-04 10:05:31 -07:00
2025-05-19 22:23:56 +02:00
2025-05-19 22:23:55 +02:00