From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Rushikesh S Kadam <rushikesh.s.kadam@intel.com>
Cc: heikki.krogerus@linux.intel.com, linus.walleij@linaro.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de, rajneesh.bhardwaj@intel.com,
andy@infradead.org, rjw@rjwysocki.net
Subject: Re: [PATCH] pinctrl: intel: Disable GPIO pin interrupts in suspend
Date: Fri, 11 Aug 2017 11:52:35 +0300 [thread overview]
Message-ID: <20170811085235.GT2369@lahna.fi.intel.com> (raw)
In-Reply-To: <1502439824-18733-1-git-send-email-rushikesh.s.kadam@intel.com>
On Fri, Aug 11, 2017 at 01:53:44PM +0530, Rushikesh S Kadam wrote:
> The fix prevents unintended wakes from second level GPIO pin interrupts.
>
> On some Intel Kabylake platforms, it is observed that GPIO pin interrupts
> can wake the platform from suspend-to-idle, even though the IRQ is not
> configured as IRQF_NO_SUSPEND or enable_irq_wake().
>
> This can cause undesired wakes on Mobile devices such as Laptops and
> Chromebook devices. For example a headset jack insertion is not a desired
> wake source on Chromebook devices.
>
> The pinctrl-intel (GPIO controller) driver implements a "Shared IRQ" model.
> All GPIO pin interrupts are OR'ed and mapped to a first level IRQ14 (or
> IRQ15). The driver registers an irq_chip struct and maps an irq_domain for
> the GPIO pin interrupts. The IRQ14 handler demuxes and calls the second
> level IRQ for the respective pin.
>
> In the suspend entry flow, at suspend_noirq stage, the kernel disables IRQs
> that are not marked for wake. The pinctrl-intel driver does not implement a
> irq_disable() callback (to take advantage of lazy disabling). The
> pinctrl-intel GPIO interrupts are not disabled in hardware during suspend
> entry, and thus are able to wake the SoC out of suspend-to-idle.
>
> This patch sets the IRQCHIP_MASK_ON_SUSPEND flag for the GPIO irq_chip, to
> disable the second level interrupts at suspend_noirq stage via the irq_mask
> callbacks. The irq_mask callback disables the IRQs in hardware by
> programming the corresponding GPIO pad registers. Only IRQs that are not
> marked for wake are disabled.
This is really good changelog!
> Signed-off-by: Rushikesh S Kadam <rushikesh.s.kadam@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
next prev parent reply other threads:[~2017-08-11 8:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-11 8:23 Rushikesh S Kadam
2017-08-11 8:52 ` Mika Westerberg [this message]
2017-08-11 9:57 ` Andy Shevchenko
2017-08-11 10:08 ` Rajneesh Bhardwaj
2017-08-22 12:47 ` Linus Walleij
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=20170811085235.GT2369@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andy@infradead.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rajneesh.bhardwaj@intel.com \
--cc=rjw@rjwysocki.net \
--cc=rushikesh.s.kadam@intel.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®