Re: [PATCH/RFC] dmaengine: add a slave parameter to __dma_request_channel()
From: Linus Walleij
Date: Fri Mar 30 2012 - 01:44:17 EST
On Fri, Mar 16, 2012 at 3:28 PM, Guennadi Liakhovetski
> On Fri, 16 Mar 2012, Linus Walleij wrote:
>> Oh I was not thinking of relying on config to sort out channels.
>> I was thinking of internalizing the dma_filter_fn and make it an
>> (optional, maybe?) part of dmaengine.
> Yessss!!! Let's do that! :-D Now, you're proposing exactly the same, as
> what I was proposing! :-)
> Now you just have to remove the filter function
> parameter from dma_request_channel() - it is anyway the same for all and
> implemented in the dmaengine core - and you get
> dma_request_channel(mask, slave_desc)
What is the point of mask on slave channels?
I was more thinking introduce a new call:
dma_request_slave_channel(struct device *dev);
>From this the core looks up a suitable channel for that device.
However you're right (in some later mail) that we need to distinguish
between RX/TX channels at this point, so I can agree we need some
additional parameter, but that should be very abstract, not containing
any custom stuff or any void * or something like that.
If the device and direction is really all we need to distinguish a suitable
channel (which I imagine) the signature may very well be:
dma_request_slave_channel(struct device *dev, enum dma_transfer_direction dir);
But I'm not sure. (Keep beating me about it... but at this point
I think code speaks more than words.)
> which is exactly what I was proposing! :-)
Sorry, not at all AFAICT.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/