linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] pinctrl: bcm: nsp: use gpiolib infrastructure for interrupts
Date: Sun, 3 Nov 2019 23:23:21 +0100	[thread overview]
Message-ID: <CACRpkdZ6xOmRUnNCRBAPak1Q_g9WSNYKGpLeU-ajroUbB_gSeA@mail.gmail.com> (raw)
In-Reply-To: <b681ed9d-a31a-e5cc-04ba-6f38a5cc745b@gmail.com>

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

  parent reply	other threads:[~2019-11-03 22:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01  1:56 [PATCH 0/2] pinctrl: bcm: nsp: gpio improvements Chris Packham
2019-11-01  1:56 ` [PATCH 1/2] pinctrl: bcm: nsp: use gpiolib infrastructure for interrupts Chris Packham
2019-11-02  2:55   ` Florian Fainelli
2019-11-03 21:17     ` Chris Packham
2019-11-03 22:23     ` Linus Walleij [this message]
2019-11-01  1:56 ` [PATCH 2/2] pinctrl: bcm: nsp: implement get_direction Chris Packham
2019-11-02  2:55   ` Florian Fainelli
  -- strict thread matches above, loose matches on Subject: below --
2019-10-25  4:00 [PATCH 0/2] ARM: bcm: nsp: gpio improvements (hopefully) Chris Packham
2019-10-25  4:00 ` [PATCH 1/2] pinctrl: bcm: nsp: use gpiolib infrastructure for interrupts Chris Packham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdZ6xOmRUnNCRBAPak1Q_g9WSNYKGpLeU-ajroUbB_gSeA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).