All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Hübner" <andreas@k4n.de>
To: simon@mungewell.org
Cc: linux-input@vger.kernel.org
Subject: Re: Saitek PS1000 gamepad - HID descriptor wonky
Date: Tue, 13 Dec 2011 20:09:31 +0100	[thread overview]
Message-ID: <20111213190931.GA32329@v36691.1blu.de> (raw)
In-Reply-To: <98f3f0015149c06f45aa0af8e5851777.squirrel@host171.canaca.com>

On Mon, Dec 12, 2011 at 01:49:59PM -0500, simon@mungewell.org wrote:
> Err.. must have been sleepy when I looked over your code. Don't know
> whether '>=' is better than '==', all other modules do this and I wonder
> whether the kernel can get a larger descriptor block by some mechanism.

Well, this would be kind of strange, wouldn't it?
But I can change it to '>=' if it makes you happy. :)


> Quite obviously if the buttons change value in the HID stream then they
> are not 'CONSTANT', personally I would patch this part of the HID
> descriptor so they are just defined as 'input variable'.

While I personally agree with that interpretation, the spec only states
that constant fields can not be written by the host. (I know, this
doesn't make any sense for an input report.)

Somewhere I read that a constant field with no usage assigned to it
should be treated as padding. But in this case, there is a usage
assigned to.
And this is what I'd actually do in hidinput_configure_usage: only goto
ignore if there is no usage associated with the field.

On the other hand, the gamepad example in the HID Usage Tables doesn't
use the constant flag for buttons.


> Not sure why you would think other devices might be affected. Patching the
> HID descriptor should be limited to this USBID pair, and even only active
> if the device provided matches the template you use to trigger patching.

I was worrying that other devices might declare some non-padding input
fields as constants. So if you fix this problem in the generic part
(i. e. hid-input.c) those devices will also start working correctly.


Andreas

  reply	other threads:[~2011-12-13 19:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 10:28 joydev: support for Saitek PS1000 gamepad Andreas Hübner
2011-11-22 17:13 ` simon
2011-11-23  8:43   ` Andreas Hübner
2011-11-23 15:45     ` Saitek PS1000 gamepad - HID descriptor wonky simon
2011-11-24  8:12       ` Andreas Hübner
     [not found]         ` <30cc35606560d634477e2a288bdf6db3.squirrel@host171.canaca.com>
     [not found]           ` <20111208123424.GA1298@tapura>
     [not found]             ` <a8799dfc5b69fd158ec54b099d231961.squirrel@host171.canaca.com>
     [not found]               ` <20111210131702.GA5620@tapura>
     [not found]                 ` <d13c53ac7f835eaff26cfc2aae0fac6c.squirrel@mungewell.org>
     [not found]                   ` <20111211214010.GA14046@tapura>
2011-12-12 18:49                     ` simon
2011-12-13 19:09                       ` Andreas Hübner [this message]
2012-02-22  0:50                       ` Andreas Hübner
  -- strict thread matches above, loose matches on Subject: below --
2011-12-11 21:48 Andreas Hübner

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=20111213190931.GA32329@v36691.1blu.de \
    --to=andreas@k4n.de \
    --cc=linux-input@vger.kernel.org \
    --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 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.