dmaengine: ti: k3-udma-glue: Add function to request TX chan for thread ID
authorSiddharth Vadapalli <s-vadapalli@ti.com>
Wed, 24 Jan 2024 12:43:18 +0000 (18:13 +0530)
committerVinod Koul <vkoul@kernel.org>
Tue, 30 Jan 2024 16:43:51 +0000 (22:13 +0530)
commit7cbf7f4bf71a054d687c8860380c655a36d0f369
tree6bab761feb45f48cd5bf93741fb4c410acc51c42
parent7edd7a2fd345b10e80ee854aaacc6452d6f46a7e
dmaengine: ti: k3-udma-glue: Add function to request TX chan for thread ID

The existing function k3_udma_glue_request_tx_chn() supports requesting
a TX DMA channel by its name. Add a new function to request TX DMA channel
for a given thread ID, named k3_udma_glue_request_tx_chn_for_thread_id().
Also, export it for use by drivers which are probed by alternate methods
(non device-tree) but still wish to make use of the existing DMA APIs. Such
drivers could be informed about the thread ID corresponding to the TX DMA
channel by RPMsg for example.

Since the new function k3_udma_glue_request_tx_chn_for_thread_id() reuses
most of the code in k3_udma_glue_request_tx_chn(), create a new function
for the common code, named k3_udma_glue_request_tx_chn_common().

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20240124124319.820002-4-s-vadapalli@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/k3-udma-glue.c
include/linux/dma/k3-udma-glue.h