From 405ebc0cd08b6a45ab61df6f301a3b050bff42ae Mon Sep 17 00:00:00 2001 From: Bryce Wilkins Date: Thu, 28 Jul 2022 20:41:26 -0700 Subject: [PATCH] drivers: spi: Set spi context for mcux flexcomm spi slave configuration This is a bug fix. A pointer to the spi configuration is not saved when the spi driver is configured for slave operation and it can lead to runtime errors. Signed-off-by: Bryce Wilkins --- drivers/spi/spi_mcux_flexcomm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi_mcux_flexcomm.c b/drivers/spi/spi_mcux_flexcomm.c index e1463e564e..ccf236b64d 100644 --- a/drivers/spi/spi_mcux_flexcomm.c +++ b/drivers/spi/spi_mcux_flexcomm.c @@ -289,6 +289,8 @@ static int spi_mcux_configure(const struct device *dev, SPI_SlaveTransferCreateHandle(base, &data->handle, spi_mcux_transfer_callback, data); + + data->ctx.config = spi_cfg; } return 0;