Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp246584yba; Fri, 3 May 2019 00:40:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQWmGw0ym5M8riauHI/Newx2KCOfM0ESaeuTOoa+Hq1wVwmozPs25ZS07vTpM5ITgX9+6o X-Received: by 2002:a65:654c:: with SMTP id a12mr8561124pgw.101.1556869232362; Fri, 03 May 2019 00:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556869232; cv=none; d=google.com; s=arc-20160816; b=Zr17JaaZxENZfXM9hiGf4VXifTR040CHBqQEsmlStQ9E7Zvdye0KirlkMIJu/odLdn 5yGegjMra/S2Wx1eOUqVBEdQZxsORwhhp+lWP0BsJ8x6NkqvVxkZUVs94GY+uMKqpD51 zncNczJLYUyEI+tciLGwVbawjDA4U2oM7RZiPN5B4TF3RukN5gA+Qq2bOUFIvcTffWvC eZAOAxCzMgGHCX8CENOzCaopgntfH3i5QkU1r5Uz5pYj57jheR9yfXHR9CuiOXklM8Xu KFwu9ZwL7YZNuLYk+HPPAk4qBxm9J4yRQFTFlrZfSai/LZL8Fg07vwwQaWxKmcvBON4y FWZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=5pLMVk2gE2hN4nThxKPmimwAH7S1TxDdCcQmYr35SL8=; b=GuvxSVxCH/sOzwT9uwAW5mmzOAPQ3DtZIvlC5XWG2+RQiAYmdq7tDqF2EuhI7corgB ZmpPhKBUXNvyOHi6IbqeE4mR1WwlMWC3xaK2GOxMLtKCguSspdSs+sGBVoQM/ZiDrtaw dc9ETmH3C/VafMMZyxlFsDbuU9BuGLpBa6/iwN7ZdfFnzSG7PQNvcLLA6kMAi+zlMwEB bmgsPh8gVqG+6DIbSRBlfLCs1zoA0Mxsx1yoNwHrsKTZPPjtWqPql7W0RSi0D7+At7jy AcMFKJLIufXGQ0vneqCz5YqdbBCnRyppGqEf0SAVhlwTb19u69pCsDscpgymoY+qSaqZ +GlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n17si1380458pgj.487.2019.05.03.00.40.16; Fri, 03 May 2019 00:40:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbfECHgx convert rfc822-to-8bit (ORCPT + 99 others); Fri, 3 May 2019 03:36:53 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:36610 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbfECHgx (ORCPT ); Fri, 3 May 2019 03:36:53 -0400 Received: by mail-qk1-f196.google.com with SMTP id c14so125114qke.3 for ; Fri, 03 May 2019 00:36:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=xzylViG06UDrl8qCxsp7ThbrDB00Pxpkx005XhyXahQ=; b=fqIMZl3CpvH2hruG6SO/R0pqMtf/SRLXvavahPDZiJiCfWOieIPxNr5bd4+/h3a+91 dyVj5qobnbNY4TFQmWcnag1YcxqJJuq8EpF4omBRMwSvbjJMdCo0u5io+5ZB4c1bd1b8 EnA6O37K3Vogj93XMqZlCuBTWa9uT4CKa6tzzfG9wEA7WAaqKlU2AvH2SA6AeMThqUiT ZM/VgoH6GoQ9YWVHdBOVKjzsodwgZbOIrKDpZ409GtKz6BEA+wCl9AJP6SCpQ5J/TdRh FkvqVwxre9bWHbQ2zM7Tz9WY0GV5ychIJ0zsU9KU8aDHfOwFrbRA5UJomSF/iTUymy+d EcXg== X-Gm-Message-State: APjAAAVM3pGgAdTxlY/AUHM/oGN9z5yWne39Y5Zb7ZT61xpTWBMCrXdy oYynNjg6fysJ/OQn/HwGNa/Hv7d+UG5ZIPZXlHCWkA== X-Received: by 2002:a37:7b03:: with SMTP id w3mr6249139qkc.266.1556869012560; Fri, 03 May 2019 00:36:52 -0700 (PDT) MIME-Version: 1.0 References: <20190502213639.7632-1-spaz16@wp.pl> In-Reply-To: <20190502213639.7632-1-spaz16@wp.pl> From: Benjamin Tissoires Date: Fri, 3 May 2019 09:36:41 +0200 Message-ID: Subject: Re: [PATCH] HID: fix A4Tech horizontal scrolling To: =?UTF-8?B?QsWCYcW8ZWogU3pjenlnaWXFgg==?= Cc: igorkuo@gmail.com, Jiri Kosina , "open list:HID CORE LAYER" , lkml Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, May 2, 2019 at 11:37 PM Błażej Szczygieł wrote: > > Since recent high resolution scrolling changes the A4Tech driver must > check for the "REL_WHEEL_HI_RES" usage code. > > Fixes: 2dc702c991e3774af9d7ce410eef410ca9e2357e (HID: input: use the > Resolution Multiplier for high-resolution scrolling) > > Signed-off-by: Błażej Szczygieł Thanks for the patch. I do not doubt this fixes the issues, but I still wonder if we should not export REL_HWHEEL_HI_RES instead of REL_HWHEEL events. Also, I can not figure out how the events are processed by the kernel. Could you attach a hid-recorder dump of the mouse wheels with hid-recorder from https://gitlab.freedesktop.org/libevdev/hid-tools ? This should give me a better view of the mouse, and I could also add it to the regression tests I am running for each commit. Cheers, Benjamin > --- > drivers/hid/hid-a4tech.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c > index 9428ea7cdf8a..fafb9fa558e7 100644 > --- a/drivers/hid/hid-a4tech.c > +++ b/drivers/hid/hid-a4tech.c > @@ -38,7 +38,7 @@ static int a4_input_mapped(struct hid_device *hdev, struct hid_input *hi, > { > struct a4tech_sc *a4 = hid_get_drvdata(hdev); > > - if (usage->type == EV_REL && usage->code == REL_WHEEL) > + if (usage->type == EV_REL && usage->code == REL_WHEEL_HI_RES) > set_bit(REL_HWHEEL, *bit); > > if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) > @@ -60,7 +60,7 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field, > input = field->hidinput->input; > > if (a4->quirks & A4_2WHEEL_MOUSE_HACK_B8) { > - if (usage->type == EV_REL && usage->code == REL_WHEEL) { > + if (usage->type == EV_REL && usage->code == REL_WHEEL_HI_RES) { > a4->delayed_value = value; > return 1; > } > @@ -77,7 +77,7 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field, > return 1; > } > > - if (usage->code == REL_WHEEL && a4->hw_wheel) { > + if (usage->code == REL_WHEEL_HI_RES && a4->hw_wheel) { > input_event(input, usage->type, REL_HWHEEL, value); > return 1; > } > -- > 2.21.0 >