From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Chris Chiu <chiu@endlessm.com>
Cc: andriy.shevchenko@linux.intel.com, linus.walleij@linaro.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@endlessm.com
Subject: Re: [PATCH] pinctrl: intel: remap the pin number to gpio offset for irq enabled pin
Date: Mon, 19 Aug 2019 10:14:13 +0300 [thread overview]
Message-ID: <20190819071413.GI19908@lahna.fi.intel.com> (raw)
In-Reply-To: <20190816093838.81461-1-chiu@endlessm.com>
On Fri, Aug 16, 2019 at 05:38:38PM +0800, Chris Chiu wrote:
> On Asus X571GT, GPIO 297 is configured as an interrupt and serves
> for the touchpad. The touchpad will report input events much less
> than expected after S3 suspend/resume, which results in extremely
> slow cursor movement. However, the number of interrupts observed
> from /proc/interrupts increases much more than expected even no
> touching touchpad.
>
> This is due to the value of PADCFG0 of PIN 225 for the interrupt
> has been changed from 0x80800102 to 0x80100102. The GPIROUTIOXAPIC
> is toggled on which results in the spurious interrupts. The PADCFG0
> of PIN 225 is expected to be saved during suspend, but the 297 is
> saved instead because the gpiochip_line_is_irq() expect the GPIO
> offset but what's really passed to it is PIN number. In this case,
> the /sys/kernel/debug/pinctrl/INT3450:00/gpio-ranges shows
>
> 288: INT3450:00 GPIOS [436 - 459] PINS [216 - 239]
>
> So gpiochip_line_is_irq() returns true for GPIO offset 297, the
> suspend routine spuriously saves the content for PIN 297 which
> we expect to save for PIN 225.
Nice work nailing the issue!
> This commit maps the PIN number to GPIO offset first in the
> intel_pinctrl_should_save() to make sure the values for the
> specific PINs can be correctly saved and then restored.
>
> Signed-off-by: Chris Chiu <chiu@endlessm.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
I think this should also have:
Fixes: c538b9436751 ("pinctrl: intel: Only restore pins that are used by the driver")
next prev parent reply other threads:[~2019-08-19 7:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 9:38 [PATCH] pinctrl: intel: remap the pin number to gpio offset for irq enabled pin Chris Chiu
2019-08-19 7:14 ` Mika Westerberg [this message]
2019-08-19 9:42 ` Andy Shevchenko
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=20190819071413.GI19908@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=chiu@endlessm.com \
--cc=linus.walleij@linaro.org \
--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