[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190729001151.GA17127@onstation.org>
Date: Sun, 28 Jul 2019 20:11:51 -0400
From: Brian Masney <masneyb@...tation.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Thomas Gleixner <tglx@...utronix.de>,
Marc Zyngier <marc.zyngier@....com>,
Lina Iyer <ilina@...eaurora.org>,
Jon Hunter <jonathanh@...dia.com>,
Sowjanya Komatineni <skomatineni@...dia.com>,
Bitan Biswas <bbiswas@...dia.com>, linux-tegra@...r.kernel.org,
David Daney <david.daney@...ium.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Thierry Reding <treding@...dia.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Andy Gross <agross@...nel.org>,
MSM <linux-arm-msm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] gpio: allow customizing hierarchical IRQ chips
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@...tation.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
Powered by blists - more mailing lists