diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2017-06-05 04:39:31 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-12 08:58:39 -0400 |
commit | f8a6c86644f6e07af0ac4e89adb4db29a640e40f (patch) | |
tree | c43902099c3676e5132f16e2f57ebcd79c98d069 | |
parent | fdaa0980772cb05b53e7f544d513e3445f3f1021 (diff) |
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 <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/aclocal.h | 3 | ||||
-rw-r--r-- | drivers/acpi/acpica/acresrc.h | 3 | ||||
-rw-r--r-- | drivers/acpi/acpica/amlresrc.h | 20 | ||||
-rw-r--r-- | drivers/acpi/acpica/rscalc.c | 26 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsdump.c | 10 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsdumpinfo.c | 23 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsinfo.c | 5 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsserial.c | 77 | ||||
-rw-r--r-- | drivers/acpi/acpica/utresrc.c | 2 | ||||
-rw-r--r-- | include/acpi/acrestyp.h | 15 |
10 files changed, 182 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index 01b961c6b3f1..75fd75c373a1 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h | |||
@@ -1146,7 +1146,8 @@ struct acpi_port_info { | |||
1146 | #define ACPI_RESOURCE_NAME_SERIAL_BUS 0x8E | 1146 | #define ACPI_RESOURCE_NAME_SERIAL_BUS 0x8E |
1147 | #define ACPI_RESOURCE_NAME_PIN_CONFIG 0x8F | 1147 | #define ACPI_RESOURCE_NAME_PIN_CONFIG 0x8F |
1148 | #define ACPI_RESOURCE_NAME_PIN_GROUP 0x90 | 1148 | #define ACPI_RESOURCE_NAME_PIN_GROUP 0x90 |
1149 | #define ACPI_RESOURCE_NAME_LARGE_MAX 0x90 | 1149 | #define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION 0x91 |
1150 | #define ACPI_RESOURCE_NAME_LARGE_MAX 0x91 | ||
1150 | 1151 | ||
1151 | /***************************************************************************** | 1152 | /***************************************************************************** |
1152 | * | 1153 | * |
diff --git a/drivers/acpi/acpica/acresrc.h b/drivers/acpi/acpica/acresrc.h index 63f2ab411682..4b28939da311 100644 --- a/drivers/acpi/acpica/acresrc.h +++ b/drivers/acpi/acpica/acresrc.h | |||
@@ -150,6 +150,7 @@ typedef enum { | |||
150 | ACPI_RSD_UINT64, | 150 | ACPI_RSD_UINT64, |
151 | ACPI_RSD_WORDLIST, | 151 | ACPI_RSD_WORDLIST, |
152 | ACPI_RSD_LABEL, | 152 | ACPI_RSD_LABEL, |
153 | ACPI_RSD_SOURCE_LABEL, | ||
153 | 154 | ||
154 | } ACPI_RSDUMP_OPCODES; | 155 | } ACPI_RSDUMP_OPCODES; |
155 | 156 | ||
@@ -334,6 +335,7 @@ extern struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[]; | |||
334 | extern struct acpi_rsconvert_info acpi_rs_convert_pin_function[]; | 335 | extern struct acpi_rsconvert_info acpi_rs_convert_pin_function[]; |
335 | extern struct acpi_rsconvert_info acpi_rs_convert_pin_config[]; | 336 | extern struct acpi_rsconvert_info acpi_rs_convert_pin_config[]; |
336 | extern struct acpi_rsconvert_info acpi_rs_convert_pin_group[]; | 337 | extern struct acpi_rsconvert_info acpi_rs_convert_pin_group[]; |
338 | extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_function[]; | ||
337 | 339 | ||
338 | /* These resources require separate get/set tables */ | 340 | /* These resources require separate get/set tables */ |
339 | 341 | ||
@@ -386,6 +388,7 @@ extern struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[]; | |||
386 | extern struct acpi_rsdump_info acpi_rs_dump_general_flags[]; | 388 | extern struct acpi_rsdump_info acpi_rs_dump_general_flags[]; |
387 | extern struct acpi_rsdump_info acpi_rs_dump_pin_config[]; | 389 | extern struct acpi_rsdump_info acpi_rs_dump_pin_config[]; |
388 | extern struct acpi_rsdump_info acpi_rs_dump_pin_group[]; | 390 | extern struct acpi_rsdump_info acpi_rs_dump_pin_group[]; |
391 | extern struct acpi_rsdump_info acpi_rs_dump_pin_group_function[]; | ||
389 | #endif | 392 | #endif |
390 | 393 | ||
391 | #endif /* __ACRESRC_H__ */ | 394 | #endif /* __ACRESRC_H__ */ |
diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h index 510c20d48192..de44df73378f 100644 --- a/drivers/acpi/acpica/amlresrc.h +++ b/drivers/acpi/acpica/amlresrc.h | |||
@@ -464,6 +464,25 @@ struct aml_resource_pin_group { | |||
464 | 464 | ||
465 | #define AML_RESOURCE_PIN_GROUP_REVISION 1 /* ACPI 6.2 */ | 465 | #define AML_RESOURCE_PIN_GROUP_REVISION 1 /* ACPI 6.2 */ |
466 | 466 | ||
467 | struct aml_resource_pin_group_function { | ||
468 | AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id; | ||
469 | u16 flags; | ||
470 | u16 function_number; | ||
471 | u8 res_source_index; | ||
472 | u16 res_source_offset; | ||
473 | u16 res_source_label_offset; | ||
474 | u16 vendor_offset; | ||
475 | u16 vendor_length; | ||
476 | /* | ||
477 | * Optional fields follow immediately: | ||
478 | * 1) Resource Source String | ||
479 | * 2) Resource Source Label String | ||
480 | * 3) Vendor Data bytes | ||
481 | */ | ||
482 | }; | ||
483 | |||
484 | #define AML_RESOURCE_PIN_GROUP_FUNCTION_REVISION 1 /* ACPI 6.2 */ | ||
485 | |||
467 | /* restore default alignment */ | 486 | /* restore default alignment */ |
468 | 487 | ||
469 | #pragma pack() | 488 | #pragma pack() |
@@ -509,6 +528,7 @@ union aml_resource { | |||
509 | struct aml_resource_pin_function pin_function; | 528 | struct aml_resource_pin_function pin_function; |
510 | struct aml_resource_pin_config pin_config; | 529 | struct aml_resource_pin_config pin_config; |
511 | struct aml_resource_pin_group pin_group; | 530 | struct aml_resource_pin_group pin_group; |
531 | struct aml_resource_pin_group_function pin_group_function; | ||
512 | 532 | ||
513 | /* Utility overlays */ | 533 | /* Utility overlays */ |
514 | 534 | ||
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c index 39cc7ffef3a4..a0331ef6269c 100644 --- a/drivers/acpi/acpica/rscalc.c +++ b/drivers/acpi/acpica/rscalc.c | |||
@@ -402,6 +402,23 @@ acpi_rs_get_aml_length(struct acpi_resource *resource, | |||
402 | 402 | ||
403 | break; | 403 | break; |
404 | 404 | ||
405 | case ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION: | ||
406 | |||
407 | total_size = (acpi_rs_length)(total_size + | ||
408 | resource->data. | ||
409 | pin_group_function. | ||
410 | resource_source. | ||
411 | string_length + | ||
412 | resource->data. | ||
413 | pin_group_function. | ||
414 | resource_source_label. | ||
415 | string_length + | ||
416 | resource->data. | ||
417 | pin_group_function. | ||
418 | vendor_length); | ||
419 | |||
420 | break; | ||
421 | |||
405 | default: | 422 | default: |
406 | 423 | ||
407 | break; | 424 | break; |
@@ -634,6 +651,15 @@ acpi_rs_get_list_length(u8 *aml_buffer, | |||
634 | 651 | ||
635 | break; | 652 | break; |
636 | 653 | ||
654 | case ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION: | ||
655 | |||
656 | extra_struct_bytes += | ||
657 | aml_resource->pin_group_function.vendor_offset - | ||
658 | aml_resource->pin_group_function.res_source_offset + | ||
659 | aml_resource->pin_group_function.vendor_length; | ||
660 | |||
661 | break; | ||
662 | |||
637 | default: | 663 | default: |
638 | 664 | ||
639 | break; | 665 | break; |
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c index 608e36e91de6..55fd1880efbe 100644 --- a/drivers/acpi/acpica/rsdump.c +++ b/drivers/acpi/acpica/rsdump.c | |||
@@ -385,6 +385,16 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) | |||
385 | target)); | 385 | target)); |
386 | break; | 386 | break; |
387 | 387 | ||
388 | case ACPI_RSD_SOURCE_LABEL: | ||
389 | /* | ||
390 | * resource_source_label | ||
391 | */ | ||
392 | acpi_rs_dump_resource_label("Resource Source Label", | ||
393 | ACPI_CAST_PTR(struct | ||
394 | acpi_resource_label, | ||
395 | target)); | ||
396 | break; | ||
397 | |||
388 | default: | 398 | default: |
389 | 399 | ||
390 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", | 400 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", |
diff --git a/drivers/acpi/acpica/rsdumpinfo.c b/drivers/acpi/acpica/rsdumpinfo.c index 30c34d579bda..355b40f9b235 100644 --- a/drivers/acpi/acpica/rsdumpinfo.c +++ b/drivers/acpi/acpica/rsdumpinfo.c | |||
@@ -381,6 +381,29 @@ struct acpi_rsdump_info acpi_rs_dump_pin_group[8] = { | |||
381 | "VendorData", NULL}, | 381 | "VendorData", NULL}, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | struct acpi_rsdump_info acpi_rs_dump_pin_group_function[9] = { | ||
385 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_group_function), | ||
386 | "PinGroupFunction", NULL}, | ||
387 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_group_function.revision_id), | ||
388 | "RevisionId", NULL}, | ||
389 | {ACPI_RSD_1BITFLAG, | ||
390 | ACPI_RSD_OFFSET(pin_group_function.producer_consumer), | ||
391 | "ProducerConsumer", acpi_gbl_consume_decode}, | ||
392 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_function.sharable), | ||
393 | "Sharing", acpi_gbl_shr_decode}, | ||
394 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_group_function.function_number), | ||
395 | "FunctionNumber", NULL}, | ||
396 | {ACPI_RSD_SOURCE_LABEL, | ||
397 | ACPI_RSD_OFFSET(pin_group_function.resource_source_label), | ||
398 | "ResourceSourceLabel", NULL}, | ||
399 | {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(pin_group_function.resource_source), | ||
400 | "ResourceSource", NULL}, | ||
401 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_group_function.vendor_length), | ||
402 | "VendorLength", NULL}, | ||
403 | {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(pin_group_function.vendor_data), | ||
404 | "VendorData", NULL}, | ||
405 | }; | ||
406 | |||
384 | struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = { | 407 | struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = { |
385 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma), | 408 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma), |
386 | "FixedDma", NULL}, | 409 | "FixedDma", NULL}, |
diff --git a/drivers/acpi/acpica/rsinfo.c b/drivers/acpi/acpica/rsinfo.c index 13c3d3656d92..ebccc6a4267b 100644 --- a/drivers/acpi/acpica/rsinfo.c +++ b/drivers/acpi/acpica/rsinfo.c | |||
@@ -83,6 +83,7 @@ struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = { | |||
83 | acpi_rs_convert_pin_function, /* 0x14, ACPI_RESOURCE_TYPE_PIN_FUNCTION */ | 83 | acpi_rs_convert_pin_function, /* 0x14, ACPI_RESOURCE_TYPE_PIN_FUNCTION */ |
84 | acpi_rs_convert_pin_config, /* 0x15, ACPI_RESOURCE_TYPE_PIN_CONFIG */ | 84 | acpi_rs_convert_pin_config, /* 0x15, ACPI_RESOURCE_TYPE_PIN_CONFIG */ |
85 | acpi_rs_convert_pin_group, /* 0x16, ACPI_RESOURCE_TYPE_PIN_GROUP */ | 85 | acpi_rs_convert_pin_group, /* 0x16, ACPI_RESOURCE_TYPE_PIN_GROUP */ |
86 | acpi_rs_convert_pin_group_function, /* 0x17, ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ | ||
86 | }; | 87 | }; |
87 | 88 | ||
88 | /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ | 89 | /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ |
@@ -126,6 +127,7 @@ struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = { | |||
126 | NULL, /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use subtype table below */ | 127 | NULL, /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use subtype table below */ |
127 | acpi_rs_convert_pin_config, /* 0x0F, ACPI_RESOURCE_NAME_PIN_CONFIG */ | 128 | acpi_rs_convert_pin_config, /* 0x0F, ACPI_RESOURCE_NAME_PIN_CONFIG */ |
128 | acpi_rs_convert_pin_group, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */ | 129 | acpi_rs_convert_pin_group, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */ |
130 | acpi_rs_convert_pin_group_function, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */ | ||
129 | }; | 131 | }; |
130 | 132 | ||
131 | /* Subtype table for serial_bus -- I2C, SPI, and UART */ | 133 | /* Subtype table for serial_bus -- I2C, SPI, and UART */ |
@@ -165,6 +167,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = { | |||
165 | acpi_rs_dump_pin_function, /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */ | 167 | acpi_rs_dump_pin_function, /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */ |
166 | acpi_rs_dump_pin_config, /* ACPI_RESOURCE_TYPE_PIN_CONFIG */ | 168 | acpi_rs_dump_pin_config, /* ACPI_RESOURCE_TYPE_PIN_CONFIG */ |
167 | acpi_rs_dump_pin_group, /* ACPI_RESOURCE_TYPE_PIN_GROUP */ | 169 | acpi_rs_dump_pin_group, /* ACPI_RESOURCE_TYPE_PIN_GROUP */ |
170 | acpi_rs_dump_pin_group_function, /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ | ||
168 | }; | 171 | }; |
169 | 172 | ||
170 | struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = { | 173 | struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = { |
@@ -204,6 +207,7 @@ const u8 acpi_gbl_aml_resource_sizes[] = { | |||
204 | sizeof(struct aml_resource_pin_function), /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */ | 207 | sizeof(struct aml_resource_pin_function), /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */ |
205 | sizeof(struct aml_resource_pin_config), /* ACPI_RESOURCE_TYPE_PIN_CONFIG */ | 208 | sizeof(struct aml_resource_pin_config), /* ACPI_RESOURCE_TYPE_PIN_CONFIG */ |
206 | sizeof(struct aml_resource_pin_group), /* ACPI_RESOURCE_TYPE_PIN_GROUP */ | 209 | sizeof(struct aml_resource_pin_group), /* ACPI_RESOURCE_TYPE_PIN_GROUP */ |
210 | sizeof(struct aml_resource_pin_group_function), /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ | ||
207 | }; | 211 | }; |
208 | 212 | ||
209 | const u8 acpi_gbl_resource_struct_sizes[] = { | 213 | const u8 acpi_gbl_resource_struct_sizes[] = { |
@@ -245,6 +249,7 @@ const u8 acpi_gbl_resource_struct_sizes[] = { | |||
245 | ACPI_RS_SIZE(struct acpi_resource_common_serialbus), | 249 | ACPI_RS_SIZE(struct acpi_resource_common_serialbus), |
246 | ACPI_RS_SIZE(struct acpi_resource_pin_config), | 250 | ACPI_RS_SIZE(struct acpi_resource_pin_config), |
247 | ACPI_RS_SIZE(struct acpi_resource_pin_group), | 251 | ACPI_RS_SIZE(struct acpi_resource_pin_group), |
252 | ACPI_RS_SIZE(struct acpi_resource_pin_group_function), | ||
248 | }; | 253 | }; |
249 | 254 | ||
250 | const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = { | 255 | const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = { |
diff --git a/drivers/acpi/acpica/rsserial.c b/drivers/acpi/acpica/rsserial.c index 4a15893e0cf0..96ee92ec044d 100644 --- a/drivers/acpi/acpica/rsserial.c +++ b/drivers/acpi/acpica/rsserial.c | |||
@@ -674,3 +674,80 @@ struct acpi_rsconvert_info acpi_rs_convert_pin_group[10] = { | |||
674 | AML_OFFSET(pin_group.vendor_offset), | 674 | AML_OFFSET(pin_group.vendor_offset), |
675 | 0}, | 675 | 0}, |
676 | }; | 676 | }; |
677 | |||
678 | /******************************************************************************* | ||
679 | * | ||
680 | * acpi_rs_convert_pin_group_function | ||
681 | * | ||
682 | ******************************************************************************/ | ||
683 | |||
684 | struct acpi_rsconvert_info acpi_rs_convert_pin_group_function[13] = { | ||
685 | {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION, | ||
686 | ACPI_RS_SIZE(struct acpi_resource_pin_group_function), | ||
687 | ACPI_RSC_TABLE_SIZE(acpi_rs_convert_pin_group_function)}, | ||
688 | |||
689 | {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION, | ||
690 | sizeof(struct aml_resource_pin_group_function), | ||
691 | 0}, | ||
692 | |||
693 | {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.pin_group_function.revision_id), | ||
694 | AML_OFFSET(pin_group_function.revision_id), | ||
695 | 1}, | ||
696 | |||
697 | {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_group_function.sharable), | ||
698 | AML_OFFSET(pin_group_function.flags), | ||
699 | 0}, | ||
700 | |||
701 | {ACPI_RSC_1BITFLAG, | ||
702 | ACPI_RS_OFFSET(data.pin_group_function.producer_consumer), | ||
703 | AML_OFFSET(pin_group_function.flags), | ||
704 | 1}, | ||
705 | |||
706 | {ACPI_RSC_MOVE16, | ||
707 | ACPI_RS_OFFSET(data.pin_group_function.function_number), | ||
708 | AML_OFFSET(pin_group_function.function_number), | ||
709 | 1}, | ||
710 | |||
711 | /* Resource Source */ | ||
712 | |||
713 | {ACPI_RSC_MOVE8, | ||
714 | ACPI_RS_OFFSET(data.pin_group_function.resource_source.index), | ||
715 | AML_OFFSET(pin_group_function.res_source_index), | ||
716 | 1}, | ||
717 | |||
718 | {ACPI_RSC_COUNT_GPIO_RES, | ||
719 | ACPI_RS_OFFSET(data.pin_group_function.resource_source.string_length), | ||
720 | AML_OFFSET(pin_group_function.res_source_offset), | ||
721 | AML_OFFSET(pin_group_function.res_source_label_offset)}, | ||
722 | |||
723 | {ACPI_RSC_MOVE_GPIO_RES, | ||
724 | ACPI_RS_OFFSET(data.pin_group_function.resource_source.string_ptr), | ||
725 | AML_OFFSET(pin_group_function.res_source_offset), | ||
726 | 0}, | ||
727 | |||
728 | /* Resource Source Label */ | ||
729 | |||
730 | {ACPI_RSC_COUNT_GPIO_RES, | ||
731 | ACPI_RS_OFFSET(data.pin_group_function.resource_source_label. | ||
732 | string_length), | ||
733 | AML_OFFSET(pin_group_function.res_source_label_offset), | ||
734 | AML_OFFSET(pin_group_function.vendor_offset)}, | ||
735 | |||
736 | {ACPI_RSC_MOVE_GPIO_RES, | ||
737 | ACPI_RS_OFFSET(data.pin_group_function.resource_source_label. | ||
738 | string_ptr), | ||
739 | AML_OFFSET(pin_group_function.res_source_label_offset), | ||
740 | 0}, | ||
741 | |||
742 | /* Vendor Data */ | ||
743 | |||
744 | {ACPI_RSC_COUNT_GPIO_VEN, | ||
745 | ACPI_RS_OFFSET(data.pin_group_function.vendor_length), | ||
746 | AML_OFFSET(pin_group_function.vendor_length), | ||
747 | 1}, | ||
748 | |||
749 | {ACPI_RSC_MOVE_GPIO_RES, | ||
750 | ACPI_RS_OFFSET(data.pin_group_function.vendor_data), | ||
751 | AML_OFFSET(pin_group_function.vendor_offset), | ||
752 | 0}, | ||
753 | }; | ||
diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c index 946e1e2cda0c..bf5d19e4f9d2 100644 --- a/drivers/acpi/acpica/utresrc.c +++ b/drivers/acpi/acpica/utresrc.c | |||
@@ -355,6 +355,7 @@ const u8 acpi_gbl_resource_aml_sizes[] = { | |||
355 | ACPI_AML_SIZE_LARGE(struct aml_resource_common_serialbus), | 355 | ACPI_AML_SIZE_LARGE(struct aml_resource_common_serialbus), |
356 | ACPI_AML_SIZE_LARGE(struct aml_resource_pin_config), | 356 | ACPI_AML_SIZE_LARGE(struct aml_resource_pin_config), |
357 | ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group), | 357 | ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group), |
358 | ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group_function), | ||
358 | }; | 359 | }; |
359 | 360 | ||
360 | const u8 acpi_gbl_resource_aml_serial_bus_sizes[] = { | 361 | const u8 acpi_gbl_resource_aml_serial_bus_sizes[] = { |
@@ -409,6 +410,7 @@ static const u8 acpi_gbl_resource_types[] = { | |||
409 | ACPI_VARIABLE_LENGTH, /* 0E *serial_bus */ | 410 | ACPI_VARIABLE_LENGTH, /* 0E *serial_bus */ |
410 | ACPI_VARIABLE_LENGTH, /* 0F pin_config */ | 411 | ACPI_VARIABLE_LENGTH, /* 0F pin_config */ |
411 | ACPI_VARIABLE_LENGTH, /* 10 pin_group */ | 412 | ACPI_VARIABLE_LENGTH, /* 10 pin_group */ |
413 | ACPI_VARIABLE_LENGTH, /* 11 pin_group_function */ | ||
412 | }; | 414 | }; |
413 | 415 | ||
414 | /******************************************************************************* | 416 | /******************************************************************************* |
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 { | |||
591 | u8 *vendor_data; | 591 | u8 *vendor_data; |
592 | }; | 592 | }; |
593 | 593 | ||
594 | struct acpi_resource_pin_group_function { | ||
595 | u8 revision_id; | ||
596 | u8 producer_consumer; /* For values, see Producer/Consumer above */ | ||
597 | u8 sharable; /* For values, see Interrupt Attributes above */ | ||
598 | u16 function_number; | ||
599 | u16 vendor_length; | ||
600 | struct acpi_resource_source resource_source; | ||
601 | struct acpi_resource_label resource_source_label; | ||
602 | u8 *vendor_data; | ||
603 | }; | ||
604 | |||
594 | /* ACPI_RESOURCE_TYPEs */ | 605 | /* ACPI_RESOURCE_TYPEs */ |
595 | 606 | ||
596 | #define ACPI_RESOURCE_TYPE_IRQ 0 | 607 | #define ACPI_RESOURCE_TYPE_IRQ 0 |
@@ -616,7 +627,8 @@ struct acpi_resource_pin_group { | |||
616 | #define ACPI_RESOURCE_TYPE_PIN_FUNCTION 20 /* ACPI 6.2 */ | 627 | #define ACPI_RESOURCE_TYPE_PIN_FUNCTION 20 /* ACPI 6.2 */ |
617 | #define ACPI_RESOURCE_TYPE_PIN_CONFIG 21 /* ACPI 6.2 */ | 628 | #define ACPI_RESOURCE_TYPE_PIN_CONFIG 21 /* ACPI 6.2 */ |
618 | #define ACPI_RESOURCE_TYPE_PIN_GROUP 22 /* ACPI 6.2 */ | 629 | #define ACPI_RESOURCE_TYPE_PIN_GROUP 22 /* ACPI 6.2 */ |
619 | #define ACPI_RESOURCE_TYPE_MAX 22 | 630 | #define ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION 23 /* ACPI 6.2 */ |
631 | #define ACPI_RESOURCE_TYPE_MAX 23 | ||
620 | 632 | ||
621 | /* Master union for resource descriptors */ | 633 | /* Master union for resource descriptors */ |
622 | 634 | ||
@@ -647,6 +659,7 @@ union acpi_resource_data { | |||
647 | struct acpi_resource_pin_function pin_function; | 659 | struct acpi_resource_pin_function pin_function; |
648 | struct acpi_resource_pin_config pin_config; | 660 | struct acpi_resource_pin_config pin_config; |
649 | struct acpi_resource_pin_group pin_group; | 661 | struct acpi_resource_pin_group pin_group; |
662 | struct acpi_resource_pin_group_function pin_group_function; | ||
650 | 663 | ||
651 | /* Common fields */ | 664 | /* Common fields */ |
652 | 665 | ||