linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
To: Michael Wright <michaelwr@android.com>, simon@mungewell.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	David Herrmann <dh.herrmann@gmail.com>,
	HID CORE LAYER <linux-input@vger.kernel.org>,
	Michael Wright <michaelwr@google.com>,
	Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH] HID: add new gamepad LED constants
Date: Tue, 16 Sep 2014 18:44:02 -0700	[thread overview]
Message-ID: <5418E762.5040802@valvesoftware.com> (raw)
In-Reply-To: <CAON4U=PT9k9j15QyuA-qjDtPQcXMz4Y9_Z0wFV4ydMqoOk8CAg@mail.gmail.com>

My issue with the LED subsystem is that to my knowledge, the only thing 
that it currently exposes is an opaque brightness value that has plenty 
of different meanings depending on what is actually being exposed. It 
would need to be overhauled to support the usecase at hand, which would 
be a lot more work than just applying this patch, on top of all the 
other problems already mentioned with finding and using the sysfs LED 
interface.

With this change all the gamepad drivers could easily plumb through 
their device-specific way of exposing player IDs, and a userspace 
component could easily ensure consistency between logical player IDs and 
their LEDs.

If such a thing was attempted currently with gamepads that are wired up 
to LED classes, the userspace component would need to have special 
knowledge of each driver to be able to know which special brightness 
value to set to get player N to light up on the controller. This isn't 
solvable without significantly expanding the interface to the LED subsystem.

Michael, I assume such a userspace component is what you're shooting for 
with this work?

In SteamOS the individual gamepad drivers are modified to automatically 
apply player IDs from the joydev device IDs, which in turn are the 
logical game controller IDs that are exposed by libraries such as SDL to 
games and as such are reflected through their UI.

This was deemed too ad-hoc to be upstreamable and your patch seems like 
the right first step towards a cleaner, albeit slightly more complex 
solution. Trying to leverage the LED system seems a lot more complex, 
without adding any value to this solution.

Thanks,
  - Pierre-Loup

On 09/15/2014 09:06 PM, Michael Wright wrote:
> On Mon, Sep 15, 2014 at 7:00 PM,  <simon@mungewell.org> wrote:
>> One problem that exists is that many HID devices don't have an (embedded)
>> serial number, so identification can be confused if you have more that one
>> identical device.
>
>
> That's a pretty serious problem since this is explicitly for multiple
> gamepads connected to the same device, which will most likely be all
> the same type.
>


  reply	other threads:[~2014-09-17  2:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15  3:13 [PATCH] HID: add new gamepad LED constants Michael Wright
2014-09-15  5:07 ` David Herrmann
2014-09-15 18:03   ` Michael Wright
2014-09-15 21:57     ` Dmitry Torokhov
2014-09-15 22:15       ` David Herrmann
2014-09-15 22:58         ` Dmitry Torokhov
2014-09-15 23:41           ` Michael Wright
2014-09-16  0:54             ` Dmitry Torokhov
2014-09-16  1:02               ` Michael Wright
2014-09-16  2:00             ` simon
2014-09-16  4:06               ` Michael Wright
2014-09-17  1:44                 ` Pierre-Loup A. Griffais [this message]
2014-09-17  1:56                   ` Michael Wright
2014-09-22 21:36                     ` Michael Wright
2014-09-23 16:40                       ` Dmitry Torokhov
2014-09-16 10:00           ` David Herrmann
2014-09-23 16:37             ` Dmitry Torokhov
2014-09-25 10:26               ` David Herrmann

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=5418E762.5040802@valvesoftware.com \
    --to=pgriffais@valvesoftware.com \
    --cc=dh.herrmann@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=michaelwr@android.com \
    --cc=michaelwr@google.com \
    --cc=simon@mungewell.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).