zephyr
zephyr copied to clipboard
dma: Allow for driver implemented channel pooling
DMA channels can be viewed as a pool of resources in some instances. When using struct dma_context the default channel request/release use an atomic bit flag to indicate channel availability and this works well in most cases.
In some cases however, when channel counts are low and peripheral counts high it might be beneficial to allow for thread pends to occur on channel requests on a mutex or semaphore.
Related to #61444