From 2b72693066a867ac073a657e871bb64391b4ffdb Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 5 Jun 2017 16:39:14 +0800 Subject: ACPICA: ACPI 6.2: Add support for PinFunction() resource ACPICA commit 6bbc6357f7061f1243601adde0ea45f7a89274e0 ACPI 6.2 introduced a new resource that is used to describe how certain pins are muxed for a device. The ASL syntax of this new resource looks like below: PinFunction(Shared, PinConfig, FunctionNumber, ResourceSource, ResourceSourceIndex, ResourceUsage, DescriptorName, VendorData) {Pin List} Which is pretty similar to GpioIo()/GpioInt() resources. Teach ACPICA about this new resource. Link: https://github.com/acpica/acpica/commit/6bbc6357 Signed-off-by: Mika Westerberg Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/amlresrc.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'drivers/acpi/acpica/amlresrc.h') diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h index 653a3d1ef5d5..e34396cab75d 100644 --- a/drivers/acpi/acpica/amlresrc.h +++ b/drivers/acpi/acpica/amlresrc.h @@ -65,6 +65,7 @@ #define ACPI_RESTAG_DRIVESTRENGTH "_DRS" #define ACPI_RESTAG_ENDIANNESS "_END" #define ACPI_RESTAG_FLOWCONTROL "_FLC" +#define ACPI_RESTAG_FUNCTION "_FUN" #define ACPI_RESTAG_GRANULARITY "_GRA" #define ACPI_RESTAG_INTERRUPT "_INT" #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ @@ -404,6 +405,26 @@ struct aml_resource_uart_serialbus { #define AML_RESOURCE_UART_TYPE_REVISION 1 /* ACPI 5.0 */ #define AML_RESOURCE_UART_MIN_DATA_LEN 10 +struct aml_resource_pin_function { + AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id; + u16 flags; + u8 pin_config; + u16 function_number; + u16 pin_table_offset; + u8 res_source_index; + u16 res_source_offset; + u16 vendor_offset; + u16 vendor_length; + /* + * Optional fields follow immediately: + * 1) PIN list (Words) + * 2) Resource Source String + * 3) Vendor Data bytes + */ +}; + +#define AML_RESOURCE_PIN_FUNCTION_REVISION 1 /* ACPI 6.2 */ + /* restore default alignment */ #pragma pack() @@ -446,6 +467,7 @@ union aml_resource { struct aml_resource_spi_serialbus spi_serial_bus; struct aml_resource_uart_serialbus uart_serial_bus; struct aml_resource_common_serialbus common_serial_bus; + struct aml_resource_pin_function pin_function; /* Utility overlays */ -- cgit v1.2.3