Thread (8 messages) 8 messages, 3 authors, 2011-08-02

Re: GPIO IRQ on P1022

flat view

From: Felix Radensky <hidden>
Date: 2011-07-31 19:28:33

Hi Wolfgang,

On 07/31/2011 08:49 PM, Wolfgang Grandegger wrote:
Hi Felix,

On 07/31/2011 05:51 PM, Felix Radensky wrote:
quoted
Hi Wolfgang,

On 07/31/2011 06:19 PM, Wolfgang Grandegger wrote:
quoted
On 07/31/2011 12:38 PM, Felix Radensky wrote:
quoted
Hi,

I'm running kernel 3.0 on a custom board based on Freescale P1022.
The interrupt line of on-board FPGA is connected to GPIO2_9. FPGA
IRQ is level, active low. The GPIOs are mapped like this:
Here you say that it's a level sensitive interrupt but ...
quoted
quoted
quoted
GPIOs 160-191, /soc@ffe00000/gpio-controller@f200:

GPIOs 192-223, /soc@ffe00000/gpio-controller@f100:

GPIOs 224-255, /soc@ffe00000/gpio-controller@f000:

I've verified that pin mixing is done correctly, and the
FPGA IRQ line is indeed configured as GPIO.

I have the following code in my driver:

      #define FPGA_IRQ_GPIO 169

      err = gpio_request(FPGA_IRQ_GPIO, "FPGA IRQ");
      if (err) {
          printk(KERN_ERR "Failed to request FPGA IRQ GPIO, err=%d\n",
err);
          goto out;
      }

      gpio_direction_input(FPGA_IRQ_GPIO);

      irq = gpio_to_irq(FPGA_IRQ_GPIO);
      if (irq<   0) {
          printk(KERN_ERR "Failed to map FPGA GPIO to IRQ\n");
          goto out;
      }

      err = request_irq(irq, gsat_interrupt,
                IRQF_TRIGGER_FALLING, DRVNAME, priv);
.. you request here an edge triggered interrupt.
Yes, that is is correct. mpc8xxx_gpio.c driver does not allow
level sensitive interrupts, so I had no choice but to specify
IRQF_TRIGGER_FALLING.

Felix.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help