mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dmaengine: xilinx_dma: Set dma_device directions
@ 2025-03-14 13:48 Thomas Gessler
  2025-03-14 15:09 ` Folker Schwesinger
  2025-03-17  6:48 ` Pandey, Radhey Shyam
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Gessler @ 2025-03-14 13:48 UTC (permalink / raw)
  To: dmaengine
  Cc: Thomas Gessler, Vinod Koul, Michal Simek, Marek Vasut,
	Radhey Shyam Pandey, Uwe Kleine-König, linux-arm-kernel,
	linux-kernel

Coalesce the direction bits from the enabled TX and/or RX channels into
the directions bit mask of dma_device. Without this mask set,
dma_get_slave_caps() in the DMAEngine fails, which prevents the driver
from being used with an IIO DMAEngine buffer.

Signed-off-by: Thomas Gessler <thomas.gessler@brueckmann-gmbh.de>
---
 drivers/dma/xilinx/xilinx_dma.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 108a7287f4cd..641aaf0c0f1c 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -3205,6 +3205,10 @@ static int xilinx_dma_probe(struct platform_device *pdev)
 		}
 	}
 
+	for (i = 0; i < xdev->dma_config->max_channels; i++)
+		if (xdev->chan[i])
+			xdev->common.directions |= xdev->chan[i]->direction;
+
 	if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
 		for (i = 0; i < xdev->dma_config->max_channels; i++)
 			if (xdev->chan[i])
-- 
2.43.0


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

end of thread, other threads:[~2025-05-07 11:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-14 13:48 [PATCH] dmaengine: xilinx_dma: Set dma_device directions Thomas Gessler
2025-03-14 15:09 ` Folker Schwesinger
2025-03-17  6:48 ` Pandey, Radhey Shyam
2025-05-07 10:20   ` Pandey, Radhey Shyam
2025-05-07 10:47     ` Folker Schwesinger
2025-05-07 10:59     ` Geßler, Thomas
2025-05-07 11:02       ` Pandey, Radhey Shyam

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

all inboxes | Powered by JetHome®