From: Marc Zyngier <maz@kernel.org>
To: <Lewis.Hanly@microchip.com>
Cc: <linux-riscv@lists.infradead.org>, <Conor.Dooley@microchip.com>,
<brgl@bgdev.pl>, <linux-gpio@vger.kernel.org>,
<linus.walleij@linaro.org>, <palmer@dabbelt.com>,
<linux-kernel@vger.kernel.org>, <Daire.McNamara@microchip.com>
Subject: Re: [PATCH v3 1/1] gpio: mpfs: add polarfire soc gpio support
Date: Sat, 16 Jul 2022 18:52:01 +0100 [thread overview]
Message-ID: <87o7xp3pz2.wl-maz@kernel.org> (raw)
In-Reply-To: <2d7f72d3e89686d3ba5cff5df8cfe443d04fc5f4.camel@microchip.com>
On Sat, 16 Jul 2022 16:21:48 +0100,
<Lewis.Hanly@microchip.com> wrote:
>
> Thanks Marc,
>
> On Sat, 2022-07-16 at 11:33 +0100, Marc Zyngier wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > know the content is safe
> >
> > On Sat, 16 Jul 2022 08:11:13 +0100,
> > <lewis.hanly@microchip.com> wrote:
> > > From: Lewis Hanly <lewis.hanly@microchip.com>
> > >
> > > Add a driver to support the Polarfire SoC gpio controller.
> > >
> > > Signed-off-by: Lewis Hanly <lewis.hanly@microchip.com>
> >
> > [...]
> >
> > > +static int mpfs_gpio_child_to_parent_hwirq(struct gpio_chip *gc,
> > > + unsigned int child,
> > > + unsigned int child_type,
> > > + unsigned int *parent,
> > > + unsigned int *parent_type)
> > > +{
> > > + struct mpfs_gpio_chip *mpfs_gpio = gpiochip_get_data(gc);
> > > + struct irq_data *d = irq_get_irq_data(mpfs_gpio-
> > > >irq_number[child]);
> >
> > This looks totally wrong. It means that you have already instantiated
> > part of the hierarchy, and it is likely that you will get multiple
> > hierarchy sharing some levels, which isn't intended.
>
> Some background why I use the above.
> We need to support both direct and non-direct IRQ connections to the
> PLIC.
> In direct mode the GPIO IRQ's are connected directly to the PLIC and
> certainly no need for the above. GPIO's can also be configured in non-
> direct, which means they use a shared IRQ, hence the above.
That's unfortunately not acceptable. You need to distinguish which one
is which, and separate them. Your non-direct mode certainly requires
special handling, and is not fit for a hierarchical mode.
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-07-16 17:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-16 7:11 [PATCH v3 0/1] Add Polarfire SoC GPIO support lewis.hanly
2022-07-16 7:11 ` [PATCH v3 1/1] gpio: mpfs: add polarfire soc gpio support lewis.hanly
2022-07-16 10:33 ` Marc Zyngier
2022-07-16 15:21 ` Lewis.Hanly
2022-07-16 17:52 ` Marc Zyngier [this message]
2022-07-16 18:32 ` Conor.Dooley
2022-07-17 15:10 ` Marc Zyngier
2022-07-17 15:46 ` Conor.Dooley
2022-07-31 8:56 ` Lewis.Hanly
2022-07-16 10:44 ` Marc Zyngier
2022-07-16 12:17 ` Lewis.Hanly
2022-07-16 12:20 ` Conor.Dooley
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=87o7xp3pz2.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Conor.Dooley@microchip.com \
--cc=Daire.McNamara@microchip.com \
--cc=Lewis.Hanly@microchip.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.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).