#define ACPI_RESOURCE_NAME_ADDRESS64            0x8A
 #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64   0x8B
 #define ACPI_RESOURCE_NAME_GPIO                 0x8C
+#define ACPI_RESOURCE_NAME_PIN_FUNCTION         0x8D
 #define ACPI_RESOURCE_NAME_SERIAL_BUS           0x8E
 #define ACPI_RESOURCE_NAME_LARGE_MAX            0x8E
 
 
 extern struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[];
 extern struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[];
 extern struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[];
+extern struct acpi_rsconvert_info acpi_rs_convert_pin_function[];
 
 /* These resources require separate get/set tables */
 
 extern struct acpi_rsdump_info acpi_rs_dump_ext_irq[];
 extern struct acpi_rsdump_info acpi_rs_dump_generic_reg[];
 extern struct acpi_rsdump_info acpi_rs_dump_gpio[];
+extern struct acpi_rsdump_info acpi_rs_dump_pin_function[];
 extern struct acpi_rsdump_info acpi_rs_dump_fixed_dma[];
 extern struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[];
 extern struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[];
 
 #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) */
 #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()
        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 */
 
 
 
                        break;
 
+               case ACPI_RESOURCE_TYPE_PIN_FUNCTION:
+
+                       total_size = (acpi_rs_length)(total_size +
+                                                     (resource->data.
+                                                      pin_function.
+                                                      pin_table_length * 2) +
+                                                     resource->data.
+                                                     pin_function.
+                                                     resource_source.
+                                                     string_length +
+                                                     resource->data.
+                                                     pin_function.
+                                                     vendor_length);
+
+                       break;
+
                case ACPI_RESOURCE_TYPE_SERIAL_BUS:
 
                        total_size =
                        }
                        break;
 
+               case ACPI_RESOURCE_NAME_PIN_FUNCTION:
+
+                       /* Vendor data is optional */
+
+                       if (aml_resource->pin_function.vendor_length) {
+                               extra_struct_bytes +=
+                                   aml_resource->pin_function.vendor_offset -
+                                   aml_resource->pin_function.
+                                   pin_table_offset +
+                                   aml_resource->pin_function.vendor_length;
+                       } else {
+                               extra_struct_bytes +=
+                                   aml_resource->large_header.resource_length +
+                                   sizeof(struct aml_resource_large_header) -
+                                   aml_resource->pin_function.pin_table_offset;
+                       }
+                       break;
+
                case ACPI_RESOURCE_NAME_SERIAL_BUS:
 
                        minimum_aml_resource_length =
 
         NULL},
 };
 
+struct acpi_rsdump_info acpi_rs_dump_pin_function[10] = {
+       {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_function),
+        "PinFunction", NULL},
+       {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_function.revision_id),
+        "RevisionId", NULL},
+       {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_function.pin_config), "PinConfig",
+        acpi_gbl_ppc_decode},
+       {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_function.sharable), "Sharing",
+        acpi_gbl_shr_decode},
+       {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_function.function_number),
+        "FunctionNumber", NULL},
+       {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(pin_function.resource_source),
+        "ResourceSource", NULL},
+       {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_function.pin_table_length),
+        "PinTableLength", NULL},
+       {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(pin_function.pin_table), "PinTable",
+        NULL},
+       {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_function.vendor_length),
+        "VendorLength", NULL},
+       {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(pin_function.vendor_data),
+        "VendorData", NULL},
+};
+
 struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = {
        {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma),
         "FixedDma", NULL},
 
        acpi_rs_convert_gpio,   /* 0x11, ACPI_RESOURCE_TYPE_GPIO */
        acpi_rs_convert_fixed_dma,      /* 0x12, ACPI_RESOURCE_TYPE_FIXED_DMA */
        NULL,                   /* 0x13, ACPI_RESOURCE_TYPE_SERIAL_BUS - Use subtype table below */
+       acpi_rs_convert_pin_function,   /* 0x14, ACPI_RESOURCE_TYPE_PIN_FUNCTION */
 };
 
 /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */
        acpi_rs_convert_address64,      /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */
        acpi_rs_convert_ext_address64,  /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */
        acpi_rs_convert_gpio,   /* 0x0C, ACPI_RESOURCE_NAME_GPIO */
-       NULL,                   /* 0x0D, Reserved */
+       acpi_rs_convert_pin_function,   /* 0x0D, ACPI_RESOURCE_NAME_PIN_FUNCTION */
        NULL,                   /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use subtype table below */
 };
 
        acpi_rs_dump_gpio,      /* ACPI_RESOURCE_TYPE_GPIO */
        acpi_rs_dump_fixed_dma, /* ACPI_RESOURCE_TYPE_FIXED_DMA */
        NULL,                   /* ACPI_RESOURCE_TYPE_SERIAL_BUS */
+       acpi_rs_dump_pin_function,      /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */
 };
 
 struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = {
        sizeof(struct aml_resource_gpio),       /* ACPI_RESOURCE_TYPE_GPIO */
        sizeof(struct aml_resource_fixed_dma),  /* ACPI_RESOURCE_TYPE_FIXED_DMA */
        sizeof(struct aml_resource_common_serialbus),   /* ACPI_RESOURCE_TYPE_SERIAL_BUS */
+       sizeof(struct aml_resource_pin_function),       /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */
 };
 
 const u8 acpi_gbl_resource_struct_sizes[] = {
        ACPI_RS_SIZE(struct acpi_resource_address64),
        ACPI_RS_SIZE(struct acpi_resource_extended_address64),
        ACPI_RS_SIZE(struct acpi_resource_gpio),
+       ACPI_RS_SIZE(struct acpi_resource_pin_function),
        ACPI_RS_SIZE(struct acpi_resource_common_serialbus)
 };
 
 
         0},
 };
 
