Skip to content

Commit 1c06d85

Browse files
Fei Shaogregkh
authored andcommitted
spi: mt65xx: Use IRQF_ONESHOT with threaded IRQ
[ Upstream commit 8c04b77 ] This driver is migrated to use threaded IRQ since commit 5972eb0 ("spi: spi-mt65xx: Use threaded interrupt for non-SPIMEM transfer"), and we almost always want to disable the interrupt line to avoid excess interrupts while the threaded handler is processing SPI transfer. Use IRQF_ONESHOT for that purpose. In practice, we see MediaTek devices show SPI transfer timeout errors when communicating with ChromeOS EC in certain scenarios, and with IRQF_ONESHOT, the issue goes away. Signed-off-by: Fei Shao <fshao@chromium.org> Link: https://patch.msgid.link/20251217101131.1975131-1-fshao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f609041 commit 1c06d85

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/spi/spi-mt65xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ static int mtk_spi_probe(struct platform_device *pdev)
12661266

12671267
ret = devm_request_threaded_irq(dev, irq, mtk_spi_interrupt,
12681268
mtk_spi_interrupt_thread,
1269-
IRQF_TRIGGER_NONE, dev_name(dev), host);
1269+
IRQF_ONESHOT, dev_name(dev), host);
12701270
if (ret)
12711271
return dev_err_probe(dev, ret, "failed to register irq\n");
12721272

0 commit comments

Comments
 (0)