Skip to content

Commit 4bc7bc4

Browse files
JohnAZoidbergJiri Kosina
authored andcommitted
HID: intel-thc-hid: Set HID_PHYS with PCI BDF
Currently HID_PHYS is empty, which means userspace tools (e.g. fwupd) that depend on it for distinguishing the devices, are unable to do so. Other drivers like i2c-hid, usbhid, surface-hid, all populate it. With this change it's set to, for example: HID_PHYS=0000:00:10.0 Each function has just a single HID device, as far as I can tell, so there is no need to add a suffix. Tested with fwupd 2.1.1, can avoid fwupd/fwupd#9995 Cc: Even Xu <even.xu@intel.com> Cc: Xinpeng Sun <xinpeng.sun@intel.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <bentiss@kernel.org> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Daniel Schaefer <git@danielschaefer.me> Reviewed-by: Even Xu <even.xu@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent 1965445 commit 4bc7bc4

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ int quicki2c_hid_probe(struct quicki2c_device *qcdev)
127127
hid->product = le16_to_cpu(qcdev->dev_desc.product_id);
128128
snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", "quicki2c-hid",
129129
hid->vendor, hid->product);
130+
strscpy(hid->phys, dev_name(qcdev->dev), sizeof(hid->phys));
130131

131132
ret = hid_add_device(hid);
132133
if (ret) {

drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ int quickspi_hid_probe(struct quickspi_device *qsdev)
118118
hid->product = le16_to_cpu(qsdev->dev_desc.product_id);
119119
snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", "quickspi-hid",
120120
hid->vendor, hid->product);
121+
strscpy(hid->phys, dev_name(qsdev->dev), sizeof(hid->phys));
121122

122123
ret = hid_add_device(hid);
123124
if (ret) {

0 commit comments

Comments
 (0)