mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
spi: lpspi: disable lpspi module irq in DMA mode
[ Upstream commit 9728fb3ce1 ]
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 <xiaoning.wang@nxp.com>
Link: https://lore.kernel.org/r/20230505063557.3962220-1-xiaoning.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f8d9d8f172
commit
bb45dc7b67
@@ -906,9 +906,14 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
|
||||
ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
goto out_pm_get;
|
||||
|
||||
if (ret < 0)
|
||||
dev_err(&pdev->dev, "dma setup error %d, use pio\n", ret);
|
||||
else
|
||||
/*
|
||||
* disable LPSPI module IRQ when enable DMA mode successfully,
|
||||
* to prevent the unexpected LPSPI module IRQ events.
|
||||
*/
|
||||
disable_irq(irq);
|
||||
|
||||
ret = devm_spi_register_controller(&pdev->dev, controller);
|
||||
if (ret < 0) {
|
||||
|
||||
Reference in New Issue
Block a user