Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Frank Li <Frank.Li@nxp.com>
To: Vinod Koul <vkoul@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	 Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Fabio Estevam <festevam@gmail.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	 imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	 Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 2/6] dmaengine: Add common slave configuration to dma_chan
Date: Wed, 14 Jan 2026 12:12:43 -0500	[thread overview]
Message-ID: <20260114-dma_common_config-v1-2-64feb836ff04@nxp.com> (raw)
In-Reply-To: <20260114-dma_common_config-v1-0-64feb836ff04@nxp.com>

Add a common slave configuration 'config' to struct dma_chan to avoid
duplicating configuration data in each driver. Store the configuration when
dmaengine_slave_config() is called.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 include/linux/dmaengine.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 01d3e44e3cb426d9ad085eda1bc562ca7d266cb0..362a43c3e36e232b5a65ff78ba0b692c0401e50c 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -432,6 +432,8 @@ struct dma_chan {
 	char *dbg_client_name;
 #endif
 
+	struct dma_slave_config config;
+
 	struct list_head device_node;
 	struct dma_chan_percpu __percpu *local;
 	int client_count;
@@ -962,6 +964,8 @@ struct dma_device {
 static inline int dmaengine_slave_config(struct dma_chan *chan,
 					  struct dma_slave_config *config)
 {
+	chan->config = *config;
+
 	if (chan->device->device_config)
 		return chan->device->device_config(chan, config);
 

-- 
2.34.1


  parent reply	other threads:[~2026-01-14 17:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 17:12 [PATCH 0/6] dmaengine: Add common dma_slave_config and split it into src and dst parts Frank Li
2026-01-14 17:12 ` [PATCH 1/6] dmaengine: Move struct dma_chan after struct dma_slave_config Frank Li
2026-01-14 17:12 ` Frank Li [this message]
2026-01-14 17:12 ` [PATCH 3/6] dmaengine: fsl-edma: use dma_chan common config Frank Li
2026-01-14 17:12 ` [PATCH 4/6] dmaengine: imx-sdma: use common config at dma_chan Frank Li
2026-01-14 17:12 ` [PATCH 5/6] dmaengine: Add union and dma_slave_get_config() helper for dma_slave_config Frank Li
2026-01-14 17:12 ` [PATCH 6/6] dmaengine: fsl-edma: use common dma_slave_get_cfg() Frank Li
2026-03-09 11:24 ` [PATCH 0/6] dmaengine: Add common dma_slave_config and split it into src and dst parts Vinod Koul
2026-03-09 14:27   ` Frank Li
2026-03-17 10:26     ` Vinod Koul
2026-03-17 13:56       ` Frank Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260114-dma_common_config-v1-2-64feb836ff04@nxp.com \
    --to=frank.li@nxp.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox