drivers/spi: Return an error on SPI_HALF_DUPLEX for relevant drivers

This feature will need to be, however, implemented driver by driver
afterwards.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2021-09-09 16:16:59 +02:00 committed by Carles Cufí
commit 01b9813d73
20 changed files with 98 additions and 0 deletions

View file

@ -59,6 +59,11 @@ static int spi_cc13xx_cc26xx_configure(const struct device *dev,
return 0;
}
if (config->operation & SPI_HALF_DUPLEX) {
LOG_ERR("Half-duplex not supported");
return -ENOTSUP;
}
/* Slave mode has not been implemented */
if (SPI_OP_MODE_GET(config->operation) != SPI_OP_MODE_MASTER) {
LOG_ERR("Slave mode is not supported");