Skip to content

Commit 1b1b672

Browse files
uhpatelgregkh
authored andcommitted
usb: typec: intel_pmc_mux: Add new ACPI ID for Meteor Lake IOM device
This adds the necessary ACPI ID for Intel Meteor Lake IOM devices. The callback function is_memory() is modified so that it also checks if the resource descriptor passed to it is a memory type "Address Space Resource Descriptor". On Intel Meteor Lake the ACPI memory resource is not described using the "32-bit Memory Range Descriptor" because the memory is outside of the 32-bit address space. The memory resource is described using the "Address Space Resource Descriptor" instead. Intel Meteor Lake is the first platform to describe the memory resource for this device with Address Space Resource Descriptor, but it most likely will not be the last. Therefore the change to the is_memory() callback function is made generic. Signed-off-by: Utkarsh Patel <[email protected]> Cc: [email protected] [ heikki: Rewrote the commit message. ] Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent aece382 commit 1b1b672

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/usb/typec/mux/intel_pmc_mux.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,11 @@ static int pmc_usb_register_port(struct pmc_usb *pmc, int index,
571571

572572
static int is_memory(struct acpi_resource *res, void *data)
573573
{
574-
struct resource r;
574+
struct resource_win win = {};
575+
struct resource *r = &win.res;
575576

576-
return !acpi_dev_resource_memory(res, &r);
577+
return !(acpi_dev_resource_memory(res, r) ||
578+
acpi_dev_resource_address_space(res, &win));
577579
}
578580

579581
/* IOM ACPI IDs and IOM_PORT_STATUS_OFFSET */
@@ -583,6 +585,9 @@ static const struct acpi_device_id iom_acpi_ids[] = {
583585

584586
/* AlderLake */
585587
{ "INTC1079", 0x160, },
588+
589+
/* Meteor Lake */
590+
{ "INTC107A", 0x160, },
586591
{}
587592
};
588593

0 commit comments

Comments
 (0)