drivers: dma: smartbond: Fix power policy handling
Function dma_smartbond_set_channel_status() used incorrect condition to release state lock. In initialization function dma_smartbond_init() function dma_smartbond_set_channel_status() was called for each DMA channel and tried to release lock that was never taken. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This commit is contained in:
parent
ca822d4e4b
commit
0575c1a976
1 changed files with 1 additions and 1 deletions
|
|
@ -230,7 +230,7 @@ static void dma_smartbond_set_channel_status(const struct device *dev,
|
|||
DMA->DMA_CLEAR_INT_REG |= BIT(channel);
|
||||
|
||||
/* DMA interrupts should be disabled only if all channels are disabled. */
|
||||
if (!dma_smartbond_is_dma_active()) {
|
||||
if (!dma_smartbond_is_dma_active() && irq_is_enabled(SMARTBOND_IRQN)) {
|
||||
irq_disable(SMARTBOND_IRQN);
|
||||
/* Allow entering sleep once all DMA channels are inactive */
|
||||
dma_smartbond_pm_policy_state_lock_put();
|
||||
|
|
|
|||
Loading…
Reference in a new issue