Hi:
I need to obtain a GPIO interrupt on the imx8mp platform. Here is my device tree configuration:"
foo_device:foo_device{
compatible = "fsl,accel_gpio_irq";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_accel_default>;
interrupt-parent = <&gpio1>;
interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
status = "okay";
};
Get interrupt in driver:
.......
irq_num = platform_get_irq(pdev, 0);
printk("irq=%d",irq_num);
// save the returned IRQ
printk(KERN_INFO "IRQ read form DTS entry as %d\n", irq_num);
ret = request_irq(irq_num, detect_hander, 0, "accell_gpio_irq",NULL);
printk("------reuqest irq=%d\n",ret);
if(ret != 0)
{
printk("accell_gpio_irq_probe request irq \n");
}
enable_irq(accell_gpio_irq.irqnum);
However, I'm not receiving any interrupts at all, with irq_num returning -22. The same operation works fine on other platforms. Any suggestions would be appreciated?