linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"Robert R . Howell" <rhowell@uwyo.edu>
Subject: Re: [PATCH v1 1/2] pinctrl: baytrail: Do not add all GPIOs to IRQ domain
Date: Wed, 11 Jan 2017 15:14:50 +0200	[thread overview]
Message-ID: <1484140490.2133.55.camel@linux.intel.com> (raw)
In-Reply-To: <CACRpkdbseM1jnEBgAo853cNi8icCML7h81K16hHMfhk=9JsZ-w@mail.gmail.com>

On Wed, 2017-01-11 at 14:12 +0100, Linus Walleij wrote:
> On Wed, Jan 11, 2017 at 11:27 AM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > On Tue, Jan 10, 2017 at 10:11:38PM +0200, Andy Shevchenko wrote:
> > > It turns out that for some GPIO pins interrupts are bypassing
> > > standard
> > > chain.
> > > 
> > > Now the reason why some events such as touchscreen communication
> > > on ASuS
> > > T100TA does not work if we mask all the interrupts is that in
> > > order to
> > > generate either interrupts or GPEs the INTMASK register must have
> > > that
> > > particular interrupt unmasked. In case of GPEs the CPU does not
> > > trigger
> > > normal interrupt (and thus the GPIO driver does not see it) but
> > > instead
> > > it causes SCI (System Control Interrupt) to be triggered with the
> > > GPE in
> > > question set.
> > > 
> > > To make this all work as expected we add those GPIOs to the IRQ
> > > domain that can actually generate interrupts and skip others.
> > 
> > Actually what happens is that when DIRECT_IRQ_EN is set, the pin is
> > routed directly to the IO-APIC bypassing the GPIO driver completely.
> > However, the mask register is still used to determine if the pin is
> > supposed to generate IRQ or not.
> > 
> > So with commit 3ae02c14d964 the IRQ core masks all IRQs (because of
> > handle_bad_irq()) the pin connected to the touchscreen gets masked
> > as
> > well and hence no interrupts.
> > 
> > This has nothing to do with GPEs, though.
> > 
> > The fix itself looks good to me.
> 
> So I guess I wait for a commit with updates commit message
> and then apply that for fixes?

Correct, I'm doing it right now. Takes time to do and to test of course.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

      reply	other threads:[~2017-01-11 13:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 20:11 [PATCH v1 1/2] pinctrl: baytrail: Do not add all GPIOs to IRQ domain Andy Shevchenko
2017-01-10 20:11 ` [PATCH v1 2/2] pinctrl: baytrail: Convert to use devm_*() Andy Shevchenko
2017-01-11 10:30   ` Mika Westerberg
2017-01-11 13:14   ` Linus Walleij
2017-01-10 20:16 ` [PATCH v1 1/2] pinctrl: baytrail: Do not add all GPIOs to IRQ domain Andy Shevchenko
2017-01-11 10:27 ` Mika Westerberg
2017-01-11 13:12   ` Linus Walleij
2017-01-11 13:14     ` Andy Shevchenko [this message]

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=1484140490.2133.55.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rhowell@uwyo.edu \
    /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).