From: Marc Zyngier <maz@kernel.org>
To: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Punit Agrawal <punit1.agrawal@toshiba.co.jp>,
yuji2.ishikawa@toshiba.co.jp,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/4] gpio: visconti: Add Toshiba Visconti GPIO support
Date: Wed, 16 Dec 2020 09:36:17 +0000 [thread overview]
Message-ID: <1ceac365ff6127c96006ed4570f87b47@kernel.org> (raw)
In-Reply-To: <20201216091148.vmriqt3vsg34pqhj@toshiba.co.jp>
On 2020-12-16 09:11, Nobuhiro Iwamatsu wrote:
[...]
>> > + for (i = 0; i < num_irq; i++) {
>> > + desc = irq_to_desc(priv->irq[i]);
>> > + desc->status_use_accessors |= IRQ_NOAUTOEN;
>> > + if (devm_request_irq(dev, priv->irq[i],
>> > + visconti_gpio_irq_handler, 0, name, priv)) {
>> > + dev_err(dev, "failed to request IRQ[%d]\n", i);
>> > + return -ENOENT;
>> > + }
>> > + }
>>
>> This should not be needed either when using hiearchical IRQs,
>> also the irqchip maintainers will beat us up for poking around in the
>> descs like this.
>
> I understand that the processing equivalent to request_irq() is
> processed
> by the irqchip frame work (or GIC driver). Is this correct?
request_irq() is reserved to endpoint drivers (the driver for the device
driving the IRQ line). If this is indeed a hierarchical irqchip, the
line allocation will be driven from the GPIO framework, and
request_irq()
will perform the activation. There isn't anything that this driver
should
do directly other than configuring its own state and passing the request
along to the parent controller.
And yes, mucking with the irq descriptor will get you in massive
trouble,
never do that.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2020-12-16 9:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 9:41 [PATCH v4 0/4] gpio: visconti: Add Toshiba Visconti GPIO support Nobuhiro Iwamatsu
2020-12-11 9:41 ` [PATCH v4 1/4] dt-bindings: gpio: Add bindings for Toshiba Visconti GPIO Controller Nobuhiro Iwamatsu
2020-12-11 23:05 ` Linus Walleij
2020-12-11 9:41 ` [PATCH v4 2/4] gpio: visconti: Add Toshiba Visconti GPIO support Nobuhiro Iwamatsu
2020-12-11 23:20 ` Linus Walleij
2020-12-16 9:11 ` Nobuhiro Iwamatsu
2020-12-16 9:36 ` Marc Zyngier [this message]
2020-12-17 5:10 ` Nobuhiro Iwamatsu
2020-12-11 9:41 ` [PATCH v4 3/4] MAINTAINERS: Add entries for Toshiba Visconti GPIO controller Nobuhiro Iwamatsu
2020-12-11 9:41 ` [PATCH v4 4/4] arm: dts: visconti: Add DT support for Toshiba Visconti5 GPIO driver Nobuhiro Iwamatsu
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=1ceac365ff6127c96006ed4570f87b47@kernel.org \
--to=maz@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=punit1.agrawal@toshiba.co.jp \
--cc=robh+dt@kernel.org \
--cc=yuji2.ishikawa@toshiba.co.jp \
/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).