Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4483711yba; Sun, 12 May 2019 14:14:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTB+q51DvzidDdlAB/OBT1SleiyJmlqL4Tv3CRJRCKXR9UZONPu6uvmVLqauKoheX0r51W X-Received: by 2002:a63:5b58:: with SMTP id l24mr26652848pgm.139.1557695641649; Sun, 12 May 2019 14:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557695641; cv=none; d=google.com; s=arc-20160816; b=Nr3hzSiIgcQd4wIDZADKD6V+rEvlNojsPtzfoeQjXL69YmBbcXzRNLS49wswDkz186 DT7ObVDoQ42t/s9vwI85Q/EKf1AqtmTzDDkCLm0MMA/XOzlqHemFJvi5HSnMc9TLjddb /md9BZVy+XiB1b9ywxKBXxMOBhNqq3DjsHnHS4MPiCJrQSyfgFPcbhV8LLm3Kg+sy2vN SFzZ9j2ACxkH57VMF2D7QgPOxED7agvvw/TmFvHw1gPNqY9GH2GyBQq/Gabe+NokTjB2 jkamehERIfFDg/M6ZdK9IYIp4OUxzg6XB0LrTnyzRcSl4EbXc1FwT3C1GseRxhldpZrS 3Y+w== 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=iyiQTrIWFatOO2FrWGC5Ae8DDFTrjkzZbDAhPWkurEg=; b=aN0BYNB4vf4yKaiBsnECeSodUTmuZxEhhrhDVxQ5QMXx7Wh+nfCwB5CDonjYFwoMIb 5BlwtUjD6Owb4dX3P7Kl0DZwRTlwlG0kDTWDMaAo56Gfmr675A+zXO68m9K22bjcOC4w xy8TcXr1lDxXdmn0z0N4d4BGJRAonKBhWMMy2SOtFZyA7Zh7WTXzBhSdcBhK/G9KymFR HVUh3Zz+NYeN7FQ/YjwOo5DUF3cs+OiekhTGZNdLHEZUlFQc4XkyQHPs1DCEtcpjD99D wIg2jVujgsYoYzXB+LFcJmBa0NvYAuzrkk2f+ZFStmQAsWbDmr9ZgExLv7H0vZpGUT9d Vh6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@wp.pl header.s=1024a header.b=uNU20vHk; 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 v11si17084347pfa.240.2019.05.12.14.13.43; Sun, 12 May 2019 14:14:01 -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=uNU20vHk; 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 S1727054AbfELU7g (ORCPT + 99 others); Sun, 12 May 2019 16:59:36 -0400 Received: from mx4.wp.pl ([212.77.101.11]:52142 "EHLO mx4.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726909AbfELU7g (ORCPT ); Sun, 12 May 2019 16:59:36 -0400 Received: (wp-smtpd smtp.wp.pl 4272 invoked from network); 12 May 2019 22:59:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1557694773; bh=iyiQTrIWFatOO2FrWGC5Ae8DDFTrjkzZbDAhPWkurEg=; h=Subject:To:Cc:From; b=uNU20vHkGDzKtwImgBNkc0B+4XnFRPuquVdy+PJLYlIQH0bA9cvvKhXZCPRVYEXj0 VR/94dli6VW9LlaYuJZX1tuU6d1Hczn97ikMkEipwMnZm1vXdGcqNXhkVeum9m5MTW dzSetjp75ALxH2ABxhJsf2Vesn0KglgPwpHuiDOw= 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 ; 12 May 2019 22:59:33 +0200 Subject: Re: [PATCH] HID: fix A4Tech horizontal scrolling To: Peter Hutterer Cc: Benjamin Tissoires , Igor Kushnir , Jiri Kosina , "open list:HID CORE LAYER" , lkml References: <20190502213639.7632-1-spaz16@wp.pl> <1a40ea07-368a-93f6-8335-dec7ae50bbf4@gmail.com> <20190507050150.GA9838@jelly> From: =?UTF-8?B?QsWCYcW8ZWogU3pjenlnaWXFgg==?= Message-ID: <549757a1-33b5-e460-d6e7-ee766a792c27@wp.pl> Date: Sun, 12 May 2019 22:59:33 +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: <20190507050150.GA9838@jelly> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-WP-MailID: b67fab14069587d2b61ea64472ce62d8 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000A [MQP0] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 07.05.2019 at 07:01, Peter Hutterer wrote: > On Fri, May 03, 2019 at 01:59:23PM +0200, Benjamin Tissoires wrote: >> Hi, >> >> On Fri, May 3, 2019 at 11:43 AM Igor Kushnir wrote: >>> >>> Hi Benjamin, >>> >>> On 5/3/19 10:36 AM, Benjamin Tissoires wrote: >>>> 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. >>> >>> >>> If you mean exporting REL_HWHEEL_HI_RES instead of REL_HWHEEL from >>> hid-a4tech.c, then it makes sense to me, though I do not know the code >>> well enough to be certain. >> >> Yep, that's what I meant. I am worried that userspace doesn't know >> well how to deal with a device that mixes the new and old REL_WHEEL >> events. > > sorry, I'm not sure what you mean here. The new events are always mixed with > the old ones anyway, and both should be treated as separate event streams. > The kernel interface to userspace is fairly easy to deal with, it's the rest > that's a bit of mess. > > [..] > >>> >> >> OK, thanks both of you for your logs, this is helpful. >> So just in case I need to come back later, the horizontal wheel is >> "just" the normal wheel plus a modifier in the report. >> >> Anyway, ideally, can we have a v2 of the patch with the 2 changes >> requested above in the commit message and the introduction of >> REL_HWHEEL_HI_RES events in addition to REL_HWHEEL? >> REL_HWHEEL_HI_RES should report `120*value` and we should also keep >> the reporting of REL_WHEEL as it is currently. >> >> Peter, I grepped in the hid code, and it seems hid-cypress.c is having >> the exact same issue. Sigh. > > yeah, I found that too when grepping through it. seems to be the only other > one though and we can use Błażej's patch as boilerplate once it's done. Peter, I also found comparison of "usage->code ==" with "REL_HWHEEL" and "REL_WHEEL" in hid-lenovo.c, hid-apple.c, hid-ezkey.c, hid-lg.c. Unfortunatelly, I don't have such devices to test :( Cheers, Błażej.