On Mon, May 2, 2016 at 10:03 AM, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > On Sun, May 1, 2016 at 10:48 AM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: >>> - Drivers that call irq_find_mapping(), irq_create_mapping(), or >>> irq_create_fwspec_mapping() return zero! This also applies to the >>> core helper gpiochip_to_irq(). >> >> Zero means NO_IRQ. >> >> Reminder: >> http://lwn.net/Articles/470820/ >> >> What we should do is patch all drivers to return 0 on failure, and >> patch any consumers like mctrl_gpio_init() to handle that correctly. > > That's the Long Term Plan. There are still too many non-zero NO_IRQ > definitions in use... > > Is -ENXIO acceptable for the short term? I don't understand. You say you have a problem with mctrl_gpio_init() which looks like this: ret = gpiod_to_irq(gpios->gpio[i]); if (ret <= 0) { dev_err(port->dev, (...) This function is already *correctly* handling zero as NO_IRQ i.e. an error. Just make your driver return 0/NO_IRQ and it is fixed. Or are there other problems that you're not telling about? Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html