linux/drivers/dma
Stephen Warren 0ad7c00057 dma: add channel request API that supports deferred probe
dma_request_slave_channel() simply returns NULL whenever DMA channel
lookup fails. Lookup could fail for two distinct reasons:

a) No DMA specification exists for the channel name.
   This includes situations where no DMA specifications exist at all, or
   other general lookup problems.

b) A DMA specification does exist, yet the driver for that channel is not
   yet registered.

Case (b) should trigger deferred probe in client drivers. However, since
they have no way to differentiate the two situations, it cannot.

Implement new function dma_request_slave_channel_reason(), which performs
identically to dma_request_slave_channel(), except that it returns an
error-pointer rather than NULL, which allows callers to detect when
deferred probe should occur.

Eventually, all drivers should be converted to this new API, the old API
removed, and the new API renamed to the more desirable name. This patch
doesn't convert the existing API and all drivers in one go, since some
drivers call dma_request_slave_channel() then dma_request_channel() if
that fails. That would require either modifying dma_request_channel() in
the same way, or adding extra error-handling code to all affected
drivers, and there are close to 100 drivers using the other API, rather
than just the 15-20 or so that use dma_request_slave_channel(), which
might be tenable in a single patch.

acpi_dma_request_slave_chan_by_name() doesn't currently implement
deferred probe. It should, but this will be addressed later.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-12-10 17:46:48 +05:30
..
bestcomm drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
dw Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
ioat Merge commit 'dmaengine-3.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine 2013-11-16 12:02:36 +05:30
ipu dmaengine: ipu: fix warnings from 64-bit dma_addr_t printouts 2013-11-13 14:10:48 +05:30
ppc4xx Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
sh Merge branch 'dma_complete' into next 2013-10-30 15:42:19 +05:30
acpi-dma.c acpi-dma: remove ugly conversion 2013-08-25 16:43:45 +05:30
amba-pl08x.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
at_hdmac_regs.h DMA: AT91: Get residual bytes in dma buffer 2013-07-05 11:40:31 +05:30
at_hdmac.c Merge commit 'dmaengine-3.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine 2013-11-16 12:02:36 +05:30
coh901318_lli.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
coh901318.c dmaengine: coh901318: use DMA_COMPLETE for dma completion status 2013-10-25 11:15:56 +05:30
coh901318.h dma: coh901318: merge header files 2013-01-07 17:36:37 +01:00
cppi41.c dma: cppi41: return code > 0 of pm_runtime_get_sync() is not an error 2013-11-12 14:28:25 +05:30
dma-jz4740.c dmaengine: jz4740: use DMA_COMPLETE for dma completion status 2013-10-25 11:15:58 +05:30
dmaengine.c dma: add channel request API that supports deferred probe 2013-12-10 17:46:48 +05:30
dmaengine.h dmaengine: consolidate initialization of cookies 2012-03-13 11:37:22 +05:30
dmatest.c Merge commit 'dmaengine-3.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine 2013-11-16 12:02:36 +05:30
edma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
ep93xx_dma.c dmaengine: remove DMA unmap from drivers 2013-11-14 11:04:38 -08:00
fsldma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
fsldma.h DMA: Freescale: update driver to support 8-channel DMA engine 2013-11-13 14:26:27 +05:30
imx-dma.c Merge branch 'for-linus' into next 2013-10-31 22:36:13 +05:30
imx-sdma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
intel_mid_dma_regs.h dma: fix comments 2012-09-01 08:57:12 -07:00
intel_mid_dma.c dmaengine: intel_mid_dma: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:04 +05:30
iop-adma.c Merge commit 'dmaengine-3.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine 2013-11-16 12:02:36 +05:30
iovlock.c
k3dma.c dmaengine: k3dma: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:07 +05:30
Kconfig Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
Makefile dmaengine: add driver for Samsung s3c24xx SoCs 2013-10-08 06:42:10 +09:00
mmp_pdma.c dma: misc: remove deprecated IRQF_DISABLED 2013-10-13 20:21:35 +05:30
mmp_tdma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
mpc512x_dma.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
mv_xor.c Merge commit 'dmaengine-3.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine 2013-11-16 12:02:36 +05:30
mv_xor.h dma: mv_xor: Fix mis-usage of mmio 'base' and 'high_base' registers 2013-11-14 11:04:42 -08:00
mxs-dma.c dma: mxs-dma: Use semaphores for cyclic DMA 2013-11-13 15:38:31 +05:30
of-dma.c dma: add channel request API that supports deferred probe 2013-12-10 17:46:48 +05:30
omap-dma.c dmaengine: omap: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:11 +05:30
pch_dma.c pch_dma: Add MODULE_DEVICE_TABLE 2013-09-02 11:59:58 +05:30
pl330.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
s3c24xx-dma.c dmaengine: s3c24xx-dma: add support for the s3c2410 type of controller 2013-10-21 05:32:48 +09:00
sa11x0-dma.c dmaengine: sa11x0: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:13 +05:30
sirf-dma.c dmaengine: sirf: add PM entries for sleep and runtime 2013-08-13 17:01:01 +05:30
ste_dma40_ll.c dmaengine: ste_dma40_ll: Replace meaningless register set with comment 2013-06-04 11:12:10 +02:00
ste_dma40_ll.h dmaengine: ste_dma40: Remove unnecessary call to d40_phy_cfg() 2013-05-23 21:13:19 +02:00
ste_dma40.c dmaengine: ste: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:15 +05:30
tegra20-apb-dma.c dmaengine: tegra: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:16 +05:30
timb_dma.c dmaengine: remove DMA unmap from drivers 2013-11-14 11:04:38 -08:00
TODO
txx9dmac.c Merge commit 'dmaengine-3.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine 2013-11-16 12:02:36 +05:30
txx9dmac.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
virt-dma.c dmaengine: virt-dma: add support for cyclic DMA periodic callbacks 2012-07-01 14:15:23 +01:00
virt-dma.h dmaengine: virt-dma: add support for cyclic DMA periodic callbacks 2012-07-01 14:15:23 +01:00