From 82659cc91014df7dfcc55474c1657d1c9b6fe957 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 7 Jul 2020 21:32:10 -0600 Subject: acpi: Support generation of a scope Add a function to write a scope to the generated ACPI code. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng [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 c6644bc..4a60612 100644 --- a/include/acpi/acpigen.h +++ b/include/acpi/acpigen.h @@ -31,6 +31,7 @@ enum { DWORD_PREFIX = 0x0c, STRING_PREFIX = 0x0d, QWORD_PREFIX = 0x0e, + SCOPE_OP = 0x10, BUFFER_OP = 0x11, PACKAGE_OP = 0x12, METHOD_OP = 0x14, @@ -262,6 +263,14 @@ void acpigen_emit_namestring(struct acpi_ctx *ctx, const char *namepath); void acpigen_write_name(struct acpi_ctx *ctx, const char *namepath); /** + * acpigen_write_scope() - Write a scope + * + * @ctx: ACPI context pointer + * @scope: Scope to write (e.g. "\\_SB.ABCD") + */ +void acpigen_write_scope(struct acpi_ctx *ctx, const char *scope); + +/** * acpigen_write_uuid() - Write a UUID * * This writes out a UUID in the format used by ACPI, with a BUFFER_OP prefix. -- cgit v1.1