diff options
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 30de0197263a..cc535a478bae 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -441,6 +441,21 @@ typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param); | |||
441 | 441 | ||
442 | typedef void (*dma_async_tx_callback)(void *dma_async_param); | 442 | typedef void (*dma_async_tx_callback)(void *dma_async_param); |
443 | 443 | ||
444 | enum dmaengine_tx_result { | ||
445 | DMA_TRANS_NOERROR = 0, /* SUCCESS */ | ||
446 | DMA_TRANS_READ_FAILED, /* Source DMA read failed */ | ||
447 | DMA_TRANS_WRITE_FAILED, /* Destination DMA write failed */ | ||
448 | DMA_TRANS_ABORTED, /* Op never submitted / aborted */ | ||
449 | }; | ||
450 | |||
451 | struct dmaengine_result { | ||
452 | enum dmaengine_tx_result result; | ||
453 | u32 residue; | ||
454 | }; | ||
455 | |||
456 | typedef void (*dma_async_tx_callback_result)(void *dma_async_param, | ||
457 | const struct dmaengine_result *result); | ||
458 | |||
444 | struct dmaengine_unmap_data { | 459 | struct dmaengine_unmap_data { |
445 | u8 map_cnt; | 460 | u8 map_cnt; |
446 | u8 to_cnt; | 461 | u8 to_cnt; |
@@ -478,6 +493,7 @@ struct dma_async_tx_descriptor { | |||
478 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); | 493 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); |
479 | int (*desc_free)(struct dma_async_tx_descriptor *tx); | 494 | int (*desc_free)(struct dma_async_tx_descriptor *tx); |
480 | dma_async_tx_callback callback; | 495 | dma_async_tx_callback callback; |
496 | dma_async_tx_callback_result callback_result; | ||
481 | void *callback_param; | 497 | void *callback_param; |
482 | struct dmaengine_unmap_data *unmap; | 498 | struct dmaengine_unmap_data *unmap; |
483 | #ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH | 499 | #ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH |