Re: [PATCH 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()
From: Arnd Bergmann
Date: Thu Jun 25 2015 - 07:16:24 EST
On Wednesday 24 June 2015 21:54:01 Vinod Koul wrote:
> > It would be nice to find another name for the
> > dma_request_slave_channel_compat() so with the new name we could have chance
> > to rearrange the parameters: (dev, name, mask, fn, fn_param)
> >
> > We would end up with the following APIs, all returning with error code on failure:
> > dma_request_slave_channel(dev, name);
> > dma_request_channel_legacy(mask, fn, fn_param);
> > dma_request_slave_channel_compat(mask, fn, fn_param, dev, name);
> > dma_request_any_channel(mask);
> This is good idea but still we end up with 4 APIs. Why not just converge to
> two API, one legacy + memcpy + filer fn and one untimate API for slave?
>
> Internally we may have 4 APIs for cleaner handling...
>
Not sure if it's realistic, but I think it would be nice to have
a way for converting the current slave drivers that use the
mask/filter/param API to the dev/name based API. We should
be able to do this by registering a lookup table from platform
code that translates one to the other, like we do with the
clkdev lookup to find a device clock based on a local identifier.
The main downside of this is that it's a lot of work if we want
to completely remove dma_request_channel() for slave drivers,
but it could be done more gradually.
Another upside is that we could come up with a mechanism to
avoid the link-time dependency on the filter-function that
causes problems when that filter is defined in a loadable
module for the dmaengine driver.
Arnd
--
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/