Linux Audio

Check our new training course

Loading...
v4.6
 
 1/*
 2 * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar
 3 * Copyright (C) 2005-2006, Thomas Gleixner, Russell King
 4 *
 5 * This file contains the dummy interrupt chip implementation
 6 */
 7#include <linux/interrupt.h>
 8#include <linux/irq.h>
 9#include <linux/export.h>
10
11#include "internals.h"
12
13/*
14 * What should we do if we get a hw irq event on an illegal vector?
15 * Each architecture has to answer this themself.
16 */
17static void ack_bad(struct irq_data *data)
18{
19	struct irq_desc *desc = irq_data_to_desc(data);
20
21	print_irq_desc(data->irq, desc);
22	ack_bad_irq(data->irq);
23}
24
25/*
26 * NOP functions
27 */
28static void noop(struct irq_data *data) { }
29
30static unsigned int noop_ret(struct irq_data *data)
31{
32	return 0;
33}
34
35/*
36 * Generic no controller implementation
37 */
38struct irq_chip no_irq_chip = {
39	.name		= "none",
40	.irq_startup	= noop_ret,
41	.irq_shutdown	= noop,
42	.irq_enable	= noop,
43	.irq_disable	= noop,
44	.irq_ack	= ack_bad,
45	.flags		= IRQCHIP_SKIP_SET_WAKE,
46};
47
48/*
49 * Generic dummy implementation which can be used for
50 * real dumb interrupt sources
51 */
52struct irq_chip dummy_irq_chip = {
53	.name		= "dummy",
54	.irq_startup	= noop_ret,
55	.irq_shutdown	= noop,
56	.irq_enable	= noop,
57	.irq_disable	= noop,
58	.irq_ack	= noop,
59	.irq_mask	= noop,
60	.irq_unmask	= noop,
61	.flags		= IRQCHIP_SKIP_SET_WAKE,
62};
63EXPORT_SYMBOL_GPL(dummy_irq_chip);
v5.4
 1// SPDX-License-Identifier: GPL-2.0
 2/*
 3 * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar
 4 * Copyright (C) 2005-2006, Thomas Gleixner, Russell King
 5 *
 6 * This file contains the dummy interrupt chip implementation
 7 */
 8#include <linux/interrupt.h>
 9#include <linux/irq.h>
10#include <linux/export.h>
11
12#include "internals.h"
13
14/*
15 * What should we do if we get a hw irq event on an illegal vector?
16 * Each architecture has to answer this themself.
17 */
18static void ack_bad(struct irq_data *data)
19{
20	struct irq_desc *desc = irq_data_to_desc(data);
21
22	print_irq_desc(data->irq, desc);
23	ack_bad_irq(data->irq);
24}
25
26/*
27 * NOP functions
28 */
29static void noop(struct irq_data *data) { }
30
31static unsigned int noop_ret(struct irq_data *data)
32{
33	return 0;
34}
35
36/*
37 * Generic no controller implementation
38 */
39struct irq_chip no_irq_chip = {
40	.name		= "none",
41	.irq_startup	= noop_ret,
42	.irq_shutdown	= noop,
43	.irq_enable	= noop,
44	.irq_disable	= noop,
45	.irq_ack	= ack_bad,
46	.flags		= IRQCHIP_SKIP_SET_WAKE,
47};
48
49/*
50 * Generic dummy implementation which can be used for
51 * real dumb interrupt sources
52 */
53struct irq_chip dummy_irq_chip = {
54	.name		= "dummy",
55	.irq_startup	= noop_ret,
56	.irq_shutdown	= noop,
57	.irq_enable	= noop,
58	.irq_disable	= noop,
59	.irq_ack	= noop,
60	.irq_mask	= noop,
61	.irq_unmask	= noop,
62	.flags		= IRQCHIP_SKIP_SET_WAKE,
63};
64EXPORT_SYMBOL_GPL(dummy_irq_chip);