spi: introduce SPI_TRANS_FAIL_IO for error reporting
authorNam Cao <namcao@linutronix.de>
Wed, 29 Nov 2023 16:31:55 +0000 (17:31 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 30 Nov 2023 12:02:39 +0000 (12:02 +0000)
commit39cefd85098d12439586824c39f8e1948fac186d
tree855cefc78774e7b78d495ac9ffb7671286a65bc4
parent2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
spi: introduce SPI_TRANS_FAIL_IO for error reporting

The default message transfer implementation - spi_transfer_one_message -
invokes the specific device driver's transfer_one(), then waits for
completion. However, there is no mechanism for the device driver to
report failure in the middle of the transfer.

Introduce SPI_TRANS_FAIL_IO for drivers to report transfer failure.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/4b420dac528e60f122adde16851da88e4798c1ea.1701274975.git.namcao@linutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h