From 9166d6ac7bbc1fe273ccb9e460f04262d04aae53 Mon Sep 17 00:00:00 2001 From: Declan Snyder Date: Mon, 7 Jul 2025 17:35:46 -0500 Subject: [PATCH] spi_mcux_dspi: Hotfix for failing null rx test This is not really high priority to support and is disrupting test reporting, for now just hotfix the test by returning that this is not supported, it's not really necessary anyways, there's multiple ways to call the API to achieve the same effect. Signed-off-by: Declan Snyder --- drivers/spi/spi_mcux_dspi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/spi/spi_mcux_dspi.c b/drivers/spi/spi_mcux_dspi.c index afadcc6709a..7cbb6f12b6b 100644 --- a/drivers/spi/spi_mcux_dspi.c +++ b/drivers/spi/spi_mcux_dspi.c @@ -687,6 +687,13 @@ static int transceive(const struct device *dev, SPI_Type *base = config->base; #endif + if (rx_bufs == NULL) { + /* FIXME: for some reason this messes up the DMA configuration + * probably because CITER is 0 and transfer is starting for some reason + */ + return -ENOTSUP; + } + spi_context_lock(&data->ctx, asynchronous, cb, userdata, spi_cfg); ret = spi_mcux_configure(dev, spi_cfg); @@ -694,6 +701,7 @@ static int transceive(const struct device *dev, goto out; } + spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, 1); spi_context_cs_control(&data->ctx, true); @@ -726,6 +734,7 @@ static int transceive(const struct device *dev, } ret = spi_context_wait_for_completion(&data->ctx); + out: spi_context_release(&data->ctx, ret);