Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2754780yba; Sat, 18 May 2019 02:10:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaaBPOEE+u90/TU1mY2ldX1CbyNG2qrSL0IbHIxs7yayEmMloAzDFUj3drdr1hGNqSEZm9 X-Received: by 2002:a63:9d8d:: with SMTP id i135mr62180011pgd.245.1558170633751; Sat, 18 May 2019 02:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558170633; cv=none; d=google.com; s=arc-20160816; b=DZjbYlpKXwBedJHVYXXbZ1Oo5EHPcaZiqeP8ynVZqfGCJ8EQpMQmIuhNBO3wwZcqh8 dq0NgRWJEEZN4nCQKRGYKRKJVKtetSG/W7DLnR4OB1d6wiz9Y1H1kxnppepa3zm1RicF tZHvOFZhMfpCeKm3djOW15qMAidFPSAhhkK1v+lC4bciEXMwvE445YElG/1fIQ+wEbrO GuGk1It3OugmlVeki4UI2aE7gaOV/fkhsEqGRAm1qac7xoSiEtrnYHXRRvItrH4ipalB Qoywnp/mnPn8GMONXOKWpm6DY4foYG3Dc7okvRxZ9GA/7JhgtGFQdsv2RKnljGHmC51F N2FQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=JMJMxJ4pxlUz8asklfXu2+f43mE5Z5/GW0LwxKJU/nI=; b=OGDkCa/OTBce8mqUFDERQHUqmYfQSq6N7VAOdfEdpqEjUTX6LhY3cOmYYDkOkaNqs3 d42PiI7VO/o411LvD23uWVAx+CSEn0QpKSzzR8XUYiG9OFWjqczfNaPmfM/Ymtz3YAAA TCQGE9LHyCWrku8Hd7eQY2nv4pTt2F6S1N9EFxYOdsXrBBTKgGkoOBffmIU+HpLerZwX Sy6vgXxmMB1Nw4hBYng2Rlw2HbnNZXwPEm3Gfh8K0HHwQWEuKH7wYFlsmMObKyCCOknx PWbA55Hl1OPDtEv3P8KJnb1s54PmNkvzoSrtxiD1PzI0xNhsx21uVl4gIOOgOHY2dUr8 cyLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ctp4zeKD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q135si10064660pgq.429.2019.05.18.02.10.17; Sat, 18 May 2019 02:10:33 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ctp4zeKD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729704AbfERJJC (ORCPT + 99 others); Sat, 18 May 2019 05:09:02 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:33404 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbfERJJB (ORCPT ); Sat, 18 May 2019 05:09:01 -0400 Received: by mail-lf1-f66.google.com with SMTP id x132so7006257lfd.0; Sat, 18 May 2019 02:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JMJMxJ4pxlUz8asklfXu2+f43mE5Z5/GW0LwxKJU/nI=; b=Ctp4zeKDTdrgBiXbI4X8Zcrd9YuEgiitY8MhoX5s6yaOPgi3ig821+yXq3T3EYw2Hv 8rAnvJrac4pPcY1mZmlqCQ12K77lOlFTfuQJ5f6hfssXLukOlcGLhyY+WmzvcdGs3lOd qs1QudsMYyz3+0VdkKCCn8FUkJu5t5dlBgtd4CzgC5D+C0V/aoFjFz6hWkWKhapSkEwY S3gtNWLfL6A/SHFn20zzJWhakp7mjc4vEJjBX1lpofL/aKXti4XyhsPstG9qaZ2hUHQ1 BFguhbaSwauVckqL3Fv6eiM/V9e0PNXd2xIThaq8QEGkmB3R/Qfl+BAZMYIAM0l1Gr+L gnZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JMJMxJ4pxlUz8asklfXu2+f43mE5Z5/GW0LwxKJU/nI=; b=I8pHsiHi8Zs+1R9n6x8Ba5OwiI4R9G040zwC+JNvNejLw2Lm5zrQEV8200mPtGmLI7 GsVU9PyynyVIIg1DsbZwg0d/PP+8kBltQqaXxDJc0E9XY8BYYMyZ8bXhxTB9pN2Bmh3S tbrG8GbR2kl5gn/y5flDpfWGrorA6ipqY4F32Ap3ItFTaSmuZiM2yQwqLNtGamZmFP4w APceDaicNHyPiFXrqNybqnHkkKB5lCv7pCm+h1jo2h+73IsWzGCW7r0UZKhicAsEAbtP ahV4qIzTY0uAjMBjsxOvS9sBhDDq9aGAdGhb4AWuuEVY+JXYMLtI2SG+7qw56+56jGe0 KIMw== X-Gm-Message-State: APjAAAXeR+4Z1Ow3UQuql2/v8elH3RUReJAw/BnAgdp2orQaKr0zv2P5 S/z+v4nNYI4vc84c4ppMbeBLig+a2aw= X-Received: by 2002:a05:6512:309:: with SMTP id t9mr29680176lfp.103.1558170539702; Sat, 18 May 2019 02:08:59 -0700 (PDT) Received: from [192.168.1.111] ([77.123.15.14]) by smtp.googlemail.com with ESMTPSA id f21sm2211511ljk.94.2019.05.18.02.08.58 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sat, 18 May 2019 02:08:58 -0700 (PDT) Subject: Re: [PATCH v3] HID: fix A4Tech horizontal scrolling To: =?UTF-8?B?QsWCYcW8ZWogU3pjenlnaWXFgg==?= Cc: peter.hutterer@who-t.net, Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190507050029.GA5197@jelly> <20190512203313.18756-1-spaz16@wp.pl> From: Igor Kushnir Message-ID: <858498ef-b43a-f382-bfbc-e3a2ac9935e4@gmail.com> Date: Sat, 18 May 2019 12:08:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190512203313.18756-1-spaz16@wp.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: uk-UA Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! I have verified that the PATCH v3 applied to kernel 5.0.15 fixes horizontal scrolling for my A4Tech WOP-49Z mouse just as well as the previous patch did. Thank you, Igor On 5/12/19 11:33 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. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=203369 > Fixes: 2dc702c991e3774af9d7ce410eef410ca9e2357e ("HID: input: use the > Resolution Multiplier for high-resolution scrolling") > > Signed-off-by: Błażej Szczygieł > --- > Changes in v2: > - changed commit message > > Changes in v3: > - send also high resolution events > > drivers/hid/hid-a4tech.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c > index 9428ea7cdf8a..c3a6ce3613fe 100644 > --- a/drivers/hid/hid-a4tech.c > +++ b/drivers/hid/hid-a4tech.c > @@ -38,8 +38,10 @@ 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); > + set_bit(REL_HWHEEL_HI_RES, *bit); > + } > > if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) > return -1; > @@ -60,7 +62,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; > } > @@ -68,6 +70,8 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field, > if (usage->hid == 0x000100b8) { > input_event(input, EV_REL, value ? REL_HWHEEL : > REL_WHEEL, a4->delayed_value); > + input_event(input, EV_REL, value ? REL_HWHEEL_HI_RES : > + REL_WHEEL_HI_RES, a4->delayed_value * 120); > return 1; > } > } > @@ -77,8 +81,9 @@ 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); > + input_event(input, usage->type, REL_HWHEEL_HI_RES, value * 120); > return 1; > } > >