]> Git Repo - J-u-boot.git/blame - test/dm/acpi.h
Merge tag 'u-boot-imx-20221024' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[J-u-boot.git] / test / dm / acpi.h
CommitLineData
0e5a0a00
SG
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Common functions for ACPI tests
4 *
5 * Copyright 2020 Google LLC
6 * Written by Simon Glass <[email protected]>
7 */
8
9#ifndef __TEST_DM_ACPI_H
10#define __TEST_DM_ACPI_H
11
82659cc9
SG
12#define ACPI_TEST_DEV_NAME "ABCD"
13#define ACPI_TEST_CHILD_NAME "EFGH"
14
0e5a0a00
SG
15/**
16 * acpi_test_alloc_context_size() - Allocate an ACPI context of a given size
17 *
18 * @ctxp: Returns allocated context
19 * @size: Size to allocate in bytes
185f812c 20 * Return: 0 if OK, -ENOMEM if out of memory
0e5a0a00
SG
21 */
22int acpi_test_alloc_context_size(struct acpi_ctx **ctxp, int size);
23
24/**
25 * acpi_test_get_length() - decode a three-byte length field
26 *
27 * @ptr: Length encoded as per ACPI
185f812c 28 * Return: decoded length, or -EINVAL on error
0e5a0a00
SG
29 */
30int acpi_test_get_length(u8 *ptr);
31
32#endif /*__TEST_DM_ACPI_H */
This page took 0.091155 seconds and 4 git commands to generate.