diff options
Diffstat (limited to 'drivers/dma/virt-dma.h')
-rw-r--r-- | drivers/dma/virt-dma.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h index 44ec57e..85c19d6 100644 --- a/drivers/dma/virt-dma.h +++ b/drivers/dma/virt-dma.h @@ -32,6 +32,8 @@ struct virt_dma_chan { struct list_head desc_submitted; struct list_head desc_issued; struct list_head desc_completed; + + struct virt_dma_desc *cyclic; }; static inline struct virt_dma_chan *to_virt_chan(struct dma_chan *chan) @@ -92,6 +94,18 @@ static inline void vchan_cookie_complete(struct virt_dma_desc *vd) } /** + * vchan_cyclic_callback - report the completion of a period + * vd: virtual descriptor + */ +static inline void vchan_cyclic_callback(struct virt_dma_desc *vd) +{ + struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); + + vc->cyclic = vd; + tasklet_schedule(&vc->task); +} + +/** * vchan_next_desc - peek at the next descriptor to be processed * vc: virtual channel to obtain descriptor from * |