From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Chris Chiu <chiu@endlessm.com>
Cc: Daniel Drake <drake@endlessm.com>,
heikki.krogerus@linux.intel.com, linux-gpio@vger.kernel.org,
Linux Kernel <linux-kernel@vger.kernel.org>,
Endless Linux Upstreaming Team <linux@endlessm.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>
Subject: Re: intel-gpio interrupts stop firing with Focaltech I2C-HID touchpad
Date: Mon, 20 Nov 2017 12:32:07 +0200 [thread overview]
Message-ID: <20171120103207.GB22431@lahna.fi.intel.com> (raw)
In-Reply-To: <CAB4CAweOMHG6M0Bg_oXOVo0XuiKcvQgxO=h6qbdg4ZoskoJS9w@mail.gmail.com>
On Mon, Nov 20, 2017 at 01:18:51PM +0800, Chris Chiu wrote:
> On Fri, Nov 17, 2017 at 9:52 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > On Fri, Nov 17, 2017 at 03:35:18PM +0200, Mika Westerberg wrote:
> >> > pin 18 (GPIO_18) GPIO 0x40900100 0x00024075
> >
> > Hmm,
> >
> > If I decode 0x40900100 correctly PADCFG0_GPIROUTIOXAPIC (BIT 20) flag is
> > set for the pin. This means the interrupt is routed to IO-APIC instead.
> >
> > Now, we do clear that flag along with the others when the GPIO is
> > requested through gpio_request() but in this case we go through irqchip
> > instead so the flag is not cleared.
> >
> > I wonder if the following patch changes anything?
> >
> > diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
> > index 71df0f70b61f..06af096f5768 100644
> > --- a/drivers/pinctrl/intel/pinctrl-intel.c
> > +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> > @@ -939,6 +939,10 @@ static int intel_gpio_irq_type(struct irq_data *d, unsigned type)
> >
> > value &= ~(PADCFG0_RXEVCFG_MASK | PADCFG0_RXINV);
> >
> > + /* Disable SCI/SMI/NMI generation */
> > + value &= ~(PADCFG0_GPIROUTIOXAPIC | PADCFG0_GPIROUTSCI);
> > + value &= ~(PADCFG0_GPIROUTSMI | PADCFG0_GPIROUTNMI);
> > +
> > if ((type & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) {
> > value |= PADCFG0_RXEVCFG_EDGE_BOTH << PADCFG0_RXEVCFG_SHIFT;
> > } else if (type & IRQ_TYPE_EDGE_FALLING) {
>
> It does change after the patch. I didn't have the touchpad stopping
> things after a long time test.
> The INT3452:00/pins under /sys/kernel/debug/pinctrl shows the
> following for GPIO 18.
> pin 18 (GPIO_18) GPIO 0x40800102 0x00024075
Great, thanks for testing!
> Anything else you need from me?
Nope, I'll make a proper patch and send it out this week.
prev parent reply other threads:[~2017-11-20 10:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 11:38 intel-gpio interrupts stop firing with Focaltech I2C-HID touchpad Daniel Drake
2017-11-16 11:52 ` Mika Westerberg
2017-11-16 12:01 ` Daniel Drake
2017-11-16 13:07 ` Mika Westerberg
2017-11-17 8:27 ` Chris Chiu
2017-11-17 8:50 ` Chris Chiu
2017-11-17 9:11 ` Mika Westerberg
2017-11-17 9:13 ` Chris Chiu
2017-11-17 10:01 ` Chris Chiu
2017-11-17 11:00 ` Mika Westerberg
2017-11-17 13:21 ` Chris Chiu
2017-11-17 13:35 ` Mika Westerberg
2017-11-17 13:52 ` Mika Westerberg
2017-11-20 5:18 ` Chris Chiu
2017-11-20 10:32 ` Mika Westerberg [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=20171120103207.GB22431@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=chiu@endlessm.com \
--cc=drake@endlessm.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@endlessm.com \
/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).