[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a6ecd59f99aa64355ac7c176aa4310d32ce8969e.camel@suse.de>
Date: Thu, 28 Feb 2019 19:01:17 +0100
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: "Junge, Terry" <Terry.Junge@...ntronics.com>,
Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc: "oneukum@...e.de" <oneukum@...e.de>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC/RFT] HID: primax: Fix wireless keyboards descriptor
On Thu, 2019-02-28 at 17:02 +0000, Junge, Terry wrote:
> This could also be a parser error. In the HID specification section 6.2.2.8 it
> states that the last declared Usage Page is applied to Usages when the Main
> item is encountered.
>
> "If the bSize field = 1 or 2 then the Usage is interpreted as an unsigned
> value
> that selects a Usage ID on the currently defined Usage Page. When the parser
> encounters a main item it concatenates the last declared Usage Page with a
> Usage to form a complete usage value. Extended usages can be used to
> override the currently defined Usage Page for individual usages."
>
Hi Terry, thanks for the comment.
Just for the record the paragraph I cited on my patch is the following:
6.2.2.7 Global Items
[...]
Usage Page: Unsigned integer specifying the current Usage Page. Since a
usage are 32 bit values, Usage Page items can be used to conserve space
in a report descriptor by setting the high order 16 bits of a
subsequent usages. Any usage that follows which is defines* 16 bits or
less is interpreted as a Usage ID and concatenated with the Usage Page
to form a 32 bit Usage.
* This is a spec errata, I belive it should say "defined"
As you can see they use the word "follows" which in my opinion contradicts the
paragraph you pointed out. That said I may be wrong, I'm not too good at
reading specs :).
I checked the HID parser and it's indeed written assuming local items are
preceded by a Usage Page. I'd be glad to fix it there, but it would be nice to
have the mantainer's opinion on the matter first.
Regards,
Nicolas
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists