summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-08 06:32:10 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-07-17 09:32:24 +0300
commit82659cc91014df7dfcc55474c1657d1c9b6fe957 (patch)
tree6f265db5df0bbbb26f89bf67f383aa95e555ae93 /include/acpi
parentfea9651084e72fe94aefa0b828854ef5ce2835b4 (diff)
downloadu-boot-82659cc91014df7dfcc55474c1657d1c9b6fe957.tar.xz
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 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,
@@ -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.