Skip to content

Commit 9166d6a

Browse files
decsnydanieldegrasse
authored andcommitted
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 <declan.snyder@nxp.com>
1 parent a622070 commit 9166d6a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/spi/spi_mcux_dspi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,13 +687,21 @@ static int transceive(const struct device *dev,
687687
SPI_Type *base = config->base;
688688
#endif
689689

690+
if (rx_bufs == NULL) {
691+
/* FIXME: for some reason this messes up the DMA configuration
692+
* probably because CITER is 0 and transfer is starting for some reason
693+
*/
694+
return -ENOTSUP;
695+
}
696+
690697
spi_context_lock(&data->ctx, asynchronous, cb, userdata, spi_cfg);
691698

692699
ret = spi_mcux_configure(dev, spi_cfg);
693700
if (ret) {
694701
goto out;
695702
}
696703

704+
697705
spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, 1);
698706

699707
spi_context_cs_control(&data->ctx, true);
@@ -726,6 +734,7 @@ static int transceive(const struct device *dev,
726734
}
727735

728736
ret = spi_context_wait_for_completion(&data->ctx);
737+
729738
out:
730739
spi_context_release(&data->ctx, ret);
731740

0 commit comments

Comments
 (0)