On Wed, May 27, 2020 at 07:46:55AM +0200, Linus Walleij wrote: > On Tue, May 26, 2020 at 7:12 PM Andy Shevchenko > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > > +static int pca953x_acpi_get_irq(struct device *dev) > > +{ > > + int pin, ret; > > + > > + pin = pca953x_acpi_find_pin(dev); > > + if (pin < 0) > > + return pin; > > + > > + dev_info(dev, "Applying ACPI interrupt quirk (GPIO %d)\n", pin); > > + > > + if (!gpio_is_valid(pin)) > > + return -EINVAL; > > + > > + ret = gpio_request(pin, "pca953x interrupt"); > > + if (ret) > > + return ret; > > So would it work to do > gpiochip_request_own_desc() here in some form? It would but it will be wrong. We don't request own pin, we request pin from upper GPIO (IRQ) chip. > I.e. can you figure out the hardware offset number? That's what this quirk basically does, it takes it from ACPI. -- With Best Regards, Andy Shevchenko