summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-07 22:11:45 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-07-17 09:32:24 +0300
commit7fb8da4ce1b22c8f077e6d4fe6e0d88e3fd9206d (patch)
treec55bca9ffb98e573fcc2f775056346d18ed75a7f /include/acpi
parent2912686c08c33aff5269512de962dffb35fbee7c (diff)
downloadu-boot-7fb8da4ce1b22c8f077e6d4fe6e0d88e3fd9206d.tar.xz
acpi: Support string output
Add support for output of strings and streams of bytes. 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>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpigen.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/acpi/acpigen.h b/include/acpi/acpigen.h
index 8809cdb4e1..9c1faf7bf2 100644
--- a/include/acpi/acpigen.h
+++ b/include/acpi/acpigen.h
@@ -46,4 +46,23 @@ void acpigen_emit_word(struct acpi_ctx *ctx, uint data);
*/
void acpigen_emit_dword(struct acpi_ctx *ctx, uint data);
+/**
+ * acpigen_emit_stream() - Emit a stream of bytes
+ *
+ * @ctx: ACPI context pointer
+ * @data: Data to output
+ * @size: Size of data in bytes
+ */
+void acpigen_emit_stream(struct acpi_ctx *ctx, const char *data, int size);
+
+/**
+ * acpigen_emit_string() - Emit a string
+ *
+ * Emit a string with a null terminator
+ *
+ * @ctx: ACPI context pointer
+ * @str: String to output, or NULL for an empty string
+ */
+void acpigen_emit_string(struct acpi_ctx *ctx, const char *str);
+
#endif