HID: intel-thc-hid: Set HID_PHYS with PCI BDF
Subsystems (2)
PATCH 1/1 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 https://github.com/fwupd/fwupd/pull/9995
--- drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c | 1 + drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c | 1 + 2 files changed, 2 insertions(+)
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c +1 -0
@@ -127,6 +127,7 @@ int quicki2c_hid_probe(struct quicki2c_device *qcdev) hid->product =le16_to_cpu (qcdev->dev_desc.product_id);snprintf (hid->name,sizeof (hid->name),"%s %04X:%04X" ,"quicki2c-hid" , hid->vendor, hid->product); +strscpy (hid->phys,dev_name (qcdev->dev),sizeof (hid->phys)); ret =hid_add_device (hid);if (ret) {
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c +1 -0
@@ -118,6 +118,7 @@ int quickspi_hid_probe(struct quickspi_device *qsdev) hid->product =le16_to_cpu (qsdev->dev_desc.product_id);snprintf (hid->name,sizeof (hid->name),"%s %04X:%04X" ,"quickspi-hid" , hid->vendor, hid->product); +strscpy (hid->phys,dev_name (qsdev->dev),sizeof (hid->phys)); ret =hid_add_device (hid);if (ret) {
Signature · 1 line
2.52.0
Quoted 52 lines
-----Original Message-----
From: Daniel Schaefer <[email protected]>
Sent: Friday, March 13, 2026 9:39 PM
To: [email protected]
Cc: Daniel Schaefer <[email protected]>; Xu, Even <[email protected]>; Sun, Xinpeng <[email protected]>; Jiri Kosina <[email protected]>; Benjamin Tissoires <[email protected]>; Sakari Ailus <[email protected]>
Subject: [PATCH] HID: intel-thc-hid: SetHID_PHYSwith PCI BDFCurrently
HID_PHYSis 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 https://github.com/fwupd/fwupd/pull/9995
Cc Even Xu <[email protected]>Cc Xinpeng Sun <[email protected]>Cc Jiri Kosina <[email protected]>Cc Benjamin Tissoires <[email protected]>Cc Sakari Ailus <[email protected]>Signed-off-by Daniel Schaefer <[email protected]>---
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c| 1 +drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c| 1 +2 files changed, 2 insertions(+)drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c +1
-0@@ -127,6 +127,7 @@ int quicki2c_hid_probe(struct quicki2c_device *qcdev) hid->product =le16_to_cpu (qcdev->dev_desc.product_id);snprintf (hid->name,sizeof (hid->name),"%s %04X:%04X" ,"quicki2c-hid" , hid->vendor, hid->product); +strscpy (hid->phys,dev_name (qcdev->dev),sizeof (hid->phys)); ret =hid_add_device (hid);if (ret) {drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c +0
-0
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c int quickspi_hid_probe(struct quickspi_device *qsdev) · line 121
Quoted 4 lines
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c +1
-0@@ -118,6 +118,7 @@ int quickspi_hid_probe(struct quickspi_device *qsdev) hid->product =le16_to_cpu (qsdev->dev_desc.product_id);snprintf (hid->name,sizeof (hid->name),"%s %04X:%04X" ,"quickspi-hid" , hid->vendor, hid->product); +strscpy (hid->phys,dev_name (qsdev->dev),sizeof (hid->phys));
Thanks for the patch!
Quoted 5 lines
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c +0
-1ret =hid_add_device (hid);if (ret) { --2.52.0
Quoted 9 lines · Daniel Schaefer
Currently
HID_PHYSis 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.
Quoted 8 lines
Tested with fwupd 2.1.1, can avoid https://github.com/fwupd/fwupd/pull/9995
Cc Even Xu <[email protected]>Cc Xinpeng Sun <[email protected]>Cc Jiri Kosina <[email protected]>Cc Benjamin Tissoires <[email protected]>Cc Sakari Ailus <[email protected]>Signed-off-by Daniel Schaefer <[email protected]>
Applied to hid.git#for-7.0/upstream-fixes, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs