From: Guennadi Liakhovetski Date: Wed, 28 Jun 2006 15:42:02 +0000 (+0100) Subject: [ARM] 3672/1: PXA: don't probe output GPIOs for interrupt X-Git-Tag: v2.6.18-rc1~412^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e033108bf7e585755350b554048229d1fd10a02e;p=linux-2.6 [ARM] 3672/1: PXA: don't probe output GPIOs for interrupt Patch from Guennadi Liakhovetski Currently probe_irq_on() on PXA will silently reconfigure all output GPIOs, that are not configured as alternate functions, for input. Avoid that. Upon CPU reset all GPIOs are configured as inputs, so, if a GPIO is configured as output, it has been done so intentionally. Signed-off-by: G. Liakhovetski Signed-off-by: Nicolas Pitre Signed-off-by: Russell King --- diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 539b596005..d9635ff4b1 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -88,8 +88,8 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) if (type == IRQT_PROBE) { /* Don't mess with enabled GPIOs using preconfigured edges or - GPIOs set to alternate function during probe */ - if ((GPIO_IRQ_rising_edge[idx] | GPIO_IRQ_falling_edge[idx]) & + GPIOs set to alternate function or to output during probe */ + if ((GPIO_IRQ_rising_edge[idx] | GPIO_IRQ_falling_edge[idx] | GPDR(gpio)) & GPIO_bit(gpio)) return 0; if (GAFR(gpio) & (0x3 << (((gpio) & 0xf)*2)))