summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-mcp2221.c
diff options
context:
space:
mode:
authorHamish Martin <hamish.martin@alliedtelesis.co.nz>2023-10-25 06:55:12 +0300
committerJiri Kosina <jkosina@suse.cz>2023-11-21 11:30:22 +0300
commitd9786159d229cdc1f579f7cf3abf464efb453e40 (patch)
treedf6d48822e2314d0c6730080ace5e655498fc97d /drivers/hid/hid-mcp2221.c
parent4ea4ed22b57846facd9cb4af5f67cb7bd2792cf3 (diff)
downloadlinux-d9786159d229cdc1f579f7cf3abf464efb453e40.tar.xz
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 <hamish.martin@alliedtelesis.co.nz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-mcp2221.c')
-rw-r--r--drivers/hid/hid-mcp2221.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index 72883e0ce757..90e23bba2130 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -1154,6 +1154,7 @@ static int mcp2221_probe(struct hid_device *hdev,
mcp->adapter.algo = &mcp_i2c_algo;
mcp->adapter.retries = 1;
mcp->adapter.dev.parent = &hdev->dev;
+ ACPI_COMPANION_SET(&mcp->adapter.dev, ACPI_COMPANION(hdev->dev.parent));
snprintf(mcp->adapter.name, sizeof(mcp->adapter.name),
"MCP2221 usb-i2c bridge");