public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] dmaengine: Correct some documentation
@ 2017-09-11 23:44 Stefan Brüns
  2017-09-11 23:44 ` [PATCH 1/2] dmaengine: List all allowed values for src/dst_addr_width in kernel doc Stefan Brüns
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Brüns @ 2017-09-11 23:44 UTC (permalink / raw)
  To: dmaengine; +Cc: Dan Williams, Vinod Koul, linux-kernel

Some small fixes for dmaengine documentation.

Stefan Brüns (2):
  dmaengine: List all allowed values for src/dst_addr_width in kernel
    doc
  dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify

 include/linux/dmaengine.h | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] dmaengine: List all allowed values for src/dst_addr_width in kernel doc
  2017-09-11 23:44 [PATCH 0/2] dmaengine: Correct some documentation Stefan Brüns
@ 2017-09-11 23:44 ` Stefan Brüns
  2017-09-11 23:44 ` [PATCH 2/2] dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify Stefan Brüns
  2017-09-21 17:06 ` [PATCH 0/2] dmaengine: Correct some documentation Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Brüns @ 2017-09-11 23:44 UTC (permalink / raw)
  To: dmaengine; +Cc: Dan Williams, Vinod Koul, linux-kernel

Commit 93c6ee94c140 ("dma: Support for 3 bytes word size") and
commit 534a729866f9 ("dmaengine: Add 16 bytes, 32 bytes and 64 bytes
bus widths") added additional values for the allowed word size, but
omitted these from the struct dma_slave_config documentation.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
 include/linux/dmaengine.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 8319101170fc..2910e7dadc7f 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -329,7 +329,7 @@ enum dma_slave_buswidth {
  * @src_addr_width: this is the width in bytes of the source (RX)
  * register where DMA data shall be read. If the source
  * is memory this may be ignored depending on architecture.
- * Legal values: 1, 2, 4, 8.
+ * Legal values: 1, 2, 3, 4, 8, 16, 32, 64.
  * @dst_addr_width: same as src_addr_width but for destination
  * target (TX) mutatis mutandis.
  * @src_maxburst: the maximum number of words (note: words, as in
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify
  2017-09-11 23:44 [PATCH 0/2] dmaengine: Correct some documentation Stefan Brüns
  2017-09-11 23:44 ` [PATCH 1/2] dmaengine: List all allowed values for src/dst_addr_width in kernel doc Stefan Brüns
@ 2017-09-11 23:44 ` Stefan Brüns
  2017-09-21 17:06 ` [PATCH 0/2] dmaengine: Correct some documentation Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Brüns @ 2017-09-11 23:44 UTC (permalink / raw)
  To: dmaengine; +Cc: Dan Williams, Vinod Koul, linux-kernel

struct dma_slave_caps documentation omitted the correct kernel-doc
opening comment mark.

Document byte granularity and interpretation of the src/dst_addr_widths
bit flag fields used by struct dma_slave_caps and struct dma_device.

Add punctuation to their "directions" member documentations, and cleanup
wording of the description.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
 include/linux/dmaengine.h | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 2910e7dadc7f..f838764993eb 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -404,14 +404,16 @@ enum dma_residue_granularity {
 	DMA_RESIDUE_GRANULARITY_BURST = 2,
 };
 
-/* struct dma_slave_caps - expose capabilities of a slave channel only
- *
- * @src_addr_widths: bit mask of src addr widths the channel supports
- * @dst_addr_widths: bit mask of dstn addr widths the channel supports
- * @directions: bit mask of slave direction the channel supported
- * 	since the enum dma_transfer_direction is not defined as bits for each
- * 	type of direction, the dma controller should fill (1 << <TYPE>) and same
- * 	should be checked by controller as well
+/**
+ * struct dma_slave_caps - expose capabilities of a slave channel only
+ * @src_addr_widths: bit mask of src addr widths the channel supports.
+ *	Width is specified in bytes, e.g. for a channel supporting
+ *	a width of 4 the mask should have BIT(4) set.
+ * @dst_addr_widths: bit mask of dst addr widths the channel supports
+ * @directions: bit mask of slave directions the channel supports.
+ *	Since the enum dma_transfer_direction is not defined as bit flag for
+ *	each type, the dma controller should set BIT(<TYPE>) and same
+ *	should be checked by controller as well
  * @max_burst: max burst capability per-transfer
  * @cmd_pause: true, if pause and thereby resume is supported
  * @cmd_terminate: true, if terminate cmd is supported
@@ -678,11 +680,13 @@ struct dma_filter {
  * @dev_id: unique device ID
  * @dev: struct device reference for dma mapping api
  * @src_addr_widths: bit mask of src addr widths the device supports
+ *	Width is specified in bytes, e.g. for a device supporting
+ *	a width of 4 the mask should have BIT(4) set.
  * @dst_addr_widths: bit mask of dst addr widths the device supports
- * @directions: bit mask of slave direction the device supports since
- * 	the enum dma_transfer_direction is not defined as bits for
- * 	each type of direction, the dma controller should fill (1 <<
- * 	<TYPE>) and same should be checked by controller as well
+ * @directions: bit mask of slave directions the device supports.
+ *	Since the enum dma_transfer_direction is not defined as bit flag for
+ *	each type, the dma controller should set BIT(<TYPE>) and same
+ *	should be checked by controller as well
  * @max_burst: max burst capability per-transfer
  * @residue_granularity: granularity of the transfer residue reported
  *	by tx_status
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] dmaengine: Correct some documentation
  2017-09-11 23:44 [PATCH 0/2] dmaengine: Correct some documentation Stefan Brüns
  2017-09-11 23:44 ` [PATCH 1/2] dmaengine: List all allowed values for src/dst_addr_width in kernel doc Stefan Brüns
  2017-09-11 23:44 ` [PATCH 2/2] dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify Stefan Brüns
@ 2017-09-21 17:06 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2017-09-21 17:06 UTC (permalink / raw)
  To: Stefan Brüns; +Cc: dmaengine, Dan Williams, linux-kernel

On Tue, Sep 12, 2017 at 01:44:43AM +0200, Stefan Brüns wrote:
> Some small fixes for dmaengine documentation.

Applied, thanks

> 
> Stefan Brüns (2):
>   dmaengine: List all allowed values for src/dst_addr_width in kernel
>     doc
>   dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify
> 
>  include/linux/dmaengine.h | 30 +++++++++++++++++-------------
>  1 file changed, 17 insertions(+), 13 deletions(-)
> 
> -- 
> 2.14.1
> 

-- 
~Vinod

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-21 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11 23:44 [PATCH 0/2] dmaengine: Correct some documentation Stefan Brüns
2017-09-11 23:44 ` [PATCH 1/2] dmaengine: List all allowed values for src/dst_addr_width in kernel doc Stefan Brüns
2017-09-11 23:44 ` [PATCH 2/2] dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify Stefan Brüns
2017-09-21 17:06 ` [PATCH 0/2] dmaengine: Correct some documentation Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox