From fdaa0980772cb05b53e7f544d513e3445f3f1021 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 5 Jun 2017 16:39:25 +0800 Subject: ACPICA: ACPI 6.2: Add support for PinGroup() resource ACPICA commit 7d928e3174fb19d7dc0066b03c30bea07c001563 ACPI 6.2 introduced a new resource that is used to declare set of pins belonging to a GPIO controller. This resource is referenced by new PinGroupFunction() and PinGroupConfig() resources using ResourceSource and ResourceLabel fields. The PinGroup() resource looks like this: PinGroup (ResourceLabel, ResourceUsage, DescriptorName, VendorData) {Pin List} This resource should be listed in _CRS under the GPIO/pincontroller device providing these pins. Link: https://github.com/acpica/acpica/commit/7d928e31 Signed-off-by: Mika Westerberg Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acrestyp.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 2b41ed163730..d29841bfc462 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -289,6 +289,11 @@ union acpi_resource_attribute { u8 type_specific; }; +struct acpi_resource_label { + u16 string_length; + char *string_ptr; +}; + struct acpi_resource_source { u8 index; u16 string_length; @@ -576,6 +581,16 @@ struct acpi_resource_pin_config { #define ACPI_PIN_CONFIG_INPUT_DEBOUNCE 12 #define ACPI_PIN_CONFIG_INPUT_SCHMITT_TRIGGER 13 +struct acpi_resource_pin_group { + u8 revision_id; + u8 producer_consumer; /* For values, see Producer/Consumer above */ + u16 pin_table_length; + u16 vendor_length; + u16 *pin_table; + struct acpi_resource_label resource_label; + u8 *vendor_data; +}; + /* ACPI_RESOURCE_TYPEs */ #define ACPI_RESOURCE_TYPE_IRQ 0 @@ -600,7 +615,8 @@ struct acpi_resource_pin_config { #define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */ #define ACPI_RESOURCE_TYPE_PIN_FUNCTION 20 /* ACPI 6.2 */ #define ACPI_RESOURCE_TYPE_PIN_CONFIG 21 /* ACPI 6.2 */ -#define ACPI_RESOURCE_TYPE_MAX 21 +#define ACPI_RESOURCE_TYPE_PIN_GROUP 22 /* ACPI 6.2 */ +#define ACPI_RESOURCE_TYPE_MAX 22 /* Master union for resource descriptors */ @@ -630,6 +646,7 @@ union acpi_resource_data { struct acpi_resource_common_serialbus common_serial_bus; struct acpi_resource_pin_function pin_function; struct acpi_resource_pin_config pin_config; + struct acpi_resource_pin_group pin_group; /* Common fields */ -- cgit v1.2.3