Skip to contentSkip to conversation

PL061 GPIO: Bug fix - setting gpio for HIGH_LEVEL interrupt is not working.

PATCH New Viresh KUMAR 2 participants 2 messages Apr 21, 2010 – Apr 22, 2010 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PL061 GPIO: Bug fix - setting gpio for HIGH_LEVEL interrupt is not working.

In current implementation of PL061, setting type of irq to HIGH_LEVEL is not working. This patch fixes this bug.

---
 drivers/gpio/pl061.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpio/pl061.c +1 -1
index 4f172ab..d30c8a6 100644
@@ -188,7 +188,7 @@ static int pl061_irq_type(unsigned irq, unsigned trigger)
 		gpioibe &= ~(1 << offset);
 		if (trigger & IRQ_TYPE_EDGE_RISING)
 			gpioiev |= 1 << offset;
-		else
+		else if (trigger & IRQ_TYPE_EDGE_FALLING)
 			gpioiev &= ~(1 << offset);
 	}
 	writeb(gpioibe, chip->base + GPIOIBE);
Signature · 1 line
1.6.0.2
#1 lore raw

PATCH 1/1 PL061 GPIO: Bug fix - setting gpio for HIGH_LEVEL interrupt is not working.

Hi Viresh,

Quoted 4 lines · Viresh KUMAR

In current implementation of PL061, setting type of irq to HIGH_LEVEL is not working. This patch fixes this bug.

Thanks,
baruch

Quoted 18 lines
---
 drivers/gpio/pl061.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpio/pl061.c +1 -1
index 4f172ab..d30c8a6 100644
@@ -188,7 +188,7 @@ static int pl061_irq_type(unsigned irq, unsigned trigger)
 		gpioibe &= ~(1 << offset);
 		if (trigger & IRQ_TYPE_EDGE_RISING)
 			gpioiev |= 1 << offset;
-		else
+		else if (trigger & IRQ_TYPE_EDGE_FALLING)
 			gpioiev &= ~(1 << offset);
 	}
 	writeb(gpioibe, chip->base + GPIOIBE);
Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -