drivers: spi: update error type to skip word_size testcases

Workaround to avoid getting the -EFAULT (14) error when running
the test_spi_word_size_x (x = 7, 9, 24) test cases:
Since these testcase configurations aren't supported, update
the error type to ENOTSUP to allow skipping the test cases using ztest.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
This commit is contained in:
Fabrice DJIATSA 2025-06-06 09:51:57 +02:00 committed by Daniel DeGrasse
commit 994efc0b92

View file

@ -1122,7 +1122,7 @@ static int transceive_dma(const struct device *dev,
if ((tx_bufs != NULL && !spi_buf_set_in_nocache(tx_bufs)) ||
(rx_bufs != NULL && !spi_buf_set_in_nocache(rx_bufs))) {
LOG_ERR("SPI DMA transfers not supported on cached memory");
return -EFAULT;
return -ENOTSUP;
}
#endif /* CONFIG_DCACHE */