diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-05 19:29:05 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-05 19:29:05 -0500 |
commit | 79d223646baa14272dc90044a0e798c552b72eda (patch) | |
tree | a4f92bc30b14595242d1b60705b93e3f86afc59f /kernel | |
parent | eef16e4362703f213c40175c4adb6f00f6eb9735 (diff) | |
parent | 7438b633a6b073d66a3fa3678ec0dd5928caa4af (diff) |
Merge branch 'irq-pm'
* irq-pm:
genirq / PM: describe IRQF_COND_SUSPEND
tty: serial: atmel: rework interrupt and wakeup handling
watchdog: at91sam9: request the irq with IRQF_NO_SUSPEND
clk: at91: implement suspend/resume for the PMC irqchip
rtc: at91rm9200: rework wakeup and interrupt handling
rtc: at91sam9: rework wakeup and interrupt handling
PM / wakeup: export pm_system_wakeup symbol
genirq / PM: Add flag for shared NO_SUSPEND interrupt lines
genirq / PM: better describe IRQF_NO_SUSPEND semantics
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/manage.c | 7 | ||||
-rw-r--r-- | kernel/irq/pm.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 196a06fbc122..886d09e691d5 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -1474,8 +1474,13 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler, | |||
1474 | * otherwise we'll have trouble later trying to figure out | 1474 | * otherwise we'll have trouble later trying to figure out |
1475 | * which interrupt is which (messes up the interrupt freeing | 1475 | * which interrupt is which (messes up the interrupt freeing |
1476 | * logic etc). | 1476 | * logic etc). |
1477 | * | ||
1478 | * Also IRQF_COND_SUSPEND only makes sense for shared interrupts and | ||
1479 | * it cannot be set along with IRQF_NO_SUSPEND. | ||
1477 | */ | 1480 | */ |
1478 | if ((irqflags & IRQF_SHARED) && !dev_id) | 1481 | if (((irqflags & IRQF_SHARED) && !dev_id) || |
1482 | (!(irqflags & IRQF_SHARED) && (irqflags & IRQF_COND_SUSPEND)) || | ||
1483 | ((irqflags & IRQF_NO_SUSPEND) && (irqflags & IRQF_COND_SUSPEND))) | ||
1479 | return -EINVAL; | 1484 | return -EINVAL; |
1480 | 1485 | ||
1481 | desc = irq_to_desc(irq); | 1486 | desc = irq_to_desc(irq); |
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c index 3ca532592704..5204a6d1b985 100644 --- a/kernel/irq/pm.c +++ b/kernel/irq/pm.c | |||
@@ -43,9 +43,12 @@ void irq_pm_install_action(struct irq_desc *desc, struct irqaction *action) | |||
43 | 43 | ||
44 | if (action->flags & IRQF_NO_SUSPEND) | 44 | if (action->flags & IRQF_NO_SUSPEND) |
45 | desc->no_suspend_depth++; | 45 | desc->no_suspend_depth++; |
46 | else if (action->flags & IRQF_COND_SUSPEND) | ||
47 | desc->cond_suspend_depth++; | ||
46 | 48 | ||
47 | WARN_ON_ONCE(desc->no_suspend_depth && | 49 | WARN_ON_ONCE(desc->no_suspend_depth && |
48 | desc->no_suspend_depth != desc->nr_actions); | 50 | (desc->no_suspend_depth + |
51 | desc->cond_suspend_depth) != desc->nr_actions); | ||
49 | } | 52 | } |
50 | 53 | ||
51 | /* | 54 | /* |
@@ -61,6 +64,8 @@ void irq_pm_remove_action(struct irq_desc *desc, struct irqaction *action) | |||
61 | 64 | ||
62 | if (action->flags & IRQF_NO_SUSPEND) | 65 | if (action->flags & IRQF_NO_SUSPEND) |
63 | desc->no_suspend_depth--; | 66 | desc->no_suspend_depth--; |
67 | else if (action->flags & IRQF_COND_SUSPEND) | ||
68 | desc->cond_suspend_depth--; | ||
64 | } | 69 | } |
65 | 70 | ||
66 | static bool suspend_device_irq(struct irq_desc *desc, int irq) | 71 | static bool suspend_device_irq(struct irq_desc *desc, int irq) |