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.

GPIO Interrupt Handler not getting called - DM365

Other Parts Discussed in Thread: TSC2004

Hello,

I am connecting GIO8 of DM365 to a pin of  another IC which is always toggling (seen in  CRO).Also I am able to read the  state of GIO8 in the program.But I want to configure GIO8 as interrupt.I have registered interrupt , but the printk messages in the handler is not getting printed.

uname -a  returns   Linux DM365_IPNC 2.6.18_pro500-davinci_IPNC_DM365_2.0.0

The following is the code used.

    gpio_request(8, "tsc2004-irq");
    temp = __raw_readl(pinmux3);  
    temp = temp & 0xFFFFFF7F;
    __raw_writel(temp, pinmux3);
    gpio_direction_input(8);
    temp = davinci_readl(DM365_ARM_INTMUX);
    temp &= 0xffffbfff;
    davinci_writel(temp , DM365_ARM_INTMUX);

      data->irq = gpio_to_irq(8);

        if (request_irq(data->irq , tsc2004_irq, IRQF_TRIGGER_FALLING,  "tsc2004" , NULL)) {
        err = -EBUSY;
        goto exit_free;
        }
mdelay(10000);

static irqreturn_t  tsc2004_irq(int irq, void *handle,struct pt_regs *regs)    //ISR
{
    printk("\n ------------------------ in ISR -------------------------------\n");
    return IRQ_HANDLED;
}

# cat /proc/interrupts                                                                                
           CPU0                                                                                         
  0:          0       AINTC  csl
  1:          0       AINTC  csl
  2:          0       AINTC  csl
  3:          0       AINTC  csl
  4:          0       AINTC  csl
  5:          0       AINTC  csl
  6:          0       AINTC  csl
  8:       1015       AINTC  davinci_osd
 16:          0       AINTC  EDMA Completion
 17:          0       AINTC  EDMA CC Error
 18:          0       AINTC  EDMA TC0 Error
 19:          0       AINTC  EDMA TC1 Error
 26:        411       AINTC  davinci-mmc
 29:          0       AINTC  rtc0
 32:     191917       AINTC  clockevent
 33:          1       AINTC  free-run counter
 39:         21       AINTC  i2c_davinci
 40:       3412       AINTC  serial
 42:          0       AINTC  dm_spi
 61:          0       AINTC  EDMA TC2 Error
 62:          0       AINTC  EDMA TC3 Error
 72:          0        GPIO  tsc2004
Err:          0

SHould I add anything in addition to the above code ?

As soon as I load this module I am expecting printk messages in the handler (GIO8 toggling in CRO).But I couldn't find any messages in dmesg.Can some one help me out to figure it out ?

Regards,

Nizar