linux/Documentation/acpi
Andy Shevchenko 1b2e98bc1e dma: acpi-dma: introduce ACPI DMA helpers
There is a new generic API to get a DMA channel for a slave device (commit
9a6cecc8 "dmaengine: add helper function to request a slave DMA channel"). In
similar fashion to the DT case (commit aa3da644 "of: Add generic device tree
DMA helpers") we introduce helpers to the DMAC drivers which are enumerated by
ACPI.

The proposed extension provides the following API calls:
	acpi_dma_controller_register(), devm_acpi_dma_controller_register()
	acpi_dma_controller_free(), devm_acpi_dma_controller_free()
	acpi_dma_simple_xlate()
	acpi_dma_request_slave_chan_by_index()
	acpi_dma_request_slave_chan_by_name()

The first two should be used, for example, at probe() and remove() of the
corresponding DMAC driver. At the register stage the DMAC driver supplies a
custom xlate() function to translate a struct dma_spec into struct dma_chan.

Accordingly to the ACPI Fixed DMA resource specification the only two pieces of
information the slave device has are the channel id and the request line (slave
id). Those two are represented by struct dma_spec. The
acpi_dma_request_slave_chan_by_index() provides access to the specifix FixedDMA
resource by its index. Whereas dma_request_slave_channel() takes a string
parameter to identify the DMA resources required by the slave device. To make a
slave device driver work with both DeviceTree and ACPI enumeration a simple
convention is established: "tx" corresponds to the index 0 and "rx" to the
index 1. In case of robust configuration the slave device driver unfortunately
needs to call acpi_dma_request_slave_chan_by_index() directly.

Additionally the patch provides "managed" version of the register/free pair
i.e. devm_acpi_dma_controller_register() and devm_acpi_dma_controller_free().
Usually, the driver uses only devm_acpi_dma_controller_register().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-04-15 22:04:10 +05:30
..
apei Update documentation for parameter *notrigger* in einj.txt 2012-03-30 03:30:19 -04:00
debug.txt ACPI: update debug parameter documentation 2008-11-07 21:45:29 -05:00
dsdt-override.txt ACPI: Remove ACPI_CUSTOM_DSDT_INITRD option 2008-03-15 11:58:04 -07:00
enumeration.txt dma: acpi-dma: introduce ACPI DMA helpers 2013-04-15 22:04:10 +05:30
initrd_table_override.txt ACPI: Document ACPI table overriding via initrd 2012-09-30 18:03:41 -07:00
method-customizing.txt ACPI: Split out custom_method functionality into an own driver 2011-05-29 01:50:40 -04:00
method-tracing.txt ACPI: document method tracing hooks 2007-11-19 12:25:56 -05:00
scan_handlers.txt ACPI / scan: Introduce struct acpi_scan_handler 2013-01-30 14:27:29 +01:00