Hi On Fri, May 21, 2021 at 9:04 AM Pavel Machek <pavel@xxxxxx> wrote: > > Hi! > > > Earlier this year during review of the hid-playstation driver there > > was a discussion on the naming of LEDs exposed by HID drivers. Moving > > forward the preference from the LED maintainers was to follow the > > naming scheme "device:color:function" instead of the custom names used > > so far by HID drivers. > > > > I would like to get some guidance on the naming direction not just for > > hid-playstation, but Daniel's hid-nintendo driver for which he posted > > a new revision today has the same problem. > > > > The original discussion was on "why not use the input device name?" > > (e.g. input15). It was concluded that it wouldn't uniquely identify a > > HID device among reasons. > > I understand that problem is that one controller is present as > multiple input devices to userspace. > > [That is something you might want to fix, BTW. IIRC input protocol is > flexible enough to do that.] [That part is actually non-trivial to fix without an overhaul of the Linux evdev system. Essentially evdev is a bit limiting for some devices due to conflicts in use of axes or buttons. This is what prompted creation of multiple input devices I believe. Though various HID devices are now also receiving multiple input devices automatically now based on collections or something. Benjamin and Jiri are the experts there. Anway that's a major other conversation, people are trying to steer away from...] > > I suggest you simply select one input device (call it primary, > probably the one that contains the master joystick) and use its input > number.... It is of course an option. Though I recall in the previous discussion, technically the LED is registered on the HID device and not on the input device, so it is not entirely correct. There are also cases I believe where LEDs are directly created for the HID device itself. Based on a quick search this includes the 'hid-led' driver. Though its naming is probably fixed as we may not want to break user space (not sure if anyone is relying on it). There might be other plain HID device use cases with LEDs. > Best regards, > Pavel > -- > http://www.livejournal.com/~pavelmachek Thanks, Roderick