Linux: Disabling interrupt from interrupt handler

I am writing a Linux device driver which needs to wait for an interrupt (triggered by changes in a GPIO line), and, once the interrupt happens, disable the interrupt until certain conditions are met.

I have tried calling disable_irq_nosync from the handler. Later, when I want to process this interrupt again, I would call enable_irq to reenable it. However I have found that if the GPIO changes while the interrupt is disabled, this seem to be internally detected by the kernel and would result in the interrupt firing immediately as soon as I call enable_irq .

Why is this happening, and how can I avoid it?

链接地址: http://www.djcxy.com/p/84880.html

上一篇: 我怎样才能找出什么阻止了Linux任务的安排?

下一篇: Linux:禁止中断处理程序的中断