Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1730588

[PATCH 2/2] dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Stefan Brüns <stefan.bruens@rwth-aachen.de>
Newsgroups linux.kernel
Subject [PATCH 2/2] dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify
Date Tue, 12 Sep 2017 01:50:03 +0200
Message-ID <uoGCL-1Nt-7@gated-at.bofh.it> (permalink)
References <uoGCL-1Nt-9@gated-at.bofh.it>
X-Ironport-Av E=Sophos;i="5.42,380,1500933600"; d="scan'208";a="12879114"
X-Mailer git-send-email 2.14.1
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8bit
X-Originating-IP [78.48.75.71]
X-Clientproxiedby rwthex-w1-a.rwth-ad.de (2002:8682:1a9c::8682:1a9c) To rwthex-w1-a.rwth-ad.de (2002:8682:1a9c::8682:1a9c)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 63
Organization linux.* mail to news gateway
X-Original-Cc Dan Williams <dan.j.williams@intel.com>, Vinod Koul <vinod.koul@intel.com>, <linux-kernel@vger.kernel.org>
X-Original-Date Tue, 12 Sep 2017 01:44:45 +0200
X-Original-Message-ID <20170911234445.30831-3-stefan.bruens@rwth-aachen.de>
X-Original-References <20170911234445.30831-1-stefan.bruens@rwth-aachen.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1730588

Show key headers only | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] dmaengine: Correct some documentation Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-12 01:50 +0200
  [PATCH 1/2] dmaengine: List all allowed values for src/dst_addr_width in kernel doc Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-12 01:50 +0200
  [PATCH 2/2] dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-12 01:50 +0200
  Re: [PATCH 0/2] dmaengine: Correct some documentation Vinod Koul <vinod.koul@intel.com> - 2017-09-21 19:10 +0200

csiph-web