Setu Gupta
Setu Gupta

Reputation: 193

Filtering the interrupt for rising edge or falling edge in linux kernel

I have registered a gpio to irq with raising edge and falling edge both. My interrupt handler is called by the any signal disturbance on the pin. Further i want to filter the reason of interrupt , weather it was due to raising edge or falling edge. Is there any way to filter the reason of the interrupt?

OR can i register two hander for same irq, one for falling edge and one for raising edge?

Upvotes: 2

Views: 1068

Answers (1)

Karthik Balaguru
Karthik Balaguru

Reputation: 7852

This depends on the type of processor/architecture. Most of the processors have provision to read the appropriate register of corresponding pin to determine/filter whether the interrupt is due to rising edge or falling edge. Your processor data sheet shall have the specific information.

Upvotes: 1

Related Questions