diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-09-30 14:46:13 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-09-30 14:46:13 -0400 |
| commit | e4cb0c9e92f7b16db7a1e892ac6bcf2f736dfd50 (patch) | |
| tree | 35d66a4fc97aa642c14483966f050b5663ff02ca /include | |
| parent | 905563ff47db35dcb3f69e69d434207270ad1966 (diff) | |
| parent | 27f3d18630cd7fbb03b62bd78a74303cb8c88069 (diff) | |
Merge branch 'pm-genirq' into acpi-pm
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/interrupt.h | 5 | ||||
| -rw-r--r-- | include/linux/irq.h | 8 | ||||
| -rw-r--r-- | include/linux/irqdesc.h | 10 | ||||
| -rw-r--r-- | include/linux/suspend.h | 4 |
4 files changed, 22 insertions, 5 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 698ad053d064..69517a24bc50 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -193,11 +193,6 @@ extern void irq_wake_thread(unsigned int irq, void *dev_id); | |||
| 193 | /* The following three functions are for the core kernel use only. */ | 193 | /* The following three functions are for the core kernel use only. */ |
| 194 | extern void suspend_device_irqs(void); | 194 | extern void suspend_device_irqs(void); |
| 195 | extern void resume_device_irqs(void); | 195 | extern void resume_device_irqs(void); |
| 196 | #ifdef CONFIG_PM_SLEEP | ||
| 197 | extern int check_wakeup_irqs(void); | ||
| 198 | #else | ||
| 199 | static inline int check_wakeup_irqs(void) { return 0; } | ||
| 200 | #endif | ||
| 201 | 196 | ||
| 202 | /** | 197 | /** |
| 203 | * struct irq_affinity_notify - context for notification of IRQ affinity changes | 198 | * struct irq_affinity_notify - context for notification of IRQ affinity changes |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 62af59242ddc..03f48d936f66 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -173,6 +173,7 @@ struct irq_data { | |||
| 173 | * IRQD_IRQ_DISABLED - Disabled state of the interrupt | 173 | * IRQD_IRQ_DISABLED - Disabled state of the interrupt |
| 174 | * IRQD_IRQ_MASKED - Masked state of the interrupt | 174 | * IRQD_IRQ_MASKED - Masked state of the interrupt |
| 175 | * IRQD_IRQ_INPROGRESS - In progress state of the interrupt | 175 | * IRQD_IRQ_INPROGRESS - In progress state of the interrupt |
| 176 | * IRQD_WAKEUP_ARMED - Wakeup mode armed | ||
| 176 | */ | 177 | */ |
| 177 | enum { | 178 | enum { |
| 178 | IRQD_TRIGGER_MASK = 0xf, | 179 | IRQD_TRIGGER_MASK = 0xf, |
| @@ -186,6 +187,7 @@ enum { | |||
| 186 | IRQD_IRQ_DISABLED = (1 << 16), | 187 | IRQD_IRQ_DISABLED = (1 << 16), |
| 187 | IRQD_IRQ_MASKED = (1 << 17), | 188 | IRQD_IRQ_MASKED = (1 << 17), |
| 188 | IRQD_IRQ_INPROGRESS = (1 << 18), | 189 | IRQD_IRQ_INPROGRESS = (1 << 18), |
| 190 | IRQD_WAKEUP_ARMED = (1 << 19), | ||
| 189 | }; | 191 | }; |
| 190 | 192 | ||
| 191 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) | 193 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) |
| @@ -257,6 +259,12 @@ static inline bool irqd_irq_inprogress(struct irq_data *d) | |||
| 257 | return d->state_use_accessors & IRQD_IRQ_INPROGRESS; | 259 | return d->state_use_accessors & IRQD_IRQ_INPROGRESS; |
| 258 | } | 260 | } |
| 259 | 261 | ||
| 262 | static inline bool irqd_is_wakeup_armed(struct irq_data *d) | ||
| 263 | { | ||
| 264 | return d->state_use_accessors & IRQD_WAKEUP_ARMED; | ||
| 265 | } | ||
| 266 | |||
| 267 | |||
| 260 | /* | 268 | /* |
| 261 | * Functions for chained handlers which can be enabled/disabled by the | 269 | * Functions for chained handlers which can be enabled/disabled by the |
| 262 | * standard disable_irq/enable_irq calls. Must be called with | 270 | * standard disable_irq/enable_irq calls. Must be called with |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 472c021a2d4f..cb1a31e448ae 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -36,6 +36,11 @@ struct irq_desc; | |||
| 36 | * @threads_oneshot: bitfield to handle shared oneshot threads | 36 | * @threads_oneshot: bitfield to handle shared oneshot threads |
| 37 | * @threads_active: number of irqaction threads currently running | 37 | * @threads_active: number of irqaction threads currently running |
| 38 | * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers | 38 | * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers |
| 39 | * @nr_actions: number of installed actions on this descriptor | ||
| 40 | * @no_suspend_depth: number of irqactions on a irq descriptor with | ||
| 41 | * IRQF_NO_SUSPEND set | ||
| 42 | * @force_resume_depth: number of irqactions on a irq descriptor with | ||
| 43 | * IRQF_FORCE_RESUME set | ||
| 39 | * @dir: /proc/irq/ procfs entry | 44 | * @dir: /proc/irq/ procfs entry |
| 40 | * @name: flow handler name for /proc/interrupts output | 45 | * @name: flow handler name for /proc/interrupts output |
| 41 | */ | 46 | */ |
| @@ -68,6 +73,11 @@ struct irq_desc { | |||
| 68 | unsigned long threads_oneshot; | 73 | unsigned long threads_oneshot; |
| 69 | atomic_t threads_active; | 74 | atomic_t threads_active; |
| 70 | wait_queue_head_t wait_for_threads; | 75 | wait_queue_head_t wait_for_threads; |
| 76 | #ifdef CONFIG_PM_SLEEP | ||
| 77 | unsigned int nr_actions; | ||
| 78 | unsigned int no_suspend_depth; | ||
| 79 | unsigned int force_resume_depth; | ||
| 80 | #endif | ||
| 71 | #ifdef CONFIG_PROC_FS | 81 | #ifdef CONFIG_PROC_FS |
| 72 | struct proc_dir_entry *dir; | 82 | struct proc_dir_entry *dir; |
| 73 | #endif | 83 | #endif |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 519064e0c943..06a9910827c2 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -371,6 +371,8 @@ extern int unregister_pm_notifier(struct notifier_block *nb); | |||
| 371 | extern bool events_check_enabled; | 371 | extern bool events_check_enabled; |
| 372 | 372 | ||
| 373 | extern bool pm_wakeup_pending(void); | 373 | extern bool pm_wakeup_pending(void); |
| 374 | extern void pm_system_wakeup(void); | ||
| 375 | extern void pm_wakeup_clear(void); | ||
| 374 | extern bool pm_get_wakeup_count(unsigned int *count, bool block); | 376 | extern bool pm_get_wakeup_count(unsigned int *count, bool block); |
| 375 | extern bool pm_save_wakeup_count(unsigned int count); | 377 | extern bool pm_save_wakeup_count(unsigned int count); |
| 376 | extern void pm_wakep_autosleep_enabled(bool set); | 378 | extern void pm_wakep_autosleep_enabled(bool set); |
| @@ -418,6 +420,8 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
| 418 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 420 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
| 419 | 421 | ||
| 420 | static inline bool pm_wakeup_pending(void) { return false; } | 422 | static inline bool pm_wakeup_pending(void) { return false; } |
| 423 | static inline void pm_system_wakeup(void) {} | ||
| 424 | static inline void pm_wakeup_clear(void) {} | ||
| 421 | 425 | ||
| 422 | static inline void lock_system_sleep(void) {} | 426 | static inline void lock_system_sleep(void) {} |
| 423 | static inline void unlock_system_sleep(void) {} | 427 | static inline void unlock_system_sleep(void) {} |