+/*******************************************************************************
+ *
+ * acpi_rs_convert_pinfunction
+ *
+ ******************************************************************************/
+
+struct acpi_rsconvert_info acpi_rs_convert_pin_function[13] = {
+       {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_PIN_FUNCTION,
+        ACPI_RS_SIZE(struct acpi_resource_pin_function),
+        ACPI_RSC_TABLE_SIZE(acpi_rs_convert_pin_function)},
+
+       {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_PIN_FUNCTION,
+        sizeof(struct aml_resource_pin_function),
+        0},
+
+       {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.pin_function.revision_id),
+        AML_OFFSET(pin_function.revision_id),
+        1},
+
+       {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_function.sharable),
+        AML_OFFSET(pin_function.flags),
+        0},
+
+       {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.pin_function.pin_config),
+        AML_OFFSET(pin_function.pin_config),
+        1},
+
+       {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.pin_function.function_number),
+        AML_OFFSET(pin_function.function_number),
+        2},
+
+       /* Pin Table */
+
+       /*
+        * It is OK to use GPIO operations here because none of them refer GPIO
+        * structures directly but instead use offsets given here.
+        */
+
+       {ACPI_RSC_COUNT_GPIO_PIN,
+        ACPI_RS_OFFSET(data.pin_function.pin_table_length),
+        AML_OFFSET(pin_function.pin_table_offset),
+        AML_OFFSET(pin_function.res_source_offset)},
+
+       {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET(data.pin_function.pin_table),
+        AML_OFFSET(pin_function.pin_table_offset),
+        0},
+
+       /* Resource Source */
+
+       {ACPI_RSC_MOVE8,
+        ACPI_RS_OFFSET(data.pin_function.resource_source.index),
+        AML_OFFSET(pin_function.res_source_index),
+        1},
+
+       {ACPI_RSC_COUNT_GPIO_RES,
+        ACPI_RS_OFFSET(data.pin_function.resource_source.string_length),
+        AML_OFFSET(pin_function.res_source_offset),
+        AML_OFFSET(pin_function.vendor_offset)},
+
+       {ACPI_RSC_MOVE_GPIO_RES,
+        ACPI_RS_OFFSET(data.pin_function.resource_source.string_ptr),
+        AML_OFFSET(pin_function.res_source_offset),
+        0},
+
+       /* Vendor Data */
+
+       {ACPI_RSC_COUNT_GPIO_VEN,
+        ACPI_RS_OFFSET(data.pin_function.vendor_length),
+        AML_OFFSET(pin_function.vendor_length),
+        1},
+
+       {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET(data.pin_function.vendor_data),
+        AML_OFFSET(pin_function.vendor_offset),
+        0},
+};
+
 /*******************************************************************************
  *
  * acpi_rs_convert_i2c_serial_bus
 
        ACPI_AML_SIZE_LARGE(struct aml_resource_address64),
        ACPI_AML_SIZE_LARGE(struct aml_resource_extended_address64),
        ACPI_AML_SIZE_LARGE(struct aml_resource_gpio),
-       0,
+       ACPI_AML_SIZE_LARGE(struct aml_resource_pin_function),
        ACPI_AML_SIZE_LARGE(struct aml_resource_common_serialbus),
 };
 
        ACPI_VARIABLE_LENGTH,   /* 0A Qword* address */
        ACPI_FIXED_LENGTH,      /* 0B Extended* address */
        ACPI_VARIABLE_LENGTH,   /* 0C Gpio* */
-       0,
+       ACPI_VARIABLE_LENGTH,   /* 0D pin_function */
        ACPI_VARIABLE_LENGTH    /* 0E *serial_bus */
 };
 
 
 #define ACPI_UART_CLEAR_TO_SEND                 (1<<6)
 #define ACPI_UART_REQUEST_TO_SEND               (1<<7)
 
+struct acpi_resource_pin_function {
+       u8 revision_id;
+       u8 pin_config;
+       u8 sharable;            /* For values, see Interrupt Attributes above */
+       u16 function_number;
+       u16 pin_table_length;
+       u16 vendor_length;
+       struct acpi_resource_source resource_source;
+       u16 *pin_table;
+       u8 *vendor_data;
+};
+
 /* ACPI_RESOURCE_TYPEs */
 
 #define ACPI_RESOURCE_TYPE_IRQ                  0
 #define ACPI_RESOURCE_TYPE_GPIO                 17     /* ACPI 5.0 */
 #define ACPI_RESOURCE_TYPE_FIXED_DMA            18     /* ACPI 5.0 */
 #define ACPI_RESOURCE_TYPE_SERIAL_BUS           19     /* ACPI 5.0 */
-#define ACPI_RESOURCE_TYPE_MAX                  19
+#define ACPI_RESOURCE_TYPE_PIN_FUNCTION         20     /* ACPI 6.2 */
+#define ACPI_RESOURCE_TYPE_MAX                  20
 
 /* Master union for resource descriptors */
 
        struct acpi_resource_spi_serialbus spi_serial_bus;
        struct acpi_resource_uart_serialbus uart_serial_bus;
        struct acpi_resource_common_serialbus common_serial_bus;
+       struct acpi_resource_pin_function pin_function;
 
        /* Common fields */