[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZFOvvThaeXQ_mz4zfOptG2t_DzjmsN1-TSGrGyOXSkAw@mail.gmail.com>
Date: Wed, 3 Jun 2020 14:28:41 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Maulik Shah <mkshah@...eaurora.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Marc Zyngier <maz@...nel.org>,
Evan Green <evgreen@...omium.org>,
Matthias Kaehlcke <mka@...omium.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
MSM <linux-arm-msm@...r.kernel.org>,
open list:GPIO SUBSYSTEM <linux-gpio@...r.kernel.org>, Andy Gross <agross@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Jason Cooper <jason@...edaemon.net>, Doug Anderson <dianders@...omium.org>, Rajendra Nayak <rnayak@...eaurora.org>, Lina Iyer <ilina@...eaurora.org>,
<lsrao@...eaurora.org>
Subject: Re: [PATCH v2 1/4] gpio: gpiolib: Allow GPIO IRQs to lazy disable
On Fri, May 29, 2020 at 12:27 AM Stephen Boyd <swboyd@...omium.org> wrote:
> Quoting Linus Walleij (2020-05-28 14:33:36)
> > On Sat, May 23, 2020 at 7:11 PM Maulik Shah <mkshah@...eaurora.org> wrote:
> >
> > > With 'commit 461c1a7d4733 ("gpiolib: override irq_enable/disable")' gpiolib
> > > overrides irqchip's irq_enable and irq_disable callbacks. If irq_disable
> > > callback is implemented then genirq takes unlazy path to disable irq.
> > >
> > > Underlying irqchip may not want to implement irq_disable callback to lazy
> > > disable irq when client drivers invokes disable_irq(). By overriding
> > > irq_disable callback, gpiolib ends up always unlazy disabling IRQ.
> > >
> > > Allow gpiolib to lazy disable IRQs by overriding irq_disable callback only
> > > if irqchip implemented irq_disable. In cases where irq_disable is not
> > > implemented irq_mask is overridden. Similarly override irq_enable callback
> > > only if irqchip implemented irq_enable otherwise irq_unmask is overridden.
> > >
> > > Fixes: 461c1a7d47 (gpiolib: override irq_enable/disable)
> > > Signed-off-by: Maulik Shah <mkshah@...eaurora.org>
> >
> > I applied this patch 1/4 to the GPIO tree since it is nice on its own
> > and it is soon merge window.
> >
>
> Can you please clarify how this doesn't break things as discussed in a
> fork of this thread[1]?
>
> [1] https://lore.kernel.org/r/948defc1-5ea0-adbb-185b-5f5a81f2e28a@codeaurora.org
I don't really understand I'm afraid.
Hans tested this on the one system that uses the method to disable the IRQ
and turn the line into an output, play around with it, then switch it back to
input (actually open drain) and then use the IRQ again.
Is something broken in practice or in theory?
Yours,
Linus Walleij
Powered by blists - more mailing lists