On Mon, Aug 4, 2025 at 12:20 AM Jiri Kosina <jikos@xxxxxxxxxx> wrote: > > On Mon, 21 Jul 2025, Andrey Smirnov wrote: > > > Hey folks: > > > > I'm working on a custom USB device that presents N battery powered HID > > interfaces with each interface reporting its own battery life via > > standard HID Power Device report. The problem I'm running into is that > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-input.c?h=v6.16-rc7#n524 > > > > assumes that "uniq" field of a "struct hid_device" is always unique, but > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/usbhid/hid-core.c?h=v6.16-rc7#n1415 > > > > populates "uniq" with iSerialNumber which is only unique per USB > > device, not per USB interface. At the first glance the right way to > > fix this would be to change how uniq is generated by usbhid_probe() > > but that probably would break some userspace assumptions? > > Hmm, actually, from top of my head I am not able to come up with any > userspace breakage this might cause. Do you have anything particular on > mind? No, not really. It sounds like we can try to fix this without gating the change by a quirk. I'll try to put together a path in the next couple of days, then. Thanks!