From f8a6c86644f6e07af0ac4e89adb4db29a640e40f Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 5 Jun 2017 16:39:31 +0800 Subject: ACPICA: ACPI 6.2: Add support for PinGroupFunction() resource ACPICA commit bd9a745749eac7137cd23085e6bdeb322de14ea2 PinGroupFunction() is a new resource introduced with ACPI 6.2. It is used with PinGroup() to configure specific mode for a set of pins exposed by a GPIO controller. The format of the resource is: PinGroupFunction (Shared/Exclusive, FunctionNumber, ResourceSource, ResourceSourceIndex, ResourceSourceLabel, ResourceUsage, DescriptorName, VendorData) The resource_source and ResourceSourceLabel fields are used to specify the PinGroup() resource referenced by PinGroupFunction(). Device (GPIO) { Name (_CRS, ResourceTemplate () { PinGroup ("group1") {2, 3} PinGroup ("group2") {4, 5} ... }) } Device (I2C) { Name (_CRS, ResourceTemplate () { PinGroupFunction (Exclusive, 6, "^GPIO", 0, "mygroup2") }) } In the above example the PinGroupFunction() references the second PinGroup() resource (using label "mygroup2" and configures pins 4 and 5 into mode 6. Link: https://github.com/acpica/acpica/commit/bd9a7457 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 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include/acpi/acrestyp.h') diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index d29841bfc462..b4b9e5721b14 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -591,6 +591,17 @@ struct acpi_resource_pin_group { u8 *vendor_data; }; +struct acpi_resource_pin_group_function { + u8 revision_id; + u8 producer_consumer; /* For values, see Producer/Consumer above */ + u8 sharable; /* For values, see Interrupt Attributes above */ + u16 function_number; + u16 vendor_length; + struct acpi_resource_source resource_source; + struct acpi_resource_label resource_source_label; + u8 *vendor_data; +}; + /* ACPI_RESOURCE_TYPEs */ #define ACPI_RESOURCE_TYPE_IRQ 0 @@ -616,7 +627,8 @@ struct acpi_resource_pin_group { #define ACPI_RESOURCE_TYPE_PIN_FUNCTION 20 /* ACPI 6.2 */ #define ACPI_RESOURCE_TYPE_PIN_CONFIG 21 /* ACPI 6.2 */ #define ACPI_RESOURCE_TYPE_PIN_GROUP 22 /* ACPI 6.2 */ -#define ACPI_RESOURCE_TYPE_MAX 22 +#define ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION 23 /* ACPI 6.2 */ +#define ACPI_RESOURCE_TYPE_MAX 23 /* Master union for resource descriptors */ @@ -647,6 +659,7 @@ union acpi_resource_data { struct acpi_resource_pin_function pin_function; struct acpi_resource_pin_config pin_config; struct acpi_resource_pin_group pin_group; + struct acpi_resource_pin_group_function pin_group_function; /* Common fields */ -- cgit v1.2.1