aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-27 05:02:49 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-03-27 11:45:58 -0400
commit801a0e9ae36e9b487092e31699d28c0b9a21ad52 (patch)
treec448d150797272b09417f5410e7570742e59368b /include/linux/irq.h
parentd72274e5895d11570a0a4a3214a1933c86d5ccb7 (diff)
genirq: Add irq disabled flag to irq_data state
Some irq_chip implementation require to know the disabled state of the interrupt in certain callbacks. Add a state flag and accessor to irq_data. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 5d876c9b3a3d..8649b0fb9daf 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -174,6 +174,8 @@ struct irq_data {
174 * from suspend 174 * from suspend
175 * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process 175 * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process
176 * context 176 * context
177 * IRQD_IRQ_DISABLED - Some chip function need to know the
178 * disabled state.
177 */ 179 */
178enum { 180enum {
179 IRQD_TRIGGER_MASK = 0xf, 181 IRQD_TRIGGER_MASK = 0xf,
@@ -184,6 +186,7 @@ enum {
184 IRQD_LEVEL = (1 << 13), 186 IRQD_LEVEL = (1 << 13),
185 IRQD_WAKEUP_STATE = (1 << 14), 187 IRQD_WAKEUP_STATE = (1 << 14),
186 IRQD_MOVE_PCNTXT = (1 << 15), 188 IRQD_MOVE_PCNTXT = (1 << 15),
189 IRQD_IRQ_DISABLED = (1 << 16),
187}; 190};
188 191
189static inline bool irqd_is_setaffinity_pending(struct irq_data *d) 192static inline bool irqd_is_setaffinity_pending(struct irq_data *d)
@@ -235,6 +238,11 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d)
235 return d->state_use_accessors & IRQD_MOVE_PCNTXT; 238 return d->state_use_accessors & IRQD_MOVE_PCNTXT;
236} 239}
237 240
241static inline bool irqd_irq_disabled(struct irq_data *d)
242{
243 return d->state_use_accessors & IRQD_IRQ_DISABLED;
244}
245
238/** 246/**
239 * struct irq_chip - hardware interrupt chip descriptor 247 * struct irq_chip - hardware interrupt chip descriptor
240 * 248 *