Home > other >  Linux - gpio_to_irq returns - 22
Linux - gpio_to_irq returns - 22

Time:09-25

1, the problem:
Gpio_to_irq returns - 22, view the kernel source under the hair to have such a word -/* GPIO can never have had requested the or set as input */
As my first part of the code

` ` `
Ret=gpio_request (infrared_gpio, "my_infrared");
if(ret !=0) {
Printk (" GPIO request error! \n");
The return - EBUSY;
}
Ret=gpio_direction_input (infrared_gpio);
if(ret !=0) {
Printk (" GPIO direction error! \n");
return -1;
}

Printk (" gpio irq=% d \ n ", gpio_to_irq (infrared_gpio));
` ` `

My application is successful gpio and successfully configured for input pin, but when gpio_to_irq returns - 22, to check the kernel source driver calls to find and my style is similar, the call for help leaders to help solve

CodePudding user response:

The board lichee zero

CodePudding user response:

Is it useful elsewhere
  • Related