Tool/software:
I am currently working on a project that involves the AM62X platform, and I am encountering an issue when trying to configure GPIO interrupts. I would greatly appreciate your guidance in understanding and resolving this problem.
The problem occurs when attempting to request an IRQ for a GPIO pin. Below is the relevant code snippet I am using:
However, when I run this code, I receive the following error messages in the kernel log:
[ 905.474809] genirq: Setting trigger mode 4 for irq 387 failed (gpio_irq_type+0x0/0x20)
[ 905.482782] ========================pDrv->request_irq = -22 |
It seems that the issue lies in setting the trigger mode for the requested IRQ. Specifically:
- The error indicates .
Setting trigger mode 4 (IRQF_TRIGGER_HIGH) for irq 387 failed
- The call returns an error code of , which suggests an invalid argument ().
request_irq()
-22
EINVAL
I would be grateful for any suggestions or guidance you can provide to help resolve this issue. If there are specific documents or resources that I should refer to, please let me know.
Thank you very much for your time and support.