Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NXP LPSPI: Move RTIO/DMA code to separate file #82750

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion drivers/spi/spi_nxp_lpspi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 NXP

zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_LPSPI spi_mcux_lpspi.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_LPSPI spi_nxp_lpspi_common.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_LPSPI_NORMAL spi_mcux_lpspi.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_LPSPI_RTIO spi_mcux_lpspi_rtio.c)
19 changes: 17 additions & 2 deletions drivers/spi/spi_nxp_lpspi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,38 @@
# SPDX-License-Identifier: Apache-2.0

config SPI_MCUX_LPSPI
bool "MCUX LPSPI driver"
bool "NXP LPSPI peripheral"
decsny marked this conversation as resolved.
Show resolved Hide resolved
default y
depends on DT_HAS_NXP_LPSPI_ENABLED
depends on CLOCK_CONTROL
select PINCTRL
help
Enable support for MCUX LPSPI driver.
Enable support for NXP LPSPI.

if SPI_MCUX_LPSPI

if !SPI_RTIO
config SPI_MCUX_LPSPI_DMA
bool "MCUX LPSPI SPI DMA Support"
select DMA
help
Enable the SPI DMA mode for SPI instances
that enable dma channels in their device tree node.

config SPI_MCUX_LPSPI_NORMAL
bool "NXP MCUX LPSPI driver"
default y
help
Use the traditional (non-RTIO) SPI driver for NXP LPSPI.
endif # !SPI_RTIO

if SPI_RTIO
config SPI_MCUX_LPSPI_RTIO
bool "NXP MCUX LPSPI RTIO based driver"
default y
help
Use the RTIO-based SPI driver for the NXP LPSPI.

config SPI_MCUX_RTIO_SQ_SIZE
int "number of available submission queue entries"
default 8 # sensible default that covers most common spi transactions
Expand Down
Loading