Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpio: Langwell GPIO driver bugfixes

- Remove wrong and unnecessary unmask operation

- Remove extra GEDR reading

This fixes the loss of interrupts which occurs when two or more pins are
triggered in close succession.

Signed-off-by: Alek Du <alek.du@intel.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alek Du and committed by
Linus Torvalds
ca029701 97434843

+1 -10
+1 -10
drivers/gpio/langwell_gpio.c
··· 144 144 145 145 static void lnw_irq_unmask(unsigned irq) 146 146 { 147 - struct lnw_gpio *lnw = get_irq_chip_data(irq); 148 - u32 gpio = irq - lnw->irq_base; 149 - u8 reg = gpio / 32; 150 - void __iomem *gedr; 151 - 152 - gedr = (void __iomem *)(&lnw->reg_base->GEDR[reg]); 153 - writel(BIT(gpio % 32), gedr); 154 147 }; 155 148 156 149 static void lnw_irq_mask(unsigned irq) ··· 176 183 gedr_v = readl(gedr); 177 184 if (!gedr_v) 178 185 continue; 179 - for (gpio = reg*32; gpio < reg*32+32; gpio++) { 180 - gedr_v = readl(gedr); 186 + for (gpio = reg*32; gpio < reg*32+32; gpio++) 181 187 if (gedr_v & BIT(gpio % 32)) { 182 188 pr_debug("pin %d triggered\n", gpio); 183 189 generic_handle_irq(lnw->irq_base + gpio); 184 190 } 185 - } 186 191 /* clear the edge detect status bit */ 187 192 writel(gedr_v, gedr); 188 193 }