]> git.ipfire.org Git - thirdparty/linux.git/commit
dmaengine: stm32-dma3: restore channel semaphore status after suspend
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Fri, 21 Nov 2025 13:36:58 +0000 (14:36 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 16 Dec 2025 16:06:31 +0000 (21:36 +0530)
commitdea737e31c2c62df5a45871bfb4ceb90a112dbd8
tree59cd7b681a398d4bc008013653e6675e39a986e8
parentd26eb4a75a4a2bbf27305e62ad82cedf5f8c577c
dmaengine: stm32-dma3: restore channel semaphore status after suspend

Depending on the power state reached during suspend, the CxSEMCR register
could have been reset, and the semaphore released.
On resume, try to take the semaphore again. If the semaphore cannot be
taken, an error log displaying the channel number and channel user is
generated.

This requires introducing two new functions:
stm32_dma3_pm_suspend(), where the status of each channel is checked
because suspension is not allowed if a channel is still running;
stm32_dma3_pm_resume(), where the channel semaphore is restored if it was
taken before suspend.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://patch.msgid.link/20251121-dma3_improv-v2-3-76a207b13ea6@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32/stm32-dma3.c