diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2011-09-09 04:29:35 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-09-12 03:52:49 -0400 |
commit | 60f96b41f71d2a13d1c0a457b8b77958f77142d1 (patch) | |
tree | 3fdfa3f9a2e762139383938f0199ed2ed9ee5640 | |
parent | ed585a651681e822089087b426e6ebfb6d3d9873 (diff) |
genirq: Add IRQCHIP_SKIP_SET_WAKE flag
Some irq chips need the irq_set_wake() functionality, but do not
require a irq_set_wake() callback. Instead of forcing an empty
callback to be implemented add a flag which notes this fact. Check for
the flag in set_irq_wake_real() and return success when set.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | include/linux/irq.h | 2 | ||||
-rw-r--r-- | kernel/irq/manage.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 59517300a315..73e31abeba1c 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -336,12 +336,14 @@ struct irq_chip { | |||
336 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path | 336 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path |
337 | * IRQCHIP_ONOFFLINE_ENABLED: Only call irq_on/off_line callbacks | 337 | * IRQCHIP_ONOFFLINE_ENABLED: Only call irq_on/off_line callbacks |
338 | * when irq enabled | 338 | * when irq enabled |
339 | * IRQCHIP_SKIP_SET_WAKE: Skip chip.irq_set_wake(), for this irq chip | ||
339 | */ | 340 | */ |
340 | enum { | 341 | enum { |
341 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | 342 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), |
342 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), | 343 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), |
343 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), | 344 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), |
344 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), | 345 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), |
346 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), | ||
345 | }; | 347 | }; |
346 | 348 | ||
347 | /* This include will go away once we isolated irq_desc usage to core code */ | 349 | /* This include will go away once we isolated irq_desc usage to core code */ |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 9b956fa20308..7e1a3ed1e61a 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -467,6 +467,9 @@ static int set_irq_wake_real(unsigned int irq, unsigned int on) | |||
467 | struct irq_desc *desc = irq_to_desc(irq); | 467 | struct irq_desc *desc = irq_to_desc(irq); |
468 | int ret = -ENXIO; | 468 | int ret = -ENXIO; |
469 | 469 | ||
470 | if (irq_desc_get_chip(desc)->flags & IRQCHIP_SKIP_SET_WAKE) | ||
471 | return 0; | ||
472 | |||
470 | if (desc->irq_data.chip->irq_set_wake) | 473 | if (desc->irq_data.chip->irq_set_wake) |
471 | ret = desc->irq_data.chip->irq_set_wake(&desc->irq_data, on); | 474 | ret = desc->irq_data.chip->irq_set_wake(&desc->irq_data, on); |
472 | 475 | ||