From: Linus Walleij <linus.walleij@linaro.org>
To: Maulik Shah <mkshah@codeaurora.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: "Andy Gross" <agross@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
MSM <linux-arm-msm@vger.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"open list:GPIO SUBSYSTEM <linux-gpio@vger.kernel.org>,
Andy Gross <agross@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Doug Anderson <dianders@chromium.org>,
Rajendra Nayak <rnayak@codeaurora.org>,
Lina Iyer <ilina@codeaurora.org>," <dianders@chromium.org>,
"Stephen Boyd" <swboyd@chromium.org>,
"Evan Green" <evgreen@chromium.org>,
"Matthias Kaehlcke" <mka@chromium.org>,
"Rajendra Nayak" <rnayak@codeaurora.org>,
"Lina Iyer" <ilina@codeaurora.org>,
"open list:GPIO SUBSYSTEM <linux-gpio@vger.kernel.org>,
Andy Gross <agross@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Doug Anderson <dianders@chromium.org>,
Rajendra Nayak <rnayak@codeaurora.org>,
Lina Iyer <ilina@codeaurora.org>," <lsrao@codeaurora.org>
Subject: Re: [PATCH] pinctrl: qcom: Move clearing pending IRQ to .irq_request_resources callback
Date: Tue, 10 Nov 2020 14:31:53 +0100 [thread overview]
Message-ID: <CACRpkdZJ6yrisNKFG8MJEOhzAV7HRtUTniXpnFVd9fpVy75ruw@mail.gmail.com> (raw)
In-Reply-To: <1604561884-10166-1-git-send-email-mkshah@codeaurora.org>
On Thu, Nov 5, 2020 at 8:38 AM Maulik Shah <mkshah@codeaurora.org> wrote:
> When GPIOs that are routed to PDC are used as output they can still latch
> the IRQ pending at GIC. As a result the spurious IRQ was handled when the
> client driver change the direction to input to starts using it as IRQ.
>
> Currently such erroneous latched IRQ are cleared with .irq_enable callback
> however if the driver continue to use GPIO as interrupt and invokes
> disable_irq() followed by enable_irq() then everytime during enable_irq()
> previously latched interrupt gets cleared.
>
> This can make edge IRQs not seen after enable_irq() if they had arrived
> after the driver has invoked disable_irq() and were pending at GIC.
>
> Move clearing erroneous IRQ to .irq_request_resources callback as this is
> the place where GPIO direction is changed as input and its locked as IRQ.
>
> While at this add a missing check to invoke msm_gpio_irq_clear_unmask()
> from .irq_enable callback only when GPIO is not routed to PDC.
>
> Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy")
> Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
This looks critical so I applied it for fixes so we get some
rotation in linux-next.
If Bjorn has other opinions he will tell us :)
Yours,
Linus Walleij
next prev parent reply other threads:[~2020-11-10 13:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 7:38 [PATCH] pinctrl: qcom: Move clearing pending IRQ to .irq_request_resources callback Maulik Shah
2020-11-10 13:31 ` Linus Walleij [this message]
2020-11-10 21:28 ` Bjorn Andersson
2020-11-11 16:09 ` Doug Anderson
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=CACRpkdZJ6yrisNKFG8MJEOhzAV7HRtUTniXpnFVd9fpVy75ruw@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=dianders@chromium.org \
--cc=evgreen@chromium.org \
--cc=ilina@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lsrao@codeaurora.org \
--cc=mka@chromium.org \
--cc=mkshah@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=swboyd@chromium.org \
/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).