From: Philipp Rosenberger <p.rosenberger@linutronix.de>
To: linus.walleij@linaro.org, gnurou@gmail.com,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, Philipp Rosenberger <p.rosenberger@linutronix.de>
Subject: [PATCH 1/2] gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source
Date: Wed, 12 Jul 2017 10:36:39 +0200 [thread overview]
Message-ID: <1499848600-7233-2-git-send-email-p.rosenberger@linutronix.de> (raw)
In-Reply-To: <1499848600-7233-1-git-send-email-p.rosenberger@linutronix.de>
In the function gpio_set_wake_irq(), port->irq_high is only checked for
zero. As platform_get_irq() returns a value less then zero if no interrupt
was found, any gpio >= 16 was handled like an irq_high interrupt was
available. On iMX27 for example no high interrupt is available. This lead
to the problem that only some gpios (the lower 16) were useable as wake
sources.
Signed-off-by: Philipp Rosenberger <p.rosenberger@linutronix.de>
---
drivers/gpio/gpio-mxc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 3abea3f..9269225 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -424,6 +424,9 @@ static int mxc_gpio_probe(struct platform_device *pdev)
return PTR_ERR(port->base);
port->irq_high = platform_get_irq(pdev, 1);
+ if (port->irq_high < 0)
+ port->irq_high = 0;
+
port->irq = platform_get_irq(pdev, 0);
if (port->irq < 0)
return port->irq;
--
2.1.4
next prev parent reply other threads:[~2017-07-12 8:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 8:36 [PATCH 0/2] gpio-mxc: Fix issue with gpios used as wake source on iMX27 Philipp Rosenberger
2017-07-12 8:36 ` Philipp Rosenberger [this message]
2017-08-01 8:37 ` [PATCH 1/2] gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source Linus Walleij
2017-07-12 8:36 ` [PATCH 2/2] gpio: gpio-mxc: gpio_set_wake_irq() use proper return values Philipp Rosenberger
2017-08-01 8:39 ` Linus Walleij
2017-07-27 20:17 ` [PATCH 0/2] gpio-mxc: Fix issue with gpios used as wake source on iMX27 Thomas Gleixner
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=1499848600-7233-2-git-send-email-p.rosenberger@linutronix.de \
--to=p.rosenberger@linutronix.de \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).