Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp331646yba; Fri, 3 May 2019 02:44:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXYkN1j5vUh/15cfFEyiNcIFFYFZHfLv2RVA9mQ7TYRiiNZQ7khx3dGPo7iF2+ediEGf9U X-Received: by 2002:a62:5ec4:: with SMTP id s187mr5571124pfb.185.1556876650917; Fri, 03 May 2019 02:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556876650; cv=none; d=google.com; s=arc-20160816; b=BIamL3ZJWjz6/+O3anoEjdLq63+8+gHpa7DMwzyn3m/px7KQMRYlqhN1pyZKv59SkK V0sY4re9gFM24HmjO0gDfnK2FULP/aVqeagU0YcdUihtptxOwRWIfNUqf9N1/YzCuOa3 C8IIWapQ+3/tfSorvm27FAUjoWZVHoCn11D1VExFVVPICtqleB6qDe7XtSoswNaZMtN6 b4OVBXiJyNPD4koTVMcmm07pVIhmIjrHeyKtXGHhYqlV8x03V0ngIDRPGYE+c0se1Tvf WQoJ+TczJDM+FLZD/8GaCy926DWV1TzDzbsYZr8nCrKy+A6W9FwtxtdtF1777snGjSA/ YgAw== 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=GEshtnqIYYZFrwLt+PDrblczKzunXgnIFfS/61z3xfg=; b=Lue/HzQxFuH3JpM/PZlqDBryDXmkWf56IOqkCF/Y9PMT18Q7I+S5uO5INAeD5Q2vDp BJh/kP2MI75e/ukbj2YdjgmHaGVfej5LVTNnUK2BdNb5AYpo8cj4XgSU+LIAHkaBwtCL pPANtpv8J2b3Fs6sWQpmLW/3b24h28zard/kNN8uFrruSuRGoG97y92Vk/P60hAVp799 obO4pi6ijn4el4R+olhS53gPC1xPAr6aGrYKHvMHwr839lqTSGJA6fesIUrYyJy2ge3H i0+eI80AF9PbFvWe40SG1i5H/dU5Eu3qKPb0LqekcznLtzC6JmhtRM1WwW06r4kkH9PC BPeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@wp.pl header.s=1024a header.b=svEcGncO; 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=NONE dis=NONE) header.from=wp.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30si1775157plc.8.2019.05.03.02.43.54; Fri, 03 May 2019 02:44:10 -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 (test mode) header.i=@wp.pl header.s=1024a header.b=svEcGncO; 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=NONE dis=NONE) header.from=wp.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727204AbfECJWQ (ORCPT + 99 others); Fri, 3 May 2019 05:22:16 -0400 Received: from mx4.wp.pl ([212.77.101.11]:23790 "EHLO mx4.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726391AbfECJWQ (ORCPT ); Fri, 3 May 2019 05:22:16 -0400 Received: (wp-smtpd smtp.wp.pl 15166 invoked from network); 3 May 2019 11:22:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1556875332; bh=GEshtnqIYYZFrwLt+PDrblczKzunXgnIFfS/61z3xfg=; h=Subject:To:Cc:From; b=svEcGncOWG5uDdAea3/4X3uky+g7bwmKsU0JiMFqBtVVf6/+JVcrvO69JTbUBhc1L ujcKpzJ04etI0lVcWuz0upOjwBzg7D8lDgL8FoEHZpk898wZe9exFymHPfMtVPaDPl tiueAjM47kbjOynN1EW9r5FBSxvAZdBW+1fksseg= Received: from pc-201-108-240-185-static.strong-pc.com (HELO [192.168.0.9]) (spaz16@wp.pl@[185.240.108.201]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 3 May 2019 11:22:12 +0200 Subject: Re: [PATCH] HID: fix A4Tech horizontal scrolling To: Benjamin Tissoires Cc: igorkuo@gmail.com, Jiri Kosina , "open list:HID CORE LAYER" , lkml References: <20190502213639.7632-1-spaz16@wp.pl> From: =?UTF-8?B?QsWCYcW8ZWogU3pjenlnaWXFgg==?= Message-ID: <70982912-b172-b5dd-a875-fd0e7b378430@wp.pl> Date: Fri, 3 May 2019 11:22:12 +0200 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GH Content-Transfer-Encoding: 8bit X-WP-MailID: 47bc0eb0d8531d3a9a08b3616fce268f X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000A [QdMk] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I used the hid-record tool and my results are here: https://gitlab.com/snippets/1853568 Cheers, Błażej > 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 >>