blob: 8809cdb4e125db50dbd178ef0e97bdff0c3c5390 [file] [log] [blame]
Simon Glass61cc9332020-07-07 13:11:42 -06001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Core ACPI (Advanced Configuration and Power Interface) support
4 *
5 * Copyright 2019 Google LLC
6 *
7 * Modified from coreboot file acpigen.h
8 */
9
10#ifndef __ACPI_ACPIGEN_H
11#define __ACPI_ACPIGEN_H
12
13#include <linux/types.h>
14
15struct acpi_ctx;
16
17/**
18 * acpigen_get_current() - Get the current ACPI code output pointer
19 *
20 * @ctx: ACPI context pointer
21 * @return output pointer
22 */
23u8 *acpigen_get_current(struct acpi_ctx *ctx);
24
25/**
26 * acpigen_emit_byte() - Emit a byte to the ACPI code
27 *
28 * @ctx: ACPI context pointer
29 * @data: Value to output
30 */
31void acpigen_emit_byte(struct acpi_ctx *ctx, uint data);
32
33/**
34 * acpigen_emit_word() - Emit a 16-bit word to the ACPI code
35 *
36 * @ctx: ACPI context pointer
37 * @data: Value to output
38 */
39void acpigen_emit_word(struct acpi_ctx *ctx, uint data);
40
41/**
42 * acpigen_emit_dword() - Emit a 32-bit 'double word' to the ACPI code
43 *
44 * @ctx: ACPI context pointer
45 * @data: Value to output
46 */
47void acpigen_emit_dword(struct acpi_ctx *ctx, uint data);
48
49#endif