From patchwork Mon Apr 5 11:38:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 90615 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o35Bgwe4016456 for ; Mon, 5 Apr 2010 11:42:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753004Ab0DELm6 (ORCPT ); Mon, 5 Apr 2010 07:42:58 -0400 Received: from d1.icnet.pl ([212.160.220.21]:44725 "EHLO d1.icnet.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487Ab0DELm5 (ORCPT ); Mon, 5 Apr 2010 07:42:57 -0400 Received: from 87-205-12-81.ip.netia.com.pl ([87.205.12.81] helo=vclass.intranet) by d1.icnet.pl with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Nykhk-0005ki-PK; Mon, 05 Apr 2010 13:42:56 +0200 From: Janusz Krzysztofik Organization: Tele-Info-System, Poznan, PL To: "linux-omap@vger.kernel.org" Subject: [PATCH] omap: gpio: fix incorrect matching of IRQ_TYPE_EDGE_BOTH Date: Mon, 5 Apr 2010 13:38:06 +0200 User-Agent: KMail/1.9.10 Cc: Tony Lindgren , "Greg Kroah-Hartman" MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201004051338.07160.jkrzyszt@tis.icnet.pl> X-SA-Exim-Scanned: No (on d1.icnet); SAEximRunCond expanded to false Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 05 Apr 2010 11:43:03 +0000 (UTC) --- 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;