On Sat, Nov 2, 2019 at 3:55 AM Florian Fainelli <f.fainelli@xxxxxxxxx> wrote: > > + girq = &chip->gc.irq; > > + girq->chip = irqc; > > + /* This will let us handle the parent IRQ in the driver */ > > + girq->parent_handler = NULL; > > + girq->num_parents = 0; > > + girq->parents = NULL; > > + girq->default_type = IRQ_TYPE_NONE; > > + girq->handler = handle_simple_irq; > > It might be worth creating a helper that can be called to initialize all > relevant members to the values that indicate: let me manage the > interrupt. This would make us more future proof with respect to > assumptions being made in gpiolib as well as if new fields are added in > the future. This would be a separate patch obviously. I have some different plans for this, but first I want to pull all struct gpiolib_irq_chip *girq setup over to the new API, so I can get rid of the old helper functions. First chained variants, when that is done, threaded variants, when that is done abstract this type that is using its own parent handler and then eventually delete the old helper functions. Then I can think about adding new helper functions :D Yours, Linus Walleij