This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Netra: GPIO interrupt doesn't call ISR

Hi,

I am using Integra EVM board.I have interfaced it with other processor over GPCM bus.

Linux release is linux-2.6.37-psp04.00.00.10

This processor gives me interrupt over GPIO. I can probe this line and see the level going active low when slave processor gives interrupt.

But in my driver, my ISR doesn't get called. In other words, interrupt doesn't come to CPU.

I am using GPIO0[31], so I pass 31 in gpio_request.

Below is my code base for reference.

        if (gpio_request(31, "My Int") < 0)
        {
                printk(KERN_ERR "Failed to request GPIO%d for  INT IRQ\n",
                                GPMC_INT);
                goto err_int_install;
        }

        if (gpio_direction_input (GPMC_INT) != 0)
        {
                printk(KERN_ERR "Failed to set direction for GPIO%d : INT IRQ\n",
                                GPMC_INT);
                goto err_int_install;
        }

        irq_number = gpio_to_irq(GPMC_INT);
        if(irq_number < 0)
        {
                printk(KERN_ERR "Failed to get irq number for GPIO%d : INT IRQ\n",
                                GPMC_INT);
                goto err_int_install;
        }

        error=request_irq(irq_number, host_interrupt_routine, IRQF_DISABLED | IRQF_SAMPLE_RANDOM | IRQF_TRIGGER_FALLING, "host_int", NULL);

request_irq() succeeds but when interrupt comes as active low signal, host_interrupt_routine() doesn't get called.

Any idea what can be wrong ? Do I need to do any other configuration or unmasking ?


Please suggest.

Thanks,

Sweta

  • Assuming GPMC_INT is 31, it should work. Is this a pinmux'ed GPIO?

  • Hi Norman,

    Yes, it  is pinmuxed GPIO, I have set mux mode register properly.

    Just to check that GPIO is configured properly, I also tried to configure the direction as output and make it 1 and 0.

    I can see voltage level for 1 and 0 correctly on scope.

    The only issue I see is, when I configure this GPIO as i/p and register it as per the codebase I specified in previous mail, I don't get interrupt.

    /proc/interrupt shows 0 interrupt for my GPIO but I can see transition of this pin on scope, where I expect interrupt from slave.

     

    Thanks,
    Sweta

     

    .