drivers: spi: Set the spi_config before calling Chip select configure

This was accidentally moved to after calling chip select configure

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
Mahesh Mahadevan 2020-09-29 16:58:26 -05:00 committed by Carles Cufí
parent 8ddd7f0f23
commit 133705f497

View file

@ -183,6 +183,7 @@ static int spi_mcux_configure(const struct device *dev,
SPI_SetDummyData(base, 0);
data->ctx.config = spi_cfg;
spi_context_cs_configure(&data->ctx);
} else {
spi_slave_config_t slave_config;
@ -214,8 +215,6 @@ static int spi_mcux_configure(const struct device *dev,
spi_mcux_transfer_callback, data);
}
data->ctx.config = spi_cfg;
return 0;
}