Commit 21f762b4 authored by Russell King's avatar Russell King

[ARM] Add basic support for enable/disable_irq_wake.

parent 5d9432fb
......@@ -127,7 +127,8 @@ EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(probe_irq_mask);
EXPORT_SYMBOL(set_irq_type);
EXPORT_SYMBOL(set_irq_wake);
EXPORT_SYMBOL(enable_irq_wake);
EXPORT_SYMBOL(disable_irq_wake);
EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(fp_init);
......
......@@ -129,6 +129,31 @@ void enable_irq(unsigned int irq)
spin_unlock_irqrestore(&irq_controller_lock, flags);
}
/*
* Enable wake on selected irq
*/
void enable_irq_wake(unsigned int irq)
{
struct irqdesc *desc = irq_desc + irq;
unsigned long flags;
spin_lock_irqsave(&irq_controller_lock, flags);
if (desc->chip->wake)
desc->chip->wake(irq, 1);
spin_unlock_irqrestore(&irq_controller_lock, flags);
}
void disable_irq_wake(unsigned int irq)
{
struct irqdesc *desc = irq_desc + irq;
unsigned long flags;
spin_lock_irqsave(&irq_controller_lock, flags);
if (desc->chip->wake)
desc->chip->wake(irq, 0);
spin_unlock_irqrestore(&irq_controller_lock, flags);
}
int show_interrupts(struct seq_file *p, void *v)
{
int i;
......
......@@ -40,7 +40,8 @@ extern void enable_irq(unsigned int);
#define IRQT_PROBE (1 << 4)
int set_irq_type(unsigned int irq, unsigned int type);
void disable_irq_wake(unsigned int irq);
void enable_irq_wake(unsigned int irq);
int setup_irq(unsigned int, struct irqaction *);
#endif
......
......@@ -40,6 +40,10 @@ struct irqchip {
* Set the type of the IRQ.
*/
int (*type)(unsigned int, unsigned int);
/*
* Set wakeup-enable on the selected IRQ
*/
int (*wake)(unsigned int, unsigned int);
};
struct irqdesc {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment