Skip to content

Commit

Permalink
[ARM] pxa: add set_type to the pxa3xx ext_wakeup irq chip.
Browse files Browse the repository at this point in the history
pxa3xx cpu needs the irq type setup to be able to
wakeup from low power mode on IRQ_WAKEUPx events.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
  • Loading branch information
Igor Grinberg authored and Eric Miao committed Aug 5, 2010
1 parent dcd925f commit 1288209
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/arm/mach-pxa/pxa3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,23 @@ static void pxa_unmask_ext_wakeup(unsigned int irq)
PECR |= PECR_IE(irq - IRQ_WAKEUP0);
}

static int pxa_set_ext_wakeup_type(unsigned int irq, unsigned int flow_type)
{
if (flow_type & IRQ_TYPE_EDGE_RISING)
PWER |= 1 << (irq - IRQ_WAKEUP0);

if (flow_type & IRQ_TYPE_EDGE_FALLING)
PWER |= 1 << (irq - IRQ_WAKEUP0 + 2);

return 0;
}

static struct irq_chip pxa_ext_wakeup_chip = {
.name = "WAKEUP",
.ack = pxa_ack_ext_wakeup,
.mask = pxa_mask_ext_wakeup,
.unmask = pxa_unmask_ext_wakeup,
.set_type = pxa_set_ext_wakeup_type,
};

static void __init pxa_init_ext_wakeup_irq(set_wake_t fn)
Expand Down

0 comments on commit 1288209

Please sign in to comment.