Skip to content
Permalink
Browse files

drivers/uart: introduce SERIAL_SUPPORT_ASYNC option

Not all serial drivers support ASYNC operation and if they do,
they might not support it on every SoC.

Add the SERIAL_SUPPORT_ASYNC option to indicate ASYNC operation
is availiable.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
  • Loading branch information...
benpicco authored and nashif committed Jun 3, 2019
1 parent f74cebb commit 4d89ff123282fcb23e048d1bdd54bb203c86109b
Showing with 10 additions and 0 deletions.
  1. +7 −0 drivers/serial/Kconfig
  2. +1 −0 drivers/serial/Kconfig.nrfx
  3. +2 −0 drivers/serial/Kconfig.sam0
@@ -22,6 +22,12 @@ config SERIAL_HAS_DRIVER
to signal that there is a serial driver. This is being used
by other drivers which are dependent on serial.

config SERIAL_SUPPORT_ASYNC
bool
help
This is an option to be enabled by individual serial driver
to signal that the driver and hardware supports async operation.

config SERIAL_SUPPORT_INTERRUPT
bool
help
@@ -30,6 +36,7 @@ config SERIAL_SUPPORT_INTERRUPT

config UART_ASYNC_API
bool "Enable new asynchronous UART API [EXPERIMENTAL]"
depends on SERIAL_SUPPORT_ASYNC
help
This option enables new asynchronous UART API.

@@ -10,6 +10,7 @@ menuconfig UART_NRFX
default y
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
select SERIAL_SUPPORT_ASYNC
depends on SOC_FAMILY_NRF
help
Enable support for nrfx UART drivers for nRF MCU series.
@@ -9,6 +9,8 @@ menuconfig UART_SAM0
depends on SOC_FAMILY_SAM0
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
# the ASYNC implementation requires a DMA controller
select SERIAL_SUPPORT_ASYNC if ($(dt_int_val,DT_ATMEL_SAM0_DMAC_0) != 0)
select DMA if UART_ASYNC_API
help
This option enables the SERCOMx USART driver for Atmel SAM0 MCUs.

0 comments on commit 4d89ff1

Please sign in to comment.
You can’t perform that action at this time.