diff options
author | Simon Glass | 2020-07-07 13:11:43 -0600 |
---|---|---|
committer | Bin Meng | 2020-07-17 14:32:24 +0800 |
commit | ff715c6f4f7a3181fcc6a45907bb8bf0c8c6f08f (patch) | |
tree | fc8fa40ad52e564861ff98e40b38c71b2651347e /include/acpi | |
parent | 61cc93396a54c1c3fcace092c83def70f3843c2a (diff) |
acpi: Support generation of interrupt descriptor
Add a function to write an interrupt descriptor to the generated ACPI
code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_device.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/acpi/acpi_device.h b/include/acpi/acpi_device.h index 24895de0dad..e72fede54ce 100644 --- a/include/acpi/acpi_device.h +++ b/include/acpi/acpi_device.h @@ -11,6 +11,8 @@ #include <linux/bitops.h> +struct acpi_ctx; +struct irq; struct udevice; /* ACPI descriptor values for common descriptors: SERIAL_BUS means I2C */ @@ -128,4 +130,17 @@ int acpi_device_scope(const struct udevice *dev, char *scope, int maxlen); */ enum acpi_dev_status acpi_device_status(const struct udevice *dev); +/** + * acpi_device_write_interrupt_irq() - Write an interrupt descriptor + * + * This writes an ACPI interrupt descriptor for the given interrupt, converting + * fields as needed. + * + * @ctx: ACPI context pointer + * @req_irq: Interrupt to output + * @return IRQ pin number if OK, -ve on error + */ +int acpi_device_write_interrupt_irq(struct acpi_ctx *ctx, + const struct irq *req_irq); + #endif |