It seems I am getting a 'ghost' interrupt from my gpio. I suspect that the IRQ status bits are set when I enable the interrupt and cause the interrupt to trigger even without changing the state on the gpio pin. I am trying to find a kernel API like _clear_gpio_irqstatus from drivers/gpio/gpio-omap.c. To prevent the 'ghost' interrupt from occurring, the steps would be:
_clear_gpio_irqstatus() // clear old interrupts from before
enable_irq() // enable the gpio interrupt
If someone can suggest something like _clear_gpio_irqstatus() that I can call from my driver, I'd appreciate it. Or, if none exists, if there are hooks to access the gpio control registers. I'm developing on an AM335x GP EVM with SDK 05.07.00.00.