zephyr/drivers/serial
Gerard Marull-Paretas e3f4907efe drivers: serial: stm32: use PM constraints to prevent suspension
In the current implementation the STM32 UART driver required to enable
`CONFIG_PM_DEVICE` when `CONFIG_PM=y` to function properly. The main
reason is that in some situations, like in polling mode, transmissions
are not fully synchronous. That is, a byte is pushed to the _queue_ if
it is empty and then the function returns without waiting for it to be
transmitted to the wire. This makes sense to make things like per-byte
transmission efficient. However, this introduces a problem: the system
may reach idle state, and so enter low power modes before the UART has
actually finished the last data in the queue. If this happens,
communications can be interrupted or garbage data may be put into the
UART line.

The proposed solution in this patch uses PM constraints to solve this
problem. For the IRQ/DMA case it is easy since we can set the constraint
before transmission start, and when the completion (TC) interrupt is
received we can clear it. However, the polling mode did not have the
capability to signal the completion. For this case, a simpler IRQ
routine is provided to just release the constraint. As a result, the PM
hooks are not required and so system can operate with just `CONFIG_PM`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-13 17:53:19 -04:00
..
CMakeLists.txt Microchip: MEC172x: Add UART driver 2021-08-09 16:21:33 -04:00
Kconfig Microchip: MEC172x: Add UART driver 2021-08-09 16:21:33 -04:00
Kconfig.altera_jtag drivers: uart_altera_jtag_hal: use DEVICE_DT_INST_DEFINE() 2021-08-23 18:53:47 -04:00
Kconfig.apbuart serial: apbuart interrupt support 2020-11-13 14:53:55 -08:00
Kconfig.b91 drivers: serial: introduce new Telink B91 Serial driver 2021-07-21 05:37:12 -04:00
Kconfig.cc13xx_cc26xx drivers: cc13xx_cc26xx: use DT_INST_FOREACH to reduce code duplication 2020-04-23 17:29:53 -05:00
Kconfig.cc32xx kconfig: Turn pointless/confusing 'menuconfig's into 'config's 2019-10-22 13:53:06 -05:00
Kconfig.cmsdk_apb kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.esp32 kconfig: Turn pointless/confusing 'menuconfig's into 'config's 2019-10-22 13:53:06 -05:00
Kconfig.esp32c3_rom drivers: serial: added minimal uart driver for esp32c3 2021-08-03 11:20:06 -05:00
Kconfig.esp32s2_rom esp32s2: drivers: serial: add minimal uart driver 2021-08-09 13:03:14 -04:00
Kconfig.gecko kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.imx drivers: serial: uart_imx: Convert driver to new DT_INST macros 2020-04-04 09:34:00 -05:00
Kconfig.leuart_gecko kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.litex kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.lpc11u6x drivers: serial: Add support for LPC11U6X UART controllers 2020-07-29 20:12:24 +02:00
Kconfig.mcux drivers: serial: uart_mcux: Convert to DT_INST 2020-04-14 17:52:31 -05:00
Kconfig.mcux_flexcomm drivers: uart: mcux_flexcomm: Convert to DT_INST 2020-04-28 16:54:30 -05:00
Kconfig.mcux_iuart drivers: serial: Add NXP IUART driver 2020-08-14 14:51:50 -05:00
Kconfig.mcux_lpsci drivers: uart: mcux_lpsci: Convert to DT_INST 2020-04-28 16:54:30 -05:00
Kconfig.mcux_lpuart drivers: uart: mcux_lpuart: Convert to DT_INST 2020-04-20 15:50:45 -05:00
Kconfig.miv drivers: serial: uart_miv: Fix build errors 2021-05-10 13:15:50 -05:00
Kconfig.msp432p4xx kconfig: Turn pointless/confusing 'menuconfig's into 'config's 2019-10-22 13:53:06 -05:00
Kconfig.native_posix drivers: serial: native_posix: Convert 2nd UART to be devicetree based 2021-02-18 09:06:21 +01:00
Kconfig.npcx driver: npcx7: fixed typo in Kconfig.npcx files. 2020-12-07 12:11:17 -05:00
Kconfig.nrfx drivers: serial: nrf_uarte: Conditionally call PPI driver 2021-05-07 12:11:32 +02:00
Kconfig.ns16550 drivers: uart_ns16550: Remove CMake-based templating 2021-04-22 15:30:24 -05:00
Kconfig.numicro driver: serial: replace suffix nuvoton with numicro 2021-08-07 20:37:24 -04:00
Kconfig.pl011 drivers: pl011: add SBSA mode 2021-01-24 13:59:55 -05:00
Kconfig.psoc6 drivers: serial: psoc6: Add interrupts support 2021-04-27 09:27:45 -05:00
Kconfig.rcar drivers: uart: Add "Interrupt driven" to R-Car 2021-07-13 09:42:22 -04:00
Kconfig.rtt tracing: fix conflict with RTT locking 2021-05-25 07:36:38 -05:00
Kconfig.rv32m1_lpuart kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.sam0 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.sifive drivers: serial: sifive: support SiFive Freedom series SoCs 2021-09-03 09:52:26 -04:00
Kconfig.stellaris arm: Removed support for CC2650 2020-01-18 09:27:55 -06:00
Kconfig.stm32 drivers: dma: stm32 dma driver for a new dma version 2021-07-22 04:52:53 -04:00
Kconfig.test drivers: serial: add a dummy driver for vnd,serial 2021-07-14 11:10:08 -05:00
Kconfig.uart_sam drivers: serial: uart_sam: rework device tree support 2020-04-18 17:04:08 -05:00
Kconfig.usart_sam drivers: serial: usart_sam: rework device tree support 2020-04-18 17:04:08 -05:00
Kconfig.xec Microchip: MEC172x: Add UART driver 2021-08-09 16:21:33 -04:00
Kconfig.xlnx drivers: serial: add driver for the Xilinx UART Lite IP 2020-08-14 13:35:39 -05:00
Kconfig.xmc4xxx drivers: serial: add XMC seris UART support 2020-05-09 14:21:44 +02:00
leuart_gecko.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
serial_test.c drivers: serial: add a dummy driver for vnd,serial 2021-07-14 11:10:08 -05:00
uart_altera_jtag_hal.c drivers: uart_altera_jtag_hal: use DEVICE_DT_INST_DEFINE() 2021-08-23 18:53:47 -04:00
uart_apbuart.c serial: introduce CONFIG_UART_USE_RUNTIME_CONFIGURE 2021-06-07 12:09:01 +02:00
uart_b91.c drivers: serial: b91: full duplex mode support 2021-08-20 06:23:24 -04:00
uart_cc13xx_cc26xx.c pm: use actions for device PM control 2021-08-04 08:23:01 -04:00
uart_cc32xx.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_cmsdk_apb.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_esp32.c esp32: drivers: interrupt_controller: review UART interrupt usage 2021-07-16 07:19:28 -04:00
uart_gecko.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_handlers.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
uart_imx.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_liteuart.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_lpc11u6x.c serial: introduce CONFIG_UART_USE_RUNTIME_CONFIGURE 2021-06-07 12:09:01 +02:00
uart_lpc11u6x.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
uart_mchp_xec.c Microchip: MEC172x: Add UART driver 2021-08-09 16:21:33 -04:00
uart_mcux.c serial: introduce CONFIG_UART_USE_RUNTIME_CONFIGURE 2021-06-07 12:09:01 +02:00
uart_mcux_flexcomm.c driver/uart: add enum parity element on devicetree bindings 2021-06-11 08:53:10 -05:00
uart_mcux_iuart.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_mcux_lpsci.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_mcux_lpuart.c drivers: serial: NXP: Enable flow control for uart_mcux_lpuart 2021-08-12 14:49:09 -05:00
uart_miv.c drivers: serial: uart_miv: Fix build errors 2021-05-10 13:15:50 -05:00
uart_msp432p4xx.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_native_posix.c drivers: Fix missing auto_attach_cmd 2021-06-09 16:18:17 +02:00
uart_npcx.c pm: use actions for device PM control 2021-08-04 08:23:01 -04:00
uart_nrfx_uart.c drivers: serial: nrf: Make pull-ups on UART pins configurable 2021-08-06 19:17:26 -04:00
uart_nrfx_uarte.c drivers: serial: nrf: Make pull-ups on UART pins configurable 2021-08-06 19:17:26 -04:00
uart_ns16550.c drivers: serial: ns16550: fix uart initialization 2021-09-13 07:06:33 -04:00
uart_ns16550.h drivers: serial: ns16550: move header from /include/ 2019-06-25 15:27:00 -04:00
uart_numicro.c driver: serial: replace suffix nuvoton with numicro 2021-08-07 20:37:24 -04:00
uart_pl011.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_psoc6.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_rcar.c drivers: uart: Add "Interrupt driven" to R-Car 2021-07-13 09:42:22 -04:00
uart_rom_esp32c3.c drivers: serial: added minimal uart driver for esp32c3 2021-08-03 11:20:06 -05:00
uart_rom_esp32s2.c esp32s2: drivers: serial: add minimal uart driver 2021-08-09 13:03:14 -04:00
uart_rtt.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_rv32m1_lpuart.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_sam.c soc: atmel_sam: Add _INST to ATMEL_SAM_DT_PIN* macros 2021-06-14 09:50:41 -05:00
uart_sam0.c drivers: serial: uart_sam0: Correct check for interrupts enabled 2021-09-01 11:50:51 +02:00
uart_sifive.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_stellaris.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_stm32.c drivers: serial: stm32: use PM constraints to prevent suspension 2021-09-13 17:53:19 -04:00
uart_stm32.h drivers: serial: stm32: use PM constraints to prevent suspension 2021-09-13 17:53:19 -04:00
uart_xlnx_ps.c serial: introduce CONFIG_UART_USE_RUNTIME_CONFIGURE 2021-06-07 12:09:01 +02:00
uart_xlnx_uartlite.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
uart_xmc4xxx.c drivers: serial: remove usage of device_pm_control_nop 2021-04-28 12:25:39 -04:00
usart_sam.c soc: atmel_sam: Add _INST to ATMEL_SAM_DT_PIN* macros 2021-06-14 09:50:41 -05:00