Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190317
b: refs/heads/master
c: a2cb9ae
h: refs/heads/master
i:
  190315: 9270708
v: v3
  • Loading branch information
Marc Zyngier authored and Linus Torvalds committed Apr 27, 2010
1 parent 8ba78d2 commit 216f21b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3835541dd481091c4dbf5ef83c08aed12e50fd61
refs/heads/master: a2cb9aeb3c9b2475955cec328487484034f414e4
14 changes: 13 additions & 1 deletion trunk/drivers/gpio/pca953x.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,18 @@ static void pca953x_irq_bus_lock(unsigned int irq)
static void pca953x_irq_bus_sync_unlock(unsigned int irq)
{
struct pca953x_chip *chip = get_irq_chip_data(irq);
uint16_t new_irqs;
uint16_t level;

/* Look for any newly setup interrupt */
new_irqs = chip->irq_trig_fall | chip->irq_trig_raise;
new_irqs &= ~chip->reg_direction;

while (new_irqs) {
level = __ffs(new_irqs);
pca953x_gpio_direction_input(&chip->gpio_chip, level);
new_irqs &= ~(1 << level);
}

mutex_unlock(&chip->irq_lock);
}
Expand All @@ -278,7 +290,7 @@ static int pca953x_irq_set_type(unsigned int irq, unsigned int type)
else
chip->irq_trig_raise &= ~mask;

return pca953x_gpio_direction_input(&chip->gpio_chip, level);
return 0;
}

static struct irq_chip pca953x_irq_chip = {
Expand Down

0 comments on commit 216f21b

Please sign in to comment.