On Wed, Jan 22, 2014 at 15:03 +0100, Linus Walleij wrote: > > --- a/Documentation/gpio/driver.txt > +++ b/Documentation/gpio/driver.txt > @@ -62,6 +62,36 @@ Any debugfs dump method should normally ignore signals > which haven't been > requested as GPIOs. They can use gpiochip_is_requested(), which returns > either > NULL or the label associated with that GPIO when it was requested. > > +GPIO drivers providing IRQs > +--------------------------- > +It is custom that GPIO drivers (GPIO chips) are also providing interrupts, > +most often cascaded off a parent interrupt controller, and in some special > +cases the GPIO logic is melded with a SoC:s primary interrupt controller.
... with a SoC's primary ... (apostroph instead of colon) > +gpiod_to_irq() is just a convenience function to figure out the IRQ for a > +certain GPIO line and should not be relied upon to have been called before > +the IRQ is used. > + > +So always prepare the hardware and make it ready for action in respective > +callbacks from the GPIO and irqchip APIs. Do not rely on gpio_to_irq() having > +been called first. The two paragraphs refer to different routines (gpiod_to_irq() and gpio_to_irq()) -- is this intentional? (one might be the equivalent of the other, just using different handles which perfectly map to each other in any direction, haven't checked the details) virtually yours Gerhard Sittig -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
