drivers: spi: align dspi and lpspi spi_mcux_transfer_next_packet
Add return code to lpspi spi_mcux_transfer_next_packet and print the kStatus_* return code since it information is lost when translated to errno. Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
This commit is contained in:
parent
e517af4cff
commit
ef867e4c7e
2 changed files with 13 additions and 7 deletions
|
@ -195,11 +195,11 @@ static int spi_mcux_transfer_next_packet(const struct device *dev)
|
|||
|
||||
status = DSPI_MasterTransferNonBlocking(base, &data->handle, &transfer);
|
||||
if (status != kStatus_Success) {
|
||||
LOG_ERR("Transfer could not start");
|
||||
LOG_ERR("Transfer could not start on %s: %d", dev->name, status);
|
||||
return status == kDSPI_Busy ? -EBUSY : -EINVAL;
|
||||
}
|
||||
|
||||
return status == kStatus_Success ? 0 :
|
||||
status == kDSPI_Busy ? -EBUSY : -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void spi_mcux_isr(const struct device *dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue