Skip to content

Commit 2af6adc

Browse files
cx-anuj-pathakkartben
authored andcommitted
drivers: dma: max32: check if bit other than status is set
we iterate over all the channels, and if more than one channel is active at a time. interrupt on any one of active channel was triggering callback for other active channel, because flags value is 1 (enabled). this is commit handle this behaviour and only trigger callback if bits other than status is set Signed-off-by: Anuj Pathak <anuj@croxel.com>
1 parent acc1731 commit 2af6adc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/dma/dma_max32.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ static void max32_dma_isr(const struct device *dev)
258258
continue;
259259
}
260260

261+
/* check if only enabled bit is set (interrupt is not there) and skip it */
262+
if (flags == ADI_MAX32_DMA_STATUS_ST) {
263+
continue;
264+
}
265+
261266
/* Check for error interrupts */
262267
if (flags & (ADI_MAX32_DMA_STATUS_BUS_ERR | ADI_MAX32_DMA_STATUS_TO_IF)) {
263268
status = -EIO;

0 commit comments

Comments
 (0)