Hi, I'm having some trouble with irq's on OMAP4460. My irq handler callback function is not being called when an interrupt is received on my designated GPIO (GPIO 139). I'm using the Pandaboard with OMAP4460.
My setup procedure in Linux 3.5.0 is the following:
static irqreturn_t irq_handler(int irq, void *dev_id)
{
printk(KERN_INFO "IRQ HANDLER CALLED\n");
return IRQ_HANDLED;
}
static int gpioSetupIrq(int gpio)
{
int ret;
ret = gpio_request(gpio, NULL);
ret = gpio_direction_input(gpio);
ret = gpio_to_irq(gpio);
irq = ret;
ret = request_irq(irq, irq_handler, IRQ_TYPE_EDGE_RISING,"test_irq_handler",NULL);
if (ret)
{
printk(KERN_INFO "request_irq failed - irq = %d \n", ret);
}
}
My code does not crash, but it does not react when I toggle the GPIO pin from external device, I would expect my irq_handler to get called when irq is triggers. I know that GPIO works fine because I'm able to set the GPIO to logic lo and hi with kernel call, gpio_set_value(), etc.Is there some other configuration that I'm missing?