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') diff --git a/include/acpi/acpigen.h b/include/acpi/acpigen.h index c6644bc2b2..4a606125de 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, @@ -261,6 +262,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 * -- cgit