From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: grant.likely@secretlab.ca
Cc: linux-kernel@vger.kernel.org, alan@linux.intel.com,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Subject: [PATCH] gpio: gpio-langwell: fix IRQ wake functionality
Date: Wed, 11 Jan 2012 11:08:08 +0200 [thread overview]
Message-ID: <1326272888-15123-1-git-send-email-mathias.nyman@linux.intel.com> (raw)
Some chips are able to use gpio as a wake up source - e.g., you may want your
gpio button to wake up your device.
Currently 'irq_set_irq_wake()' is broken for gpio-langwell because the driver
does not provide the '->irq_set_wake()' method, which makes 'set_irq_wake_real()'
return -ENXIO, so that the 'IRQD_WAKEUP_STATE' bit is not changed. This also
causes the "Unbalanced IRQ X wake disable" warnings at some point.
This patch fixes the issue with the 'IRQCHIP_SKIP_SET_WAKE' flag. This flag
basically tells the the IRQ core subsystem that we support IRQ wakes but do
not need any driver-specific code.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
drivers/gpio/gpio-langwell.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/gpio/gpio-langwell.c b/drivers/gpio/gpio-langwell.c
index 00692e8..4bb748e 100644
--- a/drivers/gpio/gpio-langwell.c
+++ b/drivers/gpio/gpio-langwell.c
@@ -227,6 +227,7 @@ static struct irq_chip lnw_irqchip = {
.irq_mask = lnw_irq_mask,
.irq_unmask = lnw_irq_unmask,
.irq_set_type = lnw_irq_type,
+ .flags = IRQCHIP_SKIP_SET_WAKE,
};
static DEFINE_PCI_DEVICE_TABLE(lnw_gpio_ids) = { /* pin number */
--
1.7.4.1
reply other threads:[~2012-01-11 9:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1326272888-15123-1-git-send-email-mathias.nyman@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=alan@linux.intel.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
/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®