From 91c2f9c32ed76269b9786a6c506233e9b91bdfce Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 7 Jul 2020 21:32:14 -0600 Subject: acpi: Support generation of a device Allow writing an ACPI device to the generated ACPI code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner [bmeng: Fix build failures on Sandbox] Signed-off-by: Bin Meng --- include/acpi/acpigen.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/acpigen.h b/include/acpi/acpigen.h index 1f37c9c31cd..59d7c2ff6f3 100644 --- a/include/acpi/acpigen.h +++ b/include/acpi/acpigen.h @@ -56,6 +56,7 @@ enum { AND_OP = 0x7b, OR_OP = 0x7d, NOT_OP = 0x80, + DEVICE_OP = 0x82, POWER_RES_OP = 0x84, RETURN_OP = 0xa4, }; @@ -313,6 +314,14 @@ void acpigen_write_method(struct acpi_ctx *ctx, const char *name, int nargs); void acpigen_write_method_serialized(struct acpi_ctx *ctx, const char *name, int nargs); +/** + * acpigen_write_device() - Write an ACPI device + * + * @ctx: ACPI context pointer + * @name: Device name to write + */ +void acpigen_write_device(struct acpi_ctx *ctx, const char *name); + /** * acpigen_write_sta() - Write a _STA method * -- cgit v1.2.3