spi: introduce master->handle_err() callback
This callback would be useful to handle an error that occurs in the generic implementation of transfer_one_message(). The good candidate for this is to drain FIFO and / or to terminate DMA transfers when timeout happened. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
c517d838eb
commit
b716c4ffc6
@@ -851,6 +851,9 @@ out:
|
||||
if (msg->status == -EINPROGRESS)
|
||||
msg->status = ret;
|
||||
|
||||
if (msg->status)
|
||||
master->handle_err(master, msg);
|
||||
|
||||
spi_finalize_current_message(master);
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user