lkml.org 
[lkml]   [2019]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] pinctrl: bcm: nsp: use gpiolib infrastructure for interrupts
On Sat, Nov 2, 2019 at 3:55 AM Florian Fainelli <f.fainelli@gmail.com> 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

\
 
 \ /
  Last update: 2019-11-03 23:24    [W:0.109 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site