Hi Mika, Ok, i will send a RFC serie tonight. I have also noticed the spi core set the irq field to -1 in acpi. This will be fixed in this serie.
Best Regards Christophe -----Original Message----- From: Mika Westerberg [mailto:[email protected]] Sent: lundi 7 décembre 2015 11:52 To: Christophe Ricard Cc: [email protected]; Len Brown; Linus Walleij; Alexandre Courbot; [email protected]; [email protected]; [email protected]; [email protected]; Christophe Henri RICARD Subject: Re: [PATCH v3 0/2] ACPI: Add irq_type to gpio interrupt On Sat, Dec 05, 2015 at 12:36:19AM +0100, Christophe Ricard wrote: > >No, but I wonder if it would be better to do this in > >acpi_dev_gpio_irq_get() instead of acpi_find_gpio() which gets called > >everytime a GPIO is looked up? > I believe, setting the irq type requires triggering and polarity data > stored into a struct acpi_resource_gpio. > > acpi_dev_gpio_irq_get call acpi_get_gpiod_by_index which run acpi_find_gpio. > > Actually acpi_dev_gpio_irq_get is called everytime an i2c device slave > is probed, acpi_find_gpio will get called to "register" gpios. > If done correctly, i think this will be done only once... > > The only improvement i may see would be to add an extra field in the > acpi_gpio_info structure in drivers/gpio/gpiolib.h (for example int > irq_type). > And call irq_set_irq_type in acpi_dev_gpio_irq_get if the gpio is an > interrupt. > > I guess the current proposal and this one are equivalent... > > What do you think ? Actually I think it may be useful to add triggering flags to acpi_gpio_info. -- 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
