Skip to content

Commit 9728fb3

Browse files
wangxiaoningnxpbroonie
authored andcommitted
spi: lpspi: disable lpspi module irq in DMA mode
When all bits of IER are set to 0, we still can observe the lpspi irq events when using DMA mode to transfer data. So disable irq to avoid the too much irq events. Signed-off-by: Clark Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6afe2ae commit 9728fb3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/spi/spi-fsl-lpspi.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,9 +910,14 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
910910
ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
911911
if (ret == -EPROBE_DEFER)
912912
goto out_pm_get;
913-
914913
if (ret < 0)
915914
dev_err(&pdev->dev, "dma setup error %d, use pio\n", ret);
915+
else
916+
/*
917+
* disable LPSPI module IRQ when enable DMA mode successfully,
918+
* to prevent the unexpected LPSPI module IRQ events.
919+
*/
920+
disable_irq(irq);
916921

917922
ret = devm_spi_register_controller(&pdev->dev, controller);
918923
if (ret < 0) {

0 commit comments

Comments
 (0)