mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
genirq: Allow shared oneshot interrupts
Support ONESHOT on shared interrupts, if all drivers agree on it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <20110223234956.483640430@linutronix.de>
This commit is contained in:
parent
b5faba21a6
commit
9d591edd02
1 changed files with 4 additions and 6 deletions
|
@ -824,10 +824,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
|
||||||
rand_initialize_irq(irq);
|
rand_initialize_irq(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Oneshot interrupts are not allowed with shared */
|
|
||||||
if ((new->flags & IRQF_ONESHOT) && (new->flags & IRQF_SHARED))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check whether the interrupt nests into another interrupt
|
* Check whether the interrupt nests into another interrupt
|
||||||
* thread.
|
* thread.
|
||||||
|
@ -881,10 +877,12 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
|
||||||
* Can't share interrupts unless both agree to and are
|
* Can't share interrupts unless both agree to and are
|
||||||
* the same type (level, edge, polarity). So both flag
|
* the same type (level, edge, polarity). So both flag
|
||||||
* fields must have IRQF_SHARED set and the bits which
|
* fields must have IRQF_SHARED set and the bits which
|
||||||
* set the trigger type must match.
|
* set the trigger type must match. Also all must
|
||||||
|
* agree on ONESHOT.
|
||||||
*/
|
*/
|
||||||
if (!((old->flags & new->flags) & IRQF_SHARED) ||
|
if (!((old->flags & new->flags) & IRQF_SHARED) ||
|
||||||
((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) {
|
((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) ||
|
||||||
|
((old->flags ^ new->flags) & IRQF_ONESHOT)) {
|
||||||
old_name = old->name;
|
old_name = old->name;
|
||||||
goto mismatch;
|
goto mismatch;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue