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.

OMAP3530 GPIO IRQ's

Other Parts Discussed in Thread: OMAP3530

I have been trying to get understand the OMAP3530/ gpio/linux irq system.

 

I have been able to configure gpio_130 as an output, and gpio_131 as an input, also enabled the the IRQ for gpio_131 and set it to high level detect.  I have then shorted gpio_130 to gpio_131 and when I set the gpio_130 high  linux appears to hang; disconnect the the gpio pins and linux returns to operating normally.

I am assuming this is indicating that in fact I am generating an interrupt on gpio_131 and linux continuously trying to service the interrupt. 

 

I have also written a very simple kernel module with an interrupt handler, and have tried to assign the IRQ for gpio_131.  I also have a pritnk() in the handler to see if the handler is getting called.  so far I have yet to see the printk().

 

I am not sure if I am requesting the correct IRQ for this gpio?  Does anyone know how to assign/request the correct IRQ for the gpio interrupts?

Is there any way (maybe through /proc) to see which interrupt is firing?(if it hasn't been assigned)

 

 

  • And the solution is:

    result = request_irq( OMAP_GPIO_IRQ(131), my_interrupt_handler, IRQF_DISABLED, "gpio_131", NULL);

  • Hi,

    I have simiar question regarding to setting IRQ.

    Instead of implementing the IRQ on the Linux ARM side as shown in your example. How would I setting up / requesting IRQ on the C64+ DSP side ?

    Do I need to directly setup the C64+ Megamodule Interrupt Controller registers, such as the INTMUXi, EVTMASKi, EVTCLRi, etc...  Or there are high-level APIs that I can use ?

    Thanks,

    /Chi.

  • I tried the same with PIN161 and PIN159.

    I changed the MUX_CFG_34XX in mux.c and as it is done with ENC28J60_IRQ the requests.

    In the sourcecode of UBoot is the pin also muxed as GPIO.

    But after registering the interrupt, the counter in /proc/interrupts is not counting.

     

    After that I tried to use this pin just as Input, but reading /sys/class/gpio161/value is just always 0. My scope says it is 1. Configuring the pin as pulldown or pullup changed nothing.

     

    Would you be so kind and send me your working file? Or what do I wrong?

    I didn't find another example or more information concerning the setup.

     

     

    Thank you.

    Steffen

  • I want to achieve the same - to have gpio 156 as an input with interrupt. But request_irq( 316, IRQ_SHARED | IRQF_TRIGGER_RISING ... ) always returns -22.

    I can see number 316 in /proc/irq

    Can anybody help me - what to change so that request_irq( 316 ... ) will work correctly ?

     

    Gregor

  • Solution for request_irq() returning error found: the last parameter cannot be NULL.

    Now the interrupt can be found in /proc/interrupts