diff options
author | Agustin Vega-Frias <agustinv@codeaurora.org> | 2017-02-02 18:23:58 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-02-03 10:03:48 -0500 |
commit | d44fa3d46079dc095c1346fa6e5bc96dca1ead41 (patch) | |
tree | 6c2880d745b366a4a024e3048e6727873a43b773 /include/linux/acpi.h | |
parent | fa20b176f609c813d2c677f54c814cbb7ea5f1d1 (diff) |
ACPI: Add support for ResourceSource/IRQ domain mapping
ACPI extended IRQ resources may contain a ResourceSource to specify
an alternate interrupt controller. Introduce acpi_irq_get and use it
to implement ResourceSource/IRQ domain mapping.
The new API is similar to of_irq_get and allows re-initialization
of a platform resource from the ACPI extended IRQ resource, and
provides proper behavior for probe deferral when the domain is not
yet present when called.
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Tested-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Agustin Vega-Frias <agustinv@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 5b36974ed60a..8e577c2cb0ce 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -1153,4 +1153,14 @@ int parse_spcr(bool earlycon); | |||
1153 | static inline int parse_spcr(bool earlycon) { return 0; } | 1153 | static inline int parse_spcr(bool earlycon) { return 0; } |
1154 | #endif | 1154 | #endif |
1155 | 1155 | ||
1156 | #if IS_ENABLED(CONFIG_ACPI_GENERIC_GSI) | ||
1157 | int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res); | ||
1158 | #else | ||
1159 | static inline | ||
1160 | int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res) | ||
1161 | { | ||
1162 | return -EINVAL; | ||
1163 | } | ||
1164 | #endif | ||
1165 | |||
1156 | #endif /*_LINUX_ACPI_H*/ | 1166 | #endif /*_LINUX_ACPI_H*/ |