Re: [RFC] dmaengine: add new api for preparing simple slave transfer

From: Linus Walleij
Date: Thu Jul 07 2011 - 15:37:59 EST


2011/7/7 Raju, Sundaram <sundaram@xxxxxx>:

> | Just put some enumerator in enum dma_ctrl_cmd in
> | dmaengine.h such as SDMA_TEXAS_STRIDE_CONFIG and call
> | like this:
> |
> | /* However that config struct needs to look, basically */
> | static struct sdma_ti_stride_cgf = {
> |      take = M,
> |      skip = N,
> | };
> |
> | ret = chan->device->device_control(chan, SDMA_TEXAS_STRIDE_CONFIG,
> | &sdma_ti_stride_cfg);
> |
> | Or something like this.
>
> I think this is better option than your 2b. This requires just an addition of
> one more enum in the dma_ctrl_cmd. What do you think about this?
> If Dan and you are okay with this I will send a small patch for this asap.

I think this is the best way to solve it atleast. It's clear what is
being done, and it's easy for a client trying to create such a slave
transfer to back out if it turns out that the DMAC in use does not
support this striding.

Send a patch out and I'll Ack it, FWIW.

Linus Walleij
--
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/