settings for GPIO interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

settings for GPIO interrupt

1,727 次查看
christophertele
Contributor III

hy all,

im workinh with i.mx6 quad on a custom board.kernel 3.19.

i want to use interrupt "104 GPIO4 Combined interrupt indication for GPIO4 signals 0 - 15." calling request_irq() always returns -22 (invalid argument).

this happens for every combined interrupt indication.

i can request other interrupts so it should be a problem with the gpios.

my workaround so far:

     1. setting PAD MUX to GPIO

     2. setting PAD CTRL

     3. Setting gpio direction register as input (GPIOx_GDIR)

     4. setting gpio interrupt configuration register as rising edge sensitive (GPIOx_IC2)

     5. setting gpio interrupt mask register to enable interrupt (GPIOx_IMR)

     6. request_irq()

did i miss something?

标签 (4)
0 项奖励
回复
2 回复数

759 次查看
christophertele
Contributor III

now it works.

missed calling: set_irq_flags(irq , IRQF_VALID) before request_irq()

0 项奖励
回复

759 次查看
christophertele
Contributor III

it dosnt work. i can request the irq but nothing happens if i trigger the pin.

requested irq shows up in /proc/interrupts but the handler is never called.

also i noticed that the "interrupt mask register is reset".

is this irq taken by the GPIO controller/driver or something else?

0 项奖励
回复