aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq')
-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