aboutsummaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorSimon Glass2020-07-07 21:32:10 -0600
committerBin Meng2020-07-17 14:32:24 +0800
commit82659cc91014df7dfcc55474c1657d1c9b6fe957 (patch)
tree6f265db5df0bbbb26f89bf67f383aa95e555ae93 /include/acpi
parentfea9651084e72fe94aefa0b828854ef5ce2835b4 (diff)
acpi: Support generation of a scope
Add a function to write a scope 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> [bmeng: Fix build failures on Sandbox] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpigen.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/acpi/acpigen.h b/include/acpi/acpigen.h
index c6644bc2b23..4a606125de0 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.