Lines Matching +full:scan +full:- +full:delay
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 1992, 1998-2004 Linus Torvalds, Ingo Molnar
11 #include <linux/delay.h>
24 * probe_irq_on - begin an interrupt autodetect
46 guard(raw_spinlock_irq)(&desc->lock); in probe_irq_on()
47 if (!desc->action && irq_settings_can_probe(desc)) { in probe_irq_on()
52 if (desc->irq_data.chip->irq_set_type) in probe_irq_on()
53 desc->irq_data.chip->irq_set_type(&desc->irq_data, IRQ_TYPE_PROBE); in probe_irq_on()
67 guard(raw_spinlock_irq)(&desc->lock); in probe_irq_on()
68 if (!desc->action && irq_settings_can_probe(desc)) { in probe_irq_on()
69 desc->istate |= IRQS_AUTODETECT | IRQS_WAITING; in probe_irq_on()
71 desc->istate |= IRQS_PENDING; in probe_irq_on()
84 guard(raw_spinlock_irq)(&desc->lock); in probe_irq_on()
85 if (desc->istate & IRQS_AUTODETECT) { in probe_irq_on()
86 /* It triggered already - consider it spurious. */ in probe_irq_on()
87 if (!(desc->istate & IRQS_WAITING)) { in probe_irq_on()
88 desc->istate &= ~IRQS_AUTODETECT; in probe_irq_on()
101 * probe_irq_mask - scan a bitmap of interrupt lines
104 * Scan the interrupt lines and return a bitmap of active
108 * Note: we need to scan all the irq's even though we will
109 * only return autodetect irq numbers - just so that we reset
119 guard(raw_spinlock_irq)(&desc->lock); in probe_irq_mask()
120 if (desc->istate & IRQS_AUTODETECT) { in probe_irq_mask()
121 if (i < 16 && !(desc->istate & IRQS_WAITING)) in probe_irq_mask()
124 desc->istate &= ~IRQS_AUTODETECT; in probe_irq_mask()
135 * probe_irq_off - end an interrupt autodetect
149 * results of this are non-optimal.
157 guard(raw_spinlock_irq)(&desc->lock); in probe_irq_off()
158 if (desc->istate & IRQS_AUTODETECT) { in probe_irq_off()
159 if (!(desc->istate & IRQS_WAITING)) { in probe_irq_off()
164 desc->istate &= ~IRQS_AUTODETECT; in probe_irq_off()
171 irq_found = -irq_found; in probe_irq_off()