From 7fb8da4ce1b22c8f077e6d4fe6e0d88e3fd9206d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 7 Jul 2020 13:11:45 -0600 Subject: acpi: Support string output Add support for output of strings and streams of bytes. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- include/acpi/acpigen.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/acpi') 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 -- cgit