Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Christoph Hellwig | 511cbce | 2015-11-10 14:56:14 +0100 | [diff] [blame] | 2 | #ifndef IRQ_POLL_H |
| 3 | #define IRQ_POLL_H |
| 4 | |
| 5 | struct irq_poll; |
| 6 | typedef int (irq_poll_fn)(struct irq_poll *, int); |
| 7 | |
| 8 | struct irq_poll { |
| 9 | struct list_head list; |
| 10 | unsigned long state; |
Christoph Hellwig | 511cbce | 2015-11-10 14:56:14 +0100 | [diff] [blame] | 11 | int weight; |
Christoph Hellwig | 511cbce | 2015-11-10 14:56:14 +0100 | [diff] [blame] | 12 | irq_poll_fn *poll; |
| 13 | }; |
| 14 | |
| 15 | enum { |
| 16 | IRQ_POLL_F_SCHED = 0, |
| 17 | IRQ_POLL_F_DISABLE = 1, |
| 18 | }; |
| 19 | |
Christoph Hellwig | 511cbce | 2015-11-10 14:56:14 +0100 | [diff] [blame] | 20 | extern void irq_poll_sched(struct irq_poll *); |
| 21 | extern void irq_poll_init(struct irq_poll *, int, irq_poll_fn *); |
| 22 | extern void irq_poll_complete(struct irq_poll *); |
Christoph Hellwig | 511cbce | 2015-11-10 14:56:14 +0100 | [diff] [blame] | 23 | extern void irq_poll_enable(struct irq_poll *); |
| 24 | extern void irq_poll_disable(struct irq_poll *); |
| 25 | |
| 26 | #endif |