]> git.ipfire.org Git - thirdparty/linux.git/commit
i2c: stm32f7: support i2c_*_dma_safe_msg_buf APIs
authorClément Le Goffic <clement.legoffic@foss.st.com>
Fri, 4 Jul 2025 08:39:16 +0000 (10:39 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 29 Jul 2025 22:30:43 +0000 (00:30 +0200)
commitffdd20555cc6fcb15e8a57d442c458034d169c7b
treec04761c6e8f70792608043dfc930bace83d380d6
parent0ae982df67760cd08affa935c0fe86c8a9311797
i2c: stm32f7: support i2c_*_dma_safe_msg_buf APIs

`i2c_*_dma_safe_msg_buf` APIs operate on a `struct i2c_msg`.
The get operation make sure the I2C buffer is DMA'able according to its
buffer length, or if the memory use is DMA coherent for example and
return a valid pointer for safe DMA access to be used.
The put operation release the pointer.
Prefer using generic API's than relying on private tests.

Acked-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250704-i2c-upstream-v4-3-84a095a2c728@foss.st.com
drivers/i2c/busses/i2c-stm32f7.c