From: Brian Masney <masneyb@onstation.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Thomas Gleixner <tglx@linutronix.de>,
Marc Zyngier <marc.zyngier@arm.com>,
Lina Iyer <ilina@codeaurora.org>,
Jon Hunter <jonathanh@nvidia.com>,
Sowjanya Komatineni <skomatineni@nvidia.com>,
Bitan Biswas <bbiswas@nvidia.com>,
linux-tegra@vger.kernel.org, David Daney <david.daney@cavium.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Thierry Reding <treding@nvidia.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Andy Gross <agross@kernel.org>,
MSM <linux-arm-msm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] gpio: allow customizing hierarchical IRQ chips
Date: Sun, 28 Jul 2019 20:11:51 -0400 [thread overview]
Message-ID: <20190729001151.GA17127@onstation.org> (raw)
In-Reply-To: <CACRpkdZn-czbOOTrRs5ZgR7qTtf2A4i_L4J8_vk+kJiBuAnikg@mail.gmail.com>
On Mon, Jul 29, 2019 at 12:49:55AM +0200, Linus Walleij wrote:
> On Mon, Jul 8, 2019 at 1:01 PM Brian Masney <masneyb@onstation.org> wrote:
> > +static void gpiochip_add_default_irq_domain_ops(struct irq_domain_ops *ops)
> > +{
> > + if (!ops->activate)
> > + ops->activate = gpiochip_irq_domain_activate;
> > +
> > + if (!ops->deactivate)
> > + ops->deactivate = gpiochip_irq_domain_deactivate;
> > +
> > + if (!ops->translate)
> > + ops->translate = gpiochip_hierarchy_irq_domain_translate;
> > +
> > + if (!ops->alloc)
> > + ops->alloc = gpiochip_hierarchy_irq_domain_alloc;
> > +
> > + if (!ops->free)
> > + ops->free = irq_domain_free_irqs_common;
> > +}
>
> I'm fine with translate(), this seems to be what Lina needs too.
>
> But do we really need to make them all optional? activate() and
> deactivate() will require the driver to lock the irq etc which is hairy.
I can't think of a reason right now that we'd need to override the
others. Since the structure was there, I made all of them optional to
try to future proof this a little bit.
It probably would be better to only make translate optional at this
point. If needed, someone can submit a patch for one or more of the
others with their use case.
Brian
next prev parent reply other threads:[~2019-07-29 0:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 11:01 [PATCH 0/4] gpio: hierarchical IRQ improvements Brian Masney
2019-07-08 11:01 ` [PATCH 1/4] gpio: introduce gpiochip_populate_parent_fwspec_{two,four}cell functions Brian Masney
2019-07-08 11:01 ` [PATCH 2/4] gpio: allow customizing hierarchical IRQ chips Brian Masney
2019-07-28 22:49 ` Linus Walleij
2019-07-29 0:11 ` Brian Masney [this message]
2019-07-08 11:01 ` [PATCH 3/4] gpio: use handler in gpio_irq_chip instead of handle_bad_irq Brian Masney
2019-07-08 11:01 ` [PATCH 4/4] qcom: spmi-gpio: convert to hierarchical IRQ helpers in gpio core Brian Masney
2019-08-07 13:41 ` [PATCH 0/4] gpio: hierarchical IRQ improvements Linus Walleij
2019-08-07 13:43 ` Linus Walleij
2019-08-07 14:07 ` Brian Masney
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=20190729001151.GA17127@onstation.org \
--to=masneyb@onstation.org \
--cc=agross@kernel.org \
--cc=bbiswas@nvidia.com \
--cc=bgolaszewski@baylibre.com \
--cc=bjorn.andersson@linaro.org \
--cc=david.daney@cavium.com \
--cc=ilina@codeaurora.org \
--cc=jonathanh@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=skomatineni@nvidia.com \
--cc=tglx@linutronix.de \
--cc=treding@nvidia.com \
--cc=yamada.masahiro@socionext.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