aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-06-29 05:24:55 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 13:26:24 -0400
commitba9a2331bae5da8f65be3722b9e2d210f1987857 (patch)
treeca7cf6a1cfcab2fc4423eb38832236cfb627eaf2 /kernel
parent7a55713ab456d267815fd5ca3c3d0fd14301f306 (diff)
[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.c21
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)
133} 133}
134EXPORT_SYMBOL(enable_irq); 134EXPORT_SYMBOL(enable_irq);
135 135
136/**
137 * set_irq_wake - control irq power management wakeup
138 * @irq: interrupt to control
139 * @on: enable/disable power management wakeup
140 *
141 * Enable/disable power management wakeup mode
142 */
143int set_irq_wake(unsigned int irq, unsigned int on)
144{
145 struct irq_desc *desc = irq_desc + irq;
146 unsigned long flags;
147 int ret = -ENXIO;
148
149 spin_lock_irqsave(&desc->lock, flags);
150 if (desc->chip->set_wake)
151 ret = desc->chip->set_wake(irq, on);
152 spin_unlock_irqrestore(&desc->lock, flags);
153 return ret;
154}
155EXPORT_SYMBOL(set_irq_wake);
156
136/* 157/*
137 * Internal function that tells the architecture code whether a 158 * Internal function that tells the architecture code whether a
138 * particular irq has been exclusively allocated or is available 159 * particular irq has been exclusively allocated or is available