Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191782
b: refs/heads/master
c: 7a852d8
h: refs/heads/master
v: v3
  • Loading branch information
Rabin Vincent authored and Russell King committed May 6, 2010
1 parent 9178487 commit 3bcf10c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 040e5ecddaa72f1f982b83cb205509bc9ce7f91e
refs/heads/master: 7a852d8060e1bb3a5e621caaebea86c43cf4a62d
11 changes: 7 additions & 4 deletions trunk/arch/arm/plat-nomadik/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ static void nmk_gpio_irq_unmask(unsigned int irq)

static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type)
{
bool enabled = !(irq_to_desc(irq)->status & IRQ_DISABLED);
int gpio;
struct nmk_gpio_chip *nmk_chip;
unsigned long flags;
Expand All @@ -180,19 +181,21 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type)

spin_lock_irqsave(&nmk_chip->lock, flags);

if (enabled)
__nmk_gpio_irq_modify(nmk_chip, gpio, false);

nmk_chip->edge_rising &= ~bitmask;
if (type & IRQ_TYPE_EDGE_RISING)
nmk_chip->edge_rising |= bitmask;
writel(nmk_chip->edge_rising, nmk_chip->addr + NMK_GPIO_RIMSC);

nmk_chip->edge_falling &= ~bitmask;
if (type & IRQ_TYPE_EDGE_FALLING)
nmk_chip->edge_falling |= bitmask;
writel(nmk_chip->edge_falling, nmk_chip->addr + NMK_GPIO_FIMSC);

spin_unlock_irqrestore(&nmk_chip->lock, flags);
if (enabled)
__nmk_gpio_irq_modify(nmk_chip, gpio, true);

nmk_gpio_irq_unmask(irq);
spin_unlock_irqrestore(&nmk_chip->lock, flags);

return 0;
}
Expand Down

0 comments on commit 3bcf10c

Please sign in to comment.