aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dmaengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r--include/linux/dmaengine.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 57a43adfc39e..fe40bc020af6 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -89,6 +89,7 @@ enum dma_transaction_type {
89 DMA_MEMSET, 89 DMA_MEMSET,
90 DMA_MEMCPY_CRC32C, 90 DMA_MEMCPY_CRC32C,
91 DMA_INTERRUPT, 91 DMA_INTERRUPT,
92 DMA_PRIVATE,
92 DMA_SLAVE, 93 DMA_SLAVE,
93}; 94};
94 95
@@ -224,6 +225,18 @@ typedef enum dma_state_client (*dma_event_callback) (struct dma_client *client,
224 struct dma_chan *chan, enum dma_state state); 225 struct dma_chan *chan, enum dma_state state);
225 226
226/** 227/**
228 * typedef dma_filter_fn - callback filter for dma_request_channel
229 * @chan: channel to be reviewed
230 * @filter_param: opaque parameter passed through dma_request_channel
231 *
232 * When this optional parameter is specified in a call to dma_request_channel a
233 * suitable channel is passed to this routine for further dispositioning before
234 * being returned. Where 'suitable' indicates a non-busy channel that
235 * satisfies the given capability mask.
236 */
237typedef enum dma_state_client (*dma_filter_fn)(struct dma_chan *chan, void *filter_param);
238
239/**
227 * struct dma_client - info on the entity making use of DMA services 240 * struct dma_client - info on the entity making use of DMA services
228 * @event_callback: func ptr to call when something happens 241 * @event_callback: func ptr to call when something happens
229 * @cap_mask: only return channels that satisfy the requested capabilities 242 * @cap_mask: only return channels that satisfy the requested capabilities
@@ -472,6 +485,9 @@ void dma_async_device_unregister(struct dma_device *device);
472void dma_run_dependencies(struct dma_async_tx_descriptor *tx); 485void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
473struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); 486struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
474void dma_issue_pending_all(void); 487void dma_issue_pending_all(void);
488#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
489struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
490void dma_release_channel(struct dma_chan *chan);
475 491
476/* --- Helper iov-locking functions --- */ 492/* --- Helper iov-locking functions --- */
477 493