On Thursday 07 April 2016 19:09:06, Linus Walleij wrote: > >>> 4) irq_ready access synchronization on SMP? atomic? > >> > >> Uhhh.... I don't even understand the question. > > > > in my patch the irq_ready is set from _gpiochip_irqchip_add() and > > read from gpiod_request() without any kind of protection and those > > two functions can be executed in parallel. > > Aha. Well I don't know if that is really a big problem? > Does that really happen in practice? I guess this is what actually happens in my case. The gpio controller has already been registred and the companion irq chip is about to be registered. Meanwhile gpio-keys requests a GPIO from that recently registred gpio controller and the following gpio_to_irq or irq_request returns 0 or fails as the irq chip has not been registred yet (without Grygorii's patch). So this calling situation might actually happen. Best regards, Alexander -- 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