aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-30 14:46:13 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-30 14:46:13 -0400
commite4cb0c9e92f7b16db7a1e892ac6bcf2f736dfd50 (patch)
tree35d66a4fc97aa642c14483966f050b5663ff02ca /include
parent905563ff47db35dcb3f69e69d434207270ad1966 (diff)
parent27f3d18630cd7fbb03b62bd78a74303cb8c88069 (diff)
Merge branch 'pm-genirq' into acpi-pm
Diffstat (limited to 'include')
-rw-r--r--include/linux/interrupt.h5
-rw-r--r--include/linux/irq.h8
-rw-r--r--include/linux/irqdesc.h10
-rw-r--r--include/linux/suspend.h4
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. */
194extern void suspend_device_irqs(void); 194extern void suspend_device_irqs(void);
195extern void resume_device_irqs(void); 195extern void resume_device_irqs(void);
196#ifdef CONFIG_PM_SLEEP
197extern int check_wakeup_irqs(void);
198#else
199static 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 */
177enum { 178enum {
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
191static inline bool irqd_is_setaffinity_pending(struct irq_data *d) 193static 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
262static 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);
371extern bool events_check_enabled; 371extern bool events_check_enabled;
372 372
373extern bool pm_wakeup_pending(void); 373extern bool pm_wakeup_pending(void);
374extern void pm_system_wakeup(void);
375extern void pm_wakeup_clear(void);
374extern bool pm_get_wakeup_count(unsigned int *count, bool block); 376extern bool pm_get_wakeup_count(unsigned int *count, bool block);
375extern bool pm_save_wakeup_count(unsigned int count); 377extern bool pm_save_wakeup_count(unsigned int count);
376extern void pm_wakep_autosleep_enabled(bool set); 378extern 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
420static inline bool pm_wakeup_pending(void) { return false; } 422static inline bool pm_wakeup_pending(void) { return false; }
423static inline void pm_system_wakeup(void) {}
424static inline void pm_wakeup_clear(void) {}
421 425
422static inline void lock_system_sleep(void) {} 426static inline void lock_system_sleep(void) {}
423static inline void unlock_system_sleep(void) {} 427static inline void unlock_system_sleep(void) {}