Skip to content

Commit 83f1bd7

Browse files
MikhailSiominjhedberg
authored andcommitted
drivers: spi_nxp_lpspi: allow use of SPI_HOLD_ON_CS flag for lpspi v1
Allow use of SPI_HOLD_ON_CS flag for lpspi with major version 1 when cs is controlled by gpio. Signed-off-by: Mikhail Siomin <[email protected]>
1 parent 0f89b4a commit 83f1bd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/spi/spi_nxp_lpspi/spi_nxp_lpspi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ static int transceive(const struct device *dev, const struct spi_config *spi_cfg
371371
goto error;
372372
}
373373

374-
if (data->major_version < 2 && spi_cfg->operation & SPI_HOLD_ON_CS) {
374+
if (data->major_version < 2 && spi_cfg->operation & SPI_HOLD_ON_CS &&
375+
!spi_cs_is_gpio(spi_cfg)) {
375376
/* on this version of LPSPI, due to errata in design
376377
* CS must be deasserted in order to clock all words,
377378
* so HOLD_ON_CS flag cannot be supported.

0 commit comments

Comments
 (0)