LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC v3 1/7] dmaengine: Couple DMA channels to their physical DMA device
@ 2008-02-12 16:43 Haavard Skinnemoen
  2008-02-12 16:43 ` [RFC v3 2/7] dmaengine: Add dma_client parameter to device_alloc_chan_resources Haavard Skinnemoen
  0 siblings, 1 reply; 22+ messages in thread
From: Haavard Skinnemoen @ 2008-02-12 16:43 UTC (permalink / raw)
  To: linux-kernel, Dan Williams
  Cc: Shannon Nelson, David Brownell, kernel, Francis Moreau,
	Paul Mundt, Vladimir A. Barinov, Pierre Ossman,
	Haavard Skinnemoen

Set the 'parent' field of channel class devices to point to the
physical DMA device initialized by the DMA engine driver.

This allows drivers to use chan->dev.parent for syncing DMA buffers
and adds a 'device' symlink to the real device in
/sys/class/dma/dmaXchanY.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
---
 drivers/dma/dmaengine.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 2996523..7c7cb4b 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -379,7 +379,7 @@ int dma_async_device_register(struct dma_device *device)
 
 		chan->chan_id = chancnt++;
 		chan->dev.class = &dma_devclass;
-		chan->dev.parent = NULL;
+		chan->dev.parent = device->dev;
 		snprintf(chan->dev.bus_id, BUS_ID_SIZE, "dma%dchan%d",
 		         device->dev_id, chan->chan_id);
 
-- 
1.5.3.8


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

end of thread, other threads:[~2008-02-19 18:55 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-12 16:43 [RFC v3 1/7] dmaengine: Couple DMA channels to their physical DMA device Haavard Skinnemoen
2008-02-12 16:43 ` [RFC v3 2/7] dmaengine: Add dma_client parameter to device_alloc_chan_resources Haavard Skinnemoen
2008-02-12 16:43   ` [RFC v3 3/7] dmaengine: Add dma_chan_is_in_use() function Haavard Skinnemoen
2008-02-12 16:43     ` [RFC v3 4/7] dmaengine: Add slave DMA interface Haavard Skinnemoen
2008-02-12 16:43       ` [RFC v3 5/7] dmaengine: Make DMA Engine menu visible for AVR32 users Haavard Skinnemoen
2008-02-12 16:43         ` [RFC v3 6/7] dmaengine: Driver for the Synopsys DesignWare DMA controller Haavard Skinnemoen
2008-02-12 16:43           ` [RFC v3 7/7] Atmel MCI: Driver for Atmel on-chip MMC controllers Haavard Skinnemoen
2008-02-12 20:43         ` [RFC v3 5/7] dmaengine: Make DMA Engine menu visible for AVR32 users Olof Johansson
2008-02-12 22:13           ` Haavard Skinnemoen
2008-02-12 22:27             ` Dan Williams
2008-02-13  8:44               ` Haavard Skinnemoen
2008-02-13  7:21       ` [RFC v3 4/7] dmaengine: Add slave DMA interface Dan Williams
2008-02-13  8:03         ` Haavard Skinnemoen
2008-02-13 19:07       ` Dan Williams
2008-02-13 19:24         ` Haavard Skinnemoen
2008-02-15  9:53           ` Haavard Skinnemoen
2008-02-15 17:12             ` Nelson, Shannon
2008-02-18 13:29               ` Haavard Skinnemoen
2008-02-19 18:46                 ` Nelson, Shannon
2008-02-16 20:06             ` Dan Williams
2008-02-18 13:22               ` Haavard Skinnemoen
2008-02-18 22:42                 ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).