> > > + *r = DEFINE_RES_NAMED(irq, 1, NULL, res_flags); > > So? The whole exercise with the first patch is to have here: > > *r = DEFINE_RES_IRQ_NAMED_FLAGS(irq, NULL, res_flags); Thanks. I was staring at the macro changes in ioport.h for too long... > > > + ret = acpi_dev_get_gpio_irq_resource(adev, name, index, &r); > > + return ret ?: r.start; > > Btw, this function requires header to include ioport.h. I'm not sure > if it's good for ACPI. I would prefer safest approach, i.e. exporting > this from a C code, i.e. gpiolib-acpi.c. It actually just needs 'struct resource' declared. I removed the dependency on ioport.h, but it may make sense to leave the definition of 'acpi_dev_gpio_irq_get_by()' here because non ACPI based systems need a default implementation anyway.