Message ID | cover.1701264413.git.namcao@linutronix.de |
---|---|
Headers | show |
Series | spi: spl022: fix sleeping in interrupt context | expand |
On Wed, Nov 29, 2023 at 2:32 PM Nam Cao <namcao@linutronix.de> wrote: > 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> This looks useful to me Acked-by: Linus Walleij <linus.walleij@linaro.org> > #define SPI_TRANS_FAIL_NO_START BIT(0) > +#define SPI_TRANS_FAIL_IO BIT(1) Is it obvious from context when these flags get set? from transfer_one() and in which flag field? Otherwise maybe we should add a comment. Yours, Linus Walleij
On Wed, Nov 29, 2023 at 02:55:18PM +0100, Linus Walleij wrote: > On Wed, Nov 29, 2023 at 2:32 PM Nam Cao <namcao@linutronix.de> wrote: > > #define SPI_TRANS_FAIL_NO_START BIT(0) > > +#define SPI_TRANS_FAIL_IO BIT(1) > > Is it obvious from context when these flags get set? > from transfer_one() and in which flag field? > > Otherwise maybe we should add a comment. Agree that the purpose of this flag is not clear. I will add some description in v2. Best regards, Nam