diff mbox

omap: gpio: fix incorrect matching of IRQ_TYPE_EDGE_BOTH

Message ID 201004051338.07160.jkrzyszt@tis.icnet.pl (mailing list archive)
State Accepted
Commit 540428607511ef4bc96dda5f270a3cbad2a3f57c
Delegated to: Tony Lindgren
Headers show

Commit Message

Janusz Krzysztofik April 5, 2010, 11:38 a.m. UTC
None
diff mbox

Patch

--- git/arch/arm/plat-omap/gpio.c.orig	2010-04-01 17:54:17.000000000 +0200
+++ git/arch/arm/plat-omap/gpio.c	2010-04-04 02:34:44.000000000 +0200
@@ -798,7 +798,7 @@  static int _set_gpio_triggering(struct g
 	case METHOD_MPUIO:
 		reg += OMAP_MPUIO_GPIO_INT_EDGE;
 		l = __raw_readl(reg);
-		if (trigger & IRQ_TYPE_EDGE_BOTH)
+		if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH)
 			bank->toggle_mask |= 1 << gpio;
 		if (trigger & IRQ_TYPE_EDGE_RISING)
 			l |= 1 << gpio;
@@ -812,7 +812,7 @@  static int _set_gpio_triggering(struct g
 	case METHOD_GPIO_1510:
 		reg += OMAP1510_GPIO_INT_CONTROL;
 		l = __raw_readl(reg);
-		if (trigger & IRQ_TYPE_EDGE_BOTH)
+		if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH)
 			bank->toggle_mask |= 1 << gpio;
 		if (trigger & IRQ_TYPE_EDGE_RISING)
 			l |= 1 << gpio;
@@ -846,7 +846,7 @@  static int _set_gpio_triggering(struct g
 	case METHOD_GPIO_7XX:
 		reg += OMAP7XX_GPIO_INT_CONTROL;
 		l = __raw_readl(reg);
-		if (trigger & IRQ_TYPE_EDGE_BOTH)
+		if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH)
 			bank->toggle_mask |= 1 << gpio;
 		if (trigger & IRQ_TYPE_EDGE_RISING)
 			l |= 1 << gpio;