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 <bryce.wilkins@gmail.com>
This commit is contained in:
parent
b076aa373a
commit
405ebc0cd0
1 changed files with 2 additions and 0 deletions
|
@ -289,6 +289,8 @@ static int spi_mcux_configure(const struct device *dev,
|
||||||
|
|
||||||
SPI_SlaveTransferCreateHandle(base, &data->handle,
|
SPI_SlaveTransferCreateHandle(base, &data->handle,
|
||||||
spi_mcux_transfer_callback, data);
|
spi_mcux_transfer_callback, data);
|
||||||
|
|
||||||
|
data->ctx.config = spi_cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue