This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5708: Interrupt not instantly detected

Part Number: AM5708

Hello,

I have a strange phenomena with our CPU board

The CPU board has a Atmel MXT touch controller connected to the I2C. We have used this in the past with the touch controller interrupt line configured as "IRQ_TYPE_EDGE_FALLING". This worked fine until a i2c error messes up the data reading from the Atmel which will then keep its interrupt low. And we never see a new falling edge. So no new touch events.

We have changed the interrupt to IRQ_TYPE_LEVEL_LOW same as the example configuration for the Atmel device. Now the handler function is not called straight after the interrupt occurs. There can be several seconds of delay here.

What I also noticed that if I trigger a different interrupt after a touch interrupt the the handler gets called instantly. For example when I press the enter key on the serial console it will instantly handle the touch interrupt.

The configuration for the device:

&i2c2 {
    status = "okay";
    clock-frequency = <100000>;
    touch: touch@4a {
        compatible = "atmel,maxtouch";
        reg = <0x4a>;
        interrupt-parent = <&gpio5>;
        interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
    };
};

We are running Linux 4.4.41.

Is there some sort of explanation for this behaviour? I'm a bit stumped here.

Kind regards,

Johan