Skip to content

Commit d978615

Browse files
Hamish MartinJiri Kosina
authored andcommitted
HID: mcp2221: Set ACPI companion
In scenarios where an I2C device tree is defined in ACPI and exists off the MCP2221 I2C bus, the devices could not be instantiated. Mark the USB port that the MCP2221 is connected to as its ACPI companion so that the USB device can be bound to the ACPI tree when enumerated. With this change the downstream I2C tree devices can be instantiated on ACPI systems. Signed-off-by: Hamish Martin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 4ea4ed2 commit d978615

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/hid-mcp2221.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ static int mcp2221_probe(struct hid_device *hdev,
11541154
mcp->adapter.algo = &mcp_i2c_algo;
11551155
mcp->adapter.retries = 1;
11561156
mcp->adapter.dev.parent = &hdev->dev;
1157+
ACPI_COMPANION_SET(&mcp->adapter.dev, ACPI_COMPANION(hdev->dev.parent));
11571158
snprintf(mcp->adapter.name, sizeof(mcp->adapter.name),
11581159
"MCP2221 usb-i2c bridge");
11591160

0 commit comments

Comments
 (0)