Commit | Line | Data |
---|---|---|
f6e916b8 TP |
1 | /* |
2 | * Copyright (C) 2012 Thomas Petazzoni | |
3 | * | |
4 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | |
5 | * | |
6 | * This file is licensed under the terms of the GNU General Public | |
7 | * License version 2. This program is licensed "as is" without any | |
8 | * warranty of any kind, whether express or implied. | |
9 | */ | |
10 | ||
11 | #ifndef _LINUX_IRQCHIP_H | |
12 | #define _LINUX_IRQCHIP_H | |
13 | ||
46e589a3 | 14 | #include <linux/acpi.h> |
91e20b50 JP |
15 | #include <linux/of.h> |
16 | ||
17 | /* | |
18 | * This macro must be used by the different irqchip drivers to declare | |
19 | * the association between their DT compatible string and their | |
20 | * initialization function. | |
21 | * | |
22 | * @name: name that must be unique accross all IRQCHIP_DECLARE of the | |
23 | * same file. | |
24 | * @compstr: compatible string of the irqchip driver | |
25 | * @fn: initialization function | |
26 | */ | |
27 | #define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn) | |
28 | ||
46e589a3 MZ |
29 | /* |
30 | * This macro must be used by the different irqchip drivers to declare | |
31 | * the association between their version and their initialization function. | |
32 | * | |
33 | * @name: name that must be unique accross all IRQCHIP_ACPI_DECLARE of the | |
34 | * same file. | |
35 | * @subtable: Subtable to be identified in MADT | |
36 | * @validate: Function to be called on that subtable to check its validity. | |
37 | * Can be NULL. | |
38 | * @data: data to be checked by the validate function. | |
39 | * @fn: initialization function | |
40 | */ | |
41 | #define IRQCHIP_ACPI_DECLARE(name, subtable, validate, data, fn) \ | |
42 | ACPI_DECLARE_PROBE_ENTRY(irqchip, name, ACPI_SIG_MADT, \ | |
43 | subtable, validate, data, fn) | |
44 | ||
0d7c1210 | 45 | #ifdef CONFIG_IRQCHIP |
f6e916b8 | 46 | void irqchip_init(void); |
0d7c1210 BH |
47 | #else |
48 | static inline void irqchip_init(void) {} | |
49 | #endif | |
f6e916b8 TP |
50 | |
51 | #endif |