We have a design that uses the ls1021a. There is an I2C gpio device (pca9554) connected to i2c bus 0. The IRQ from the device is connected to the CPU IRQ 2.
For the device tree description, I added:
gpio@3a {
compatible = "pca953x,pca9554";
reg = <0x3a>;
gpio-cells = <2>;
gpio-controller;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_LOW>;
}
From Linux, I see:
[ 0.051001] pca953x 0-003a: using no AI
[ 0.080652] genirq: Setting trigger mode 8 for irq 50 failed (gic_set_type+0x0/0xa0)
[ 0.080778] pca953x 0-003a: failed to request irq 50
[ 0.080811] pca953x: probe of 0-003a failed with error -22
Is the IRQ number correct in the error message? I though, I would have got a value of 197 (165+32).
Looking at the code for gic_set_type, with a value of 32 or above I would be limited to IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_EDGE_RISING. Does that mean the IRQ from the pca9554 must be passed in an invert gate?
Cheers,
Renaud