acpi: Support writing named values

Allow writing named integers and strings to the generated ACPI code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
[bmeng: Fix the "new blank line at EOF" warning]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2020-07-07 21:32:15 -06:00
committed by Bin Meng
parent 91c2f9c32e
commit bb6772c3ff
3 changed files with 198 additions and 0 deletions

View File

@@ -234,6 +234,78 @@ void acpigen_write_one(struct acpi_ctx *ctx);
*/
void acpigen_write_integer(struct acpi_ctx *ctx, u64 data);
/**
* acpigen_write_name_zero() - Write a named zero value
*
* @ctx: ACPI context pointer
* @name: Name of the value
*/
void acpigen_write_name_zero(struct acpi_ctx *ctx, const char *name);
/**
* acpigen_write_name_one() - Write a named one value
*
* @ctx: ACPI context pointer
* @name: Name of the value
*/
void acpigen_write_name_one(struct acpi_ctx *ctx, const char *name);
/**
* acpigen_write_name_byte() - Write a named byte value
*
* @ctx: ACPI context pointer
* @name: Name of the value
* @val: Value to write
*/
void acpigen_write_name_byte(struct acpi_ctx *ctx, const char *name, uint val);
/**
* acpigen_write_name_word() - Write a named word value
*
* @ctx: ACPI context pointer
* @name: Name of the value
* @val: Value to write
*/
void acpigen_write_name_word(struct acpi_ctx *ctx, const char *name, uint val);
/**
* acpigen_write_name_dword() - Write a named dword value
*
* @ctx: ACPI context pointer
* @name: Name of the value
* @val: Value to write
*/
void acpigen_write_name_dword(struct acpi_ctx *ctx, const char *name, uint val);
/**
* acpigen_write_name_qword() - Write a named qword value
*
* @ctx: ACPI context pointer
* @name: Name of the value
* @val: Value to write
*/
void acpigen_write_name_qword(struct acpi_ctx *ctx, const char *name, u64 val);
/**
* acpigen_write_name_integer() - Write a named integer value
*
* @ctx: ACPI context pointer
* @name: Name of the value
* @val: Value to write
*/
void acpigen_write_name_integer(struct acpi_ctx *ctx, const char *name,
u64 val);
/**
* acpigen_write_name_string() - Write a named string value
*
* @ctx: ACPI context pointer
* @name: Name of the value
* @string: String to write
*/
void acpigen_write_name_string(struct acpi_ctx *ctx, const char *name,
const char *string);
/**
* acpigen_write_string() - Write a string
*