diff options
author | Erwan Le Ray <erwan.leray@foss.st.com> | 2021-10-25 15:42:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-26 19:18:47 +0200 |
commit | 6eeb348c8482862a788a2903e3fc45e76d4ea6b5 (patch) | |
tree | 2c685cb29ef5d982ab487d2901a23bbeabf6f62a /Documentation/admin-guide/gpio | |
parent | e0abc903deea0148955af1e7ccabf3e980af7815 (diff) | |
download | linux-6eeb348c8482862a788a2903e3fc45e76d4ea6b5.tar.gz |
serial: stm32: terminate / restart DMA transfer at suspend / resume
DMA prevents the system to suspend when an UART RX wake-up source is
using DMA. DMA can't suspend while DMA channels are still active.
Terminate DMA transfer at suspend, and restart a new DMA transfer at
resume. Create stm32_usart_start_rx_dma_cyclic function to factorize
dma RX initialization. Move RX DMA code related to wakeup into
stm32_usart_serial_en_wakeup() routine to ease further improvements
on wakeup from low power modes.
Don't enable/disable wakeup on uninitialized port.
There may be data residue in the RX FIFO while suspending. Flush it at
suspend time. Receiver timeout interrupt won't trigger later in low power
mode, so call stm32_usart_receive_chars() in case there's data to handle.
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Link: https://lore.kernel.org/r/20211025134229.8456-3-erwan.leray@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/admin-guide/gpio')
0 files changed, 0 insertions, 0 deletions