diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2006-06-29 11:24:55 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 19:26:24 +0200 |
commit | ba9a2331bae5da8f65be3722b9e2d210f1987857 (patch) | |
tree | ca7cf6a1cfcab2fc4423eb38832236cfb627eaf2 /kernel | |
parent | [PATCH] genirq: add handle_bad_irq() (diff) | |
download | linux-ba9a2331bae5da8f65be3722b9e2d210f1987857.tar.xz linux-ba9a2331bae5da8f65be3722b9e2d210f1987857.zip |
[PATCH] genirq: add irq-wake (power-management) support
Enable platforms to set the irq-wake (power-management) properties of an IRQ.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/manage.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index b61784ee78b2..3ed7aee84865 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -133,6 +133,27 @@ void enable_irq(unsigned int irq) } EXPORT_SYMBOL(enable_irq); +/** + * set_irq_wake - control irq power management wakeup + * @irq: interrupt to control + * @on: enable/disable power management wakeup + * + * Enable/disable power management wakeup mode + */ +int set_irq_wake(unsigned int irq, unsigned int on) +{ + struct irq_desc *desc = irq_desc + irq; + unsigned long flags; + int ret = -ENXIO; + + spin_lock_irqsave(&desc->lock, flags); + if (desc->chip->set_wake) + ret = desc->chip->set_wake(irq, on); + spin_unlock_irqrestore(&desc->lock, flags); + return ret; +} +EXPORT_SYMBOL(set_irq_wake); + /* * Internal function that tells the architecture code whether a * particular irq has been exclusively allocated or is available |