2010/7/19 Dan Williams <dan.j.williams@intel.com>:
This is very interesting, let's examine this closely as a comparison!
I'm looking at it from the point of a generic slave control mechanism,
though I suspect it is designed to be Intel-specific so keep that in mind.
kerneldoc and struct members seem to be out-of-sync but I
see the general idea.
Of these members handshaking, cfg_mode, hs_mode
and I suspect also device_instance are candidates for
the private config since they cannot be assumed to
exist on all DMA engines. (Also goes for cfg_[lo|hi] from
the kerneldoc)
The callback and callback param are configured
per-transfer in the current API, so I don't see what they
are doing here at all.
Remains: direction, then register address, burstsize and
word width of the source and destination.
(Register address present in kerneldoc but not in struct,
burstsize present in struct but not in kerneldoc, whatever)
I don't have src/dst pairs in my API, because since the
only data provision mechanisms to slaves are sglists,
and these provide either source or destination address
depending on transfer direction.
Also I assume that since sglists will be mem->peripheral
or peripheral->mem, you know what is required on the
memory side of things for word width and burstsize, and
these only affect the device side of things.
So that is why my API is more minimalistic.
If you feel src/dst versions of wordwidth, register address
and burstsize are a must, I can add them, no big thing,
just makes for some nonused parameters, mostly.
Yours,
Linus Walleij
--