Hello everybody,
I am having trouble to use the I2C port expander NXP PCA9539 as an IRQ
source on a board where two of them share the same Interrupt line.
When the PCA9539 starts, interrupts are already enabled. There is no way
to disable interrupts on this chip. This means that both chips pull down
the interrupt line. When the driver gets instantiated for the first
chip, the interrupt line is enabled and an interrupt caused. This causes
the interrupt handler for the first chip to be called, but this does not
reset the interrupt coming from the second chip. Its handler is not
being called as it is still not installed. This means that the interrupt
line will be considered stuck and disabled subsequently.
My device-tree part is as follows:
pca9539: pca9539@74 {
compatible = "nxp,pca9539";
reg = <0x74>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
interrupt-parent = <&pioE>;
interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
};
pca9539_1: pca9539@75 {
compatible = "nxp,pca9539";
reg = <0x75>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
interrupt-parent = <&pioE>;
interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
};
I think I need to delay the activation of the interrupt source until
both interrupt handlers have been installed. I have read the code that
installs the interrupt handler and it seems that there is no way yet to
do so, right?
Is there any other way I might be able to use the IRQ functionality with
this port expander and a shared IRQ line? Any pointers?
Best regards
Raphael Lisicki
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html