linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>, wbauer1@a1.net
Cc: Jiri Kosina <jikos@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] HID: input: fix a4tech horizontal wheel custom usage
Date: Fri, 05 Jul 2019 12:28:03 +0200	[thread overview]
Message-ID: <a161110383396b4d51238bb375a7fd818c575eb3.camel@suse.de> (raw)
In-Reply-To: <9ff9f804a2fa3abf1249a358f64c2d39a04c8ed1.camel@suse.de>

[-- Attachment #1: Type: text/plain, Size: 4206 bytes --]

On Fri, 2019-06-14 at 16:25 +0200, Nicolas Saenz Julienne wrote:
> On Fri, 2019-06-14 at 15:36 +0200, Benjamin Tissoires wrote:
> > Hi Wolfgang,
> > 
> > On Thu, Jun 13, 2019 at 1:49 PM Wolfgang Bauer <wbauer@tmo.at> wrote:
> > > On Tuesday, 11. Juni 2019, 16:42:37 Benjamin Tissoires wrote:
> > > > On Tue, Jun 11, 2019 at 2:13 PM Nicolas Saenz Julienne
> > > > 
> > > > <nsaenzjulienne@suse.de> wrote:
> > > > > NOTE: I CC'd Wolfgang as he's the one who can test this.
> > > > 
> > > > I'll wait for Wolfram to confirm that the patch works before pushing
> > > > then.
> > > 
> > > My name is Wolfgang, not Wolfram... ;-)
> > 
> > ouch, sorry for that (I am more used to talk to the I2C maintainer
> > apparently)
> > 
> > > But never mind.
> > > 
> > > I tested the patch meanwhile on top of kernel 5.2.rc4, where the mouse
> > > wheel
> > > actually worked.
> > 
> > Actually, I am a little bit lost here.
> > 
> > The patch mentions a fix of c01908a14bf73, which is in 5.1 final.
> > So if your mouse works in 5.2.rc4, I am not sure how
> > HID-a4tech-fix-horizontal-scrolling.patch could break it.
> > 
> > Could you be slightly more specific in what "works" and what doesn't?
> 
> Hi Benjamin,
> 
> First of all here's the descriptor:
> 0x05, 0x01, /*  Usage Page (Desktop),               */
> 0x09, 0x02, /*  Usage (Mouse),                      */
> 0xA1, 0x01, /*  Collection (Application),           */
> 0x09, 0x01, /*      Usage (Pointer),                */
> 0xA1, 0x00, /*      Collection (Physical),          */
> 0x05, 0x09, /*          Usage Page (Button),        */
> 0x19, 0x01, /*          Usage Minimum (01h),        */
> 0x29, 0x08, /*          Usage Maximum (08h),        */
> 0x15, 0x00, /*          Logical Minimum (0),        */
> 0x25, 0x01, /*          Logical Maximum (1),        */
> 0x75, 0x01, /*          Report Size (1),            */
> 0x95, 0x08, /*          Report Count (8),           */
> 0x81, 0x02, /*          Input (Variable),           */
> 0x05, 0x01, /*          Usage Page (Desktop),       */
> 0x09, 0x30, /*          Usage (X),                  */
> 0x09, 0x31, /*          Usage (Y),                  */
> 0x09, 0x38, /*          Usage (Wheel),              */
> 0x09, 0xB8, /*          Usage (B8h),                */
> 0x15, 0x81, /*          Logical Minimum (-127),     */
> 0x25, 0x7F, /*          Logical Maximum (127),      */
> 0x75, 0x08, /*          Report Size (8),            */
> 0x95, 0x04, /*          Report Count (4),           */
> 0x81, 0x06, /*          Input (Variable, Relative), */
> 0xC0,       /*      End Collection,                 */
> 0xC0        /*  End Collection
> 
> 
> Sorry for the confusion, I'll try to explain the situation:
> 
> In v5.2-rc4 without "HID-a4tech-fix-horizontal-scrolling.patch" the vertical
> wheel works out of luck as it's mapped to REL_WHEEL_HIGH_RES, which hid-a4tech
> ignores and lets hid-input process, the horizontal wheel is broken. On top of
> that Usage(0xB8) is also ignored by both hid-a4tech and hid-input as it isn't
> mapped to anything.
> 
> There are two distinct bugs here:
>   - High resolution wheel processing in hid-a4tech not being implemented,
>     breaking horizontal wheels.
>   - hid-a4tech not taking care of Usage(0xB8) correctly as it depended on it
>     being mapped to "Rel.Misc". That behaviour changed in v5.1 with "HID:
>     input: add mapping for "Toggle Display" key".
> 
> Once high resolution wheel reports are fixed and handled in hid-a4tech's
> custom
> event, the mouse breaks as it's the processing of Usage(0xB8) that triggers
> the
> input_events, which is being ignored.
> 
> You'll probably ask how come we didn't see this when
> "HID-a4tech-fix-horizontal-scrolling.patch" was merged. It's due to the fact
> it
> was tested on an older kernel, v5.0.15, that didn't contain "HID: input: add
> mapping for "Toggle Display" key"[1].
> 
> So that's why I added that specific fix tag. For LTS kernels, it is possible
> that "Toggle Display" support was back-ported but not the high resolution
> wheels support.

Hi,
Any thoughts on this?

Regards,
Nicolas


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-07-05 10:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 12:13 [PATCH v2] HID: input: fix a4tech horizontal wheel custom usage Nicolas Saenz Julienne
2019-06-11 14:42 ` Benjamin Tissoires
2019-06-13 11:48   ` Wolfgang Bauer
2019-06-14 13:36     ` Benjamin Tissoires
2019-06-14 14:25       ` Nicolas Saenz Julienne
2019-07-05 10:28         ` Nicolas Saenz Julienne [this message]
2019-07-18 15:46       ` Jeremy Cline
2019-06-14 12:00   ` Wolfgang Bauer
2019-08-01 10:56 ` Nicolas Saenz Julienne
2019-08-05 12:38   ` Jiri Kosina
2019-08-25 20:50     ` Heorhi Valakhanovich

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=a161110383396b4d51238bb375a7fd818c575eb3.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wbauer1@a1.net \
    /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).