Skip to content

Commit

Permalink
drivers: Create driver for SC16IS75x series UART controllers
Browse files Browse the repository at this point in the history
This driver manages the UART controller part of an SC16IS75x MFD, for a
specific UART channel. Using the interrupt driven UART API required
interrupt handling on the parent MFD, which may require an additional work
queue thread to perform non-blocking bus transfers.

Signed-off-by: Sarah Renkhoff <[email protected]>
  • Loading branch information
Irockasingranite committed Jul 9, 2024
1 parent af18150 commit f0d46a9
Show file tree
Hide file tree
Showing 7 changed files with 1,292 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ add_subdirectory_ifdef(CONFIG_GPIO gpio)
add_subdirectory_ifdef(CONFIG_MFD mfd)
add_subdirectory_ifdef(CONFIG_RTC rtc)
add_subdirectory_ifdef(CONFIG_SENSOR sensor)
add_subdirectory_ifdef(CONFIG_SERIAL serial)
1 change: 1 addition & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ rsource "gpio/Kconfig"
rsource "mfd/Kconfig"
rsource "rtc/Kconfig"
rsource "sensor/Kconfig"
rsource "serial/Kconfig"

endmenu
6 changes: 6 additions & 0 deletions drivers/serial/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2024 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

zephyr_library_amend()

zephyr_library_sources_ifdef(CONFIG_UART_SC16IS75X uart_sc16is75x.c)
8 changes: 8 additions & 0 deletions drivers/serial/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2024 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

if SERIAL

rsource "Kconfig.sc16is75x"

endif # I2C
36 changes: 36 additions & 0 deletions drivers/serial/Kconfig.sc16is75x
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) 2024 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

menuconfig UART_SC16IS75X
bool "NXP SC16IS75x UART driver"
default y
depends on DT_HAS_NXP_SC16IS75X_UART_ENABLED
depends on MFD_SC16IS75X
help
Enable driver for UART controller part of an SC16IS75x bridge.

if UART_SC16IS75X

config UART_SC16IS75X_LOOPBACK
bool "Enable internal loopback"
help
Enable the NXP SC16IS75x local UART loopback mode (internal).

In this mode the RTS and DTR signals are looped back to the
CTS and DSR and the TX output is looped back to the RX input
internally for all channels.

config UART_SC16IS75X_INIT_PRIORITY
int "Init priority"
default 60
help
Device driver initialization priority.

config UART_SC16IS75X_INTERRUPT_DRIVEN
bool
default y if UART_INTERRUPT_DRIVEN
default n
depends on MFD_SC16IS75X_INTERRUPTS
depends on MFD_SC16IS75X_ASYNC

endif # UART_SC16IS75X
Loading

0 comments on commit f0d46a9

Please sign in to comment.