Commit 1faab1f2 authored by Maxime Ripard's avatar Maxime Ripard Committed by Vinod Koul

Documentation: dmaengine: Update the documentation

Now that we have splitted device_control and removed device_slave_caps in favor
of a few dma_device variables, update the documentation accordingly.
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 2c44ad91
...@@ -113,6 +113,31 @@ need to initialize a few fields in there: ...@@ -113,6 +113,31 @@ need to initialize a few fields in there:
* channels: should be initialized as a list using the * channels: should be initialized as a list using the
INIT_LIST_HEAD macro for example INIT_LIST_HEAD macro for example
* src_addr_widths:
- should contain a bitmask of the supported source transfer width
* dst_addr_widths:
- should contain a bitmask of the supported destination transfer
width
* directions:
- should contain a bitmask of the supported slave directions
(i.e. excluding mem2mem transfers)
* residue_granularity:
- Granularity of the transfer residue reported to dma_set_residue.
- This can be either:
+ Descriptor
-> Your device doesn't support any kind of residue
reporting. The framework will only know that a particular
transaction descriptor is done.
+ Segment
-> Your device is able to report which chunks have been
transferred
+ Burst
-> Your device is able to report which burst have been
transferred
* dev: should hold the pointer to the struct device associated * dev: should hold the pointer to the struct device associated
to your current driver instance. to your current driver instance.
...@@ -274,48 +299,32 @@ supported. ...@@ -274,48 +299,32 @@ supported.
account the current period. account the current period.
- This function can be called in an interrupt context. - This function can be called in an interrupt context.
* device_control * device_config
- Used by client drivers to control and configure the channel it - Reconfigures the channel with the configuration given as
has a handle on. argument
- Called with a command and an argument - This command should NOT perform synchronously, or on any
+ The command is one of the values listed by the enum currently queued transfers, but only on subsequent ones
dma_ctrl_cmd. The valid commands are: - In this case, the function will receive a dma_slave_config
+ DMA_PAUSE structure pointer as an argument, that will detail which
+ Pauses a transfer on the channel configuration to use.
+ This command should operate synchronously on the channel, - Even though that structure contains a direction field, this
pausing right away the work of the given channel field is deprecated in favor of the direction argument given to
+ DMA_RESUME the prep_* functions
+ Restarts a transfer on the channel
+ This command should operate synchronously on the channel, * device_pause
resuming right away the work of the given channel - Pauses a transfer on the channel
+ DMA_TERMINATE_ALL - This command should operate synchronously on the channel,
+ Aborts all the pending and ongoing transfers on the pausing right away the work of the given channel
channel
+ This command should operate synchronously on the channel, * device_resume
terminating right away all the channels - Resumes a transfer on the channel
+ DMA_SLAVE_CONFIG - This command should operate synchronously on the channel,
+ Reconfigures the channel with passed configuration pausing right away the work of the given channel
+ This command should NOT perform synchronously, or on any
currently queued transfers, but only on subsequent ones * device_terminate_all
+ In this case, the function will receive a - Aborts all the pending and ongoing transfers on the channel
dma_slave_config structure pointer as an argument, that - This command should operate synchronously on the channel,
will detail which configuration to use. terminating right away all the channels
+ Even though that structure contains a direction field,
this field is deprecated in favor of the direction
argument given to the prep_* functions
+ FSLDMA_EXTERNAL_START
+ TODO: Why does that even exist?
+ The argument is an opaque unsigned long. This actually is a
pointer to a struct dma_slave_config that should be used only
in the DMA_SLAVE_CONFIG.
* device_slave_caps
- Called through the framework by client drivers in order to have
an idea of what are the properties of the channel allocated to
them.
- Such properties are the buswidth, available directions, etc.
- Required for every generic layer doing DMA transfers, such as
ASoC.
Misc notes (stuff that should be documented, but don't really know Misc notes (stuff that should be documented, but don't really know
where to put them) where to put them)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment