Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685627 > unrolled thread

[PATCH 1/2] gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source

Started byPhilipp Rosenberger <p.rosenberger@linutronix.de>
First post2017-07-12 10:40 +0200
Last post2017-07-12 10:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/2] gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source Philipp Rosenberger <p.rosenberger@linutronix.de> - 2017-07-12 10:40 +0200

#1685627 — [PATCH 1/2] gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source

FromPhilipp Rosenberger <p.rosenberger@linutronix.de>
Date2017-07-12 10:40 +0200
Subject[PATCH 1/2] gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source
Message-ID<u2llE-5Pi-1@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web