summaryrefslogtreecommitdiffstats
path: root/src/drivers/generic/generic/chip.h
blob: 34cd47540b5ae9f804a6113489d1b80cb4499887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef __GENERIC_GENERIC_CHIP_H__
#define __GENERIC_GENERIC_CHIP_H__

#if CONFIG(HAVE_ACPI_TABLES)

#include <acpi/acpi_device.h>

#define MAX_GENERIC_PROPERTY_LIST 10

struct drivers_generic_generic_config {
	const char *hid;	/* ACPI _HID (required) */
	const char *cid;	/* ACPI _CID */
	const char *name;	/* ACPI Device Name */
	/*
	 * Autogenerated ACPI Device Name if name is not provided in
	 * devicetree.
	 */
	char autogen_name[5];
	const char *desc;	/* ACPI _DDN */
	unsigned int uid;	/* ACPI _UID */

	/* Generic properties for exporting device-specific data to the OS */
	struct acpi_dp property_list[MAX_GENERIC_PROPERTY_LIST];
	int property_count;
};

#else /* CONFIG_HAVE_ACPI_TABLES */

struct drivers_generic_generic_config { };

#endif /* !CONFIG_HAVE_ACPI_TABLES */

#endif /* __GENERIC_GENERIC_CHIP_H__ */