[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=XvWFd84OxHmYgO8McV-ixe+ucMxhOdAWzHu4nLnnCtbQ@mail.gmail.com>
Date: Fri, 11 Dec 2020 14:14:01 -0800
From: Doug Anderson <dianders@...omium.org>
To: Maulik Shah <mkshah@...eaurora.org>
Cc: Rajendra Nayak <rnayak@...eaurora.org>,
Marc Zyngier <maz@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Linus Walleij <linus.walleij@...aro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Neeraj Upadhyay <neeraju@...eaurora.org>,
Stephen Boyd <swboyd@...omium.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Srinivas Ramana <sramana@...eaurora.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Andy Gross <agross@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] pinctrl: qcom: Clear possible pending irq when
remuxing GPIOs
Hi,
On Thu, Dec 10, 2020 at 11:07 PM Maulik Shah <mkshah@...eaurora.org> wrote:
>
> I have slightly modified your test case (see at
> https://crrev.com/c/2584729) which is as per what i used in my testing.
>
> Here is what i am doing, setting GPIO to a fixed function (function 2 here)
> Note that function 0 is the GPIO (interrupt mode).
>
> 1) Pull up the GPIO in function 2
> 2) Pull down the GPIO in function 2
>
> Repeat above steps, and you will see fake interrupt every time pull down/up.
> This proves that if you mux away from GPIO then still PDC sees the line
> and can latch the interrupt at GIC.
Ah, super useful example! Thanks! Yes, I can replicate your results.
...but this seems to contradict my other test. Ah, dang, I think I
see the problem with my original test. The important difference is
that in your test you used the alternate function "mi2s_2" and in mine
I used "qspi_data". When I selected "qspi_data" it must have been
actively driving the pin and _that's_ why I couldn't affect it.
When I change my test to use "mi2s_2" then my toggles via "wp enable"
and "wp disable" cause phantom interrupts. That confirms what you're
saying: the PDC _can_ see the twiddles even when muxed away.
Presumably the active driving my "qspi_data" is also what caused my
phantom glitches.
So, as you said, that means my mental model is totally wrong here.
Wow, if I had known that earlier I would have saved a lot of time.
That'll learn me...
OK, v4 being posted and you can see if that handles all the cases?
-Doug
Powered by blists - more mailing lists