Skip to content

Commit a43c23c

Browse files
pcercueinunojsa
authored andcommitted
Documentation: dmaengine: Document new dma_vec API
Document the dmaengine_prep_peripheral_dma_vec() API function, the device_prep_peripheral_dma_vec() backend function, and the dma_vec struct. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Link: https://lore.kernel.org/r/20240620122726.41232-8-paul@crapouillou.net Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 50318b5 commit a43c23c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Documentation/driver-api/dmaengine/client.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ The details of these operations are:
8080

8181
- slave_sg: DMA a list of scatter gather buffers from/to a peripheral
8282

83+
- peripheral_dma_vec: DMA an array of scatter gather buffers from/to a
84+
peripheral. Similar to slave_sg, but uses an array of dma_vec
85+
structures instead of a scatterlist.
86+
8387
- dma_cyclic: Perform a cyclic DMA operation from/to a peripheral till the
8488
operation is explicitly stopped.
8589

@@ -102,6 +106,11 @@ The details of these operations are:
102106
unsigned int sg_len, enum dma_data_direction direction,
103107
unsigned long flags);
104108
109+
struct dma_async_tx_descriptor *dmaengine_prep_peripheral_dma_vec(
110+
struct dma_chan *chan, const struct dma_vec *vecs,
111+
size_t nents, enum dma_data_direction direction,
112+
unsigned long flags);
113+
105114
struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
106115
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
107116
size_t period_len, enum dma_data_direction direction);

Documentation/driver-api/dmaengine/provider.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,12 @@ supported.
433433
- residue: Provides the residue bytes of the transfer for those that
434434
support residue.
435435

436+
- ``device_prep_peripheral_dma_vec``
437+
438+
- Similar to ``device_prep_slave_sg``, but it takes a pointer to a
439+
array of ``dma_vec`` structures, which (in the long run) will replace
440+
scatterlists.
441+
436442
- ``device_issue_pending``
437443

438444
- Takes the first transaction descriptor in the pending queue,
@@ -544,6 +550,10 @@ dma_cookie_t
544550
- Not really relevant any more since the introduction of ``virt-dma``
545551
that abstracts it away.
546552

553+
dma_vec
554+
555+
- A small structure that contains a DMA address and length.
556+
547557
DMA_CTRL_ACK
548558

549559
- If clear, the descriptor cannot be reused by provider until the

0 commit comments

Comments
 (0)