Re: [PATCH v3] gpio: driver for PrimeCell PL061 GPIO controller

From: David Brownell
Date: Mon Jun 15 2009 - 19:38:21 EST


On Thursday 04 June 2009, Russell King - ARM Linux wrote:
> > +static unsigned int pl061_irq_startup(unsigned irq)
> > +{
> > +     int ret;
> > +
> > +     ret = gpio_request(irq_to_gpio(irq), "IRQ");
> > +     if (ret < 0) {
> > +             pr_warning("%s: warning: gpio_request(%d) returned %d\n",
> > +                             __func__, irq_to_gpio(irq), ret);
> > +             return 0;
> > +     }
> > +
> > +     gpio_direction_input(irq_to_gpio(irq));
>
> I thought that it was not expected that claiming an interrupt would claim
> a GPIO automatically - in other words, it's the responsibility of the
> driver or platform itself to claim GPIOs for interrupts and ensure that
> they're properly configured.

You're right about that.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/