Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91216
b: refs/heads/master
c: a7bf4db
h: refs/heads/master
v: v3
  • Loading branch information
eric miao authored and Russell King committed Apr 19, 2008
1 parent c5745b0 commit c9980d0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 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: 7a26d3a33fd9adcbfd4fa2ca2d7e8a8272817935
refs/heads/master: a7bf4dbabac2a1ccd56527a56c82af720e7a00d1
24 changes: 19 additions & 5 deletions trunk/arch/arm/mach-pxa/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,21 @@ static void pxa_ack_low_gpio(unsigned int irq)
GEDR0 = (1 << (irq - IRQ_GPIO0));
}

static void pxa_mask_low_gpio(unsigned int irq)
{
ICMR &= ~(1 << (irq - PXA_IRQ(0)));
}

static void pxa_unmask_low_gpio(unsigned int irq)
{
ICMR |= 1 << (irq - PXA_IRQ(0));
}

static struct irq_chip pxa_low_gpio_chip = {
.name = "GPIO-l",
.ack = pxa_ack_low_gpio,
.mask = pxa_mask_low_irq,
.unmask = pxa_unmask_low_irq,
.mask = pxa_mask_low_gpio,
.unmask = pxa_unmask_low_gpio,
.set_type = pxa_gpio_irq_type,
};

Expand Down Expand Up @@ -267,20 +277,24 @@ void __init pxa_init_irq_gpio(int gpio_nr)
}

/* Install handler for GPIO>=2 edge detect interrupts */
set_irq_chip(IRQ_GPIO_2_x, &pxa_internal_chip_low);
set_irq_chained_handler(IRQ_GPIO_2_x, pxa_gpio_demux_handler);

pxa_init_gpio(gpio_nr);
}

void __init pxa_init_gpio_set_wake(int (*set_wake)(unsigned int, unsigned int))
{
pxa_low_gpio_chip.set_wake = set_wake;
pxa_muxed_gpio_chip.set_wake = set_wake;
}

void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int))
{
pxa_internal_chip_low.set_wake = set_wake;
#ifdef CONFIG_PXA27x
pxa_internal_chip_high.set_wake = set_wake;
#endif
pxa_low_gpio_chip.set_wake = set_wake;
pxa_muxed_gpio_chip.set_wake = set_wake;
pxa_init_gpio_set_wake(set_wake);
}

#ifdef CONFIG_PM
Expand Down

0 comments on commit c9980d0

Please sign in to comment.