All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roderick Colenbrander <thunderbird2k@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Benjamin Tissoires" <benjamin.tissoires@redhat.com>,
	marek.behun@nic.cz, linux-input <linux-input@vger.kernel.org>,
	linux-leds@vger.kernel.org,
	"Daniel J. Ogorchock" <djogorchock@gmail.com>,
	"Barnabás Pőcze" <pobrn@protonmail.com>,
	"Jiri Kosina" <jikos@kernel.org>
Subject: Re: Naming of HID LED devices
Date: Mon, 24 May 2021 22:55:41 -0700	[thread overview]
Message-ID: <CAEc3jaBdWwfbMdrdKOc9e19Mb5HD3DE4QUNu+5UseQ9WLt0THQ@mail.gmail.com> (raw)
In-Reply-To: <20210521160455.GA10159@duo.ucw.cz>

Hi

On Fri, May 21, 2021 at 9:04 AM Pavel Machek <pavel@ucw.cz> 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

  reply	other threads:[~2021-05-25  5:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  5:47 Naming of HID LED devices Roderick Colenbrander
2021-05-21 15:57 ` Marek Behún
2021-05-21 16:12   ` Barnabás Pőcze
2021-05-21 16:04 ` Pavel Machek
2021-05-25  5:55   ` Roderick Colenbrander [this message]
2021-05-25 20:04     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEc3jaBdWwfbMdrdKOc9e19Mb5HD3DE4QUNu+5UseQ9WLt0THQ@mail.gmail.com \
    --to=thunderbird2k@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=djogorchock@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=pavel@ucw.cz \
    --cc=pobrn@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.