acpi: Support generation of a device
Allow writing an ACPI device 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 build failures on Sandbox] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -291,6 +291,13 @@ void acpigen_write_method_serialized(struct acpi_ctx *ctx, const char *name,
|
||||
ACPI_METHOD_SERIALIZED_MASK);
|
||||
}
|
||||
|
||||
void acpigen_write_device(struct acpi_ctx *ctx, const char *name)
|
||||
{
|
||||
acpigen_emit_ext_op(ctx, DEVICE_OP);
|
||||
acpigen_write_len_f(ctx);
|
||||
acpigen_emit_namestring(ctx, name);
|
||||
}
|
||||
|
||||
void acpigen_write_sta(struct acpi_ctx *ctx, uint status)
|
||||
{
|
||||
/* Method (_STA, 0, NotSerialized) { Return (status) } */
|
||||
|
||||
Reference in New Issue
Block a user