Linux Input/HID development
 help / color / mirror / Atom feed
From: Rahul Rameshbabu <sergeantsagara@protonmail.com>
To: Brett Raye <braye@fastmail.com>
Cc: jikos@kernel.org, benjamin.tissoires@redhat.com,
	linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: glorious: fix Glorious Model I HID report
Date: Mon, 06 Nov 2023 03:28:31 +0000	[thread overview]
Message-ID: <875y2f1rxg.fsf@protonmail.com> (raw)
In-Reply-To: <20231103011038.27462-1-braye@fastmail.com>

On Thu, 02 Nov, 2023 18:10:38 -0700 "Brett Raye" <braye@fastmail.com> wrote:
> The Glorious Model I mouse has a buggy HID report descriptor for its
> keyboard endpoint (used for programmable buttons). For report ID 2, there
> is a mismatch between Logical Minimum and Usage Minimum in the array that
> reports keycodes.
>
> The offending portion of the descriptor: (from hid-decode)
>
> 0x95, 0x05,                    //  Report Count (5)                   30
> 0x75, 0x08,                    //  Report Size (8)                    32
> 0x15, 0x00,                    //  Logical Minimum (0)                34
> 0x25, 0x65,                    //  Logical Maximum (101)              36
> 0x05, 0x07,                    //  Usage Page (Keyboard)              38
> 0x19, 0x01,                    //  Usage Minimum (1)                  40
> 0x29, 0x65,                    //  Usage Maximum (101)                42
> 0x81, 0x00,                    //  Input (Data,Arr,Abs)               44
>
> This bug shifts all programmed keycodes up by 1. Importantly, this causes
> "empty" array indexes of 0x00 to be interpreted as 0x01, ErrorRollOver.
> The presence of ErrorRollOver causes the system to ignore all keypresses
> from the endpoint and breaks the ability to use the programmable buttons.
>
> Setting byte 41 to 0x00 fixes this, and causes keycodes to be interpreted
> correctly.
>
> Also, USB_VENDOR_ID_GLORIOUS is changed to USB_VENDOR_ID_SINOWEALTH,
> and a new ID for Laview Technology is added. Glorious seems to be
> white-labeling controller boards or mice from these vendors. There isn't a
> single canonical vendor ID for Glorious products.

I agree with what this patch is doing overall. However, I think this
patch should be split into two patches that are part of a patch series.
One patch that does s/USB_VENDOR_ID_GLORIOUS/USB_VENDOR_ID_SINOWEALTH.
The follow-up patch in the series will contain the work on the Model I
keyboard.

>
> Signed-off-by: Brett Raye <braye@fastmail.com>
> ---

--
Thanks,

Rahul Rameshbabu


  reply	other threads:[~2023-11-06  3:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03  1:10 [PATCH] HID: glorious: fix Glorious Model I HID report Brett Raye
2023-11-06  3:28 ` Rahul Rameshbabu [this message]
2023-11-21  8:38 ` Jiri Kosina
2023-11-21 22:15   ` Rahul Rameshbabu

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=875y2f1rxg.fsf@protonmail.com \
    --to=sergeantsagara@protonmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=braye@fastmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.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