AnsweredAssumed Answered

Custom kernel driver interrupt not being called

Question asked by chris_f on Sep 12, 2017
Latest reply on Sep 13, 2017 by chris_f

I'm writing a custom driver for the ecspi module on an imx6ull. Everything works except my interrupt handler never gets called and I'm struggling to find the problem.

 

I've taken what look like the right parts from spi-imx.c so the irq handler is installed with:

 irq = platform_get_irq(pdev, 0);
ret = devm_request_irq(&pdev->dev, irq, spi_slave_isr, 0,
    dev_name(&pdev->dev), spi_data);

/proc/interrupts shows that the interrupt is installed on the right irq number (confirmed by comparison to the spi-imx driver).

 

I've enabled all of the interrupts in ECSPI0_INTREG. When I write to ECSPI0_TXDATA and set ECSPI0_CONREG_XCH. The SPI module outputs the data correctly (confirmed on the selected pins) so I would expect a TXFIFO empty interrupt but nothing happens.

 

Is there something obvious that I'm missing? Any tips gratefully received.

 

(I see that the serial driver calls enable_irq but that's only done during resume to reverse the disable_irq in suspend. Doesn't look like the problem.)

Outcomes