From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25818C433B4 for ; Wed, 14 Apr 2021 11:23:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0222B61158 for ; Wed, 14 Apr 2021 11:23:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348948AbhDNLXX (ORCPT ); Wed, 14 Apr 2021 07:23:23 -0400 Received: from smtpcmd01-sp1.aruba.it ([62.149.158.218]:45732 "EHLO smtpcmd01-sp1.aruba.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348954AbhDNLXU (ORCPT ); Wed, 14 Apr 2021 07:23:20 -0400 Received: from [192.168.126.129] ([146.241.148.6]) by Aruba Outgoing Smtp with ESMTPSA id WdbjllVNnkdBBWdbkl2XjH; Wed, 14 Apr 2021 13:22:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1618399377; bh=0F+vBt2TA34xwOMDg/rFjQNTe2kOJ5mDE5te0iNhXEY=; h=Subject:To:From:Date:MIME-Version:Content-Type; b=GTALKCDYaxeYuVDCyggMObVlGXrqVxKKYCYtbBDS7S/XJ2MCfs15CkYR0vBUfQuYu 78p5qNX91vwWQAdONSIysEiNYSGrSNdBcDYOV0Il2bEmYe/7hCQ1rDmp6U8wQlglN1 O9UrJHu0CntpsFmsheAduFLWES5nWfzqUBTj1jlhbTJF8yGEqiIO+N7VlsH1Y22B69 B/is15dvY6hRgr8wL/XfOprDlzCTlJyiUSsgiKbEZyMxa6Lc8Op/49Oq1585PIbfoX dbwJsI01Lu6YCxbgFSUtmqdY2hGOrafFlE+HiDLYMTtepagTw8gFoC65jgNEzgKv5z Qj1EIxHju9Kcg== Subject: Re: [PATCH v7 3/3] Input: add driver for the Hycon HY46XX touchpanel series To: Peter Hutterer , Dmitry Torokhov Cc: Rob Herring , =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210413144446.2277817-1-giulio.benetti@benettiengineering.com> <20210413144446.2277817-4-giulio.benetti@benettiengineering.com> From: Giulio Benetti Message-ID: <080a71d9-d629-5589-c943-4e65a7f414d8@benettiengineering.com> Date: Wed, 14 Apr 2021 13:22:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfM7avIgFexNNvYx1guTyVc0Xmp2xddnI0yXtpkWYal7MGcfx7EvEZDqXSh7odITtGiUqYV1J1BX+HN9jGj/Zm730JLoyQ88cL9VfD5Rp4MAIcH+LYOGN 2yWnnZkFcGp6L3L5/RkPTOImvvxeuILImclUFkVK3flqLQX9BuSzN2amk7oWj0rN+ACpeRN7rYEH0nFp7WU9dK3RzJAL+BTE5LwZdQwW8m1PcbpR54Svkf4Q 2pBtnCJPBN1lM+oBs1bqY3oDndEImaHzbul1oBT97VgN+tt1e3Eg++Q3yG76qtZzk7tgqlziZKnPXypKwsdkqwUSKt7Gk0kppvbyP2ilVsj6v8h1JD0zperH l2qAYeXUn8pfq3Z0JUEEepTSjUTVfxZOdqpVSRmYPVcUWyvajOLn/0nwvOWE3L2lzXKPe2F92HYit+6GImKFObbarQvz7FFldx7tI6kuPeTd0A6TOYM= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, Dmitry, On 4/14/21 8:46 AM, Peter Hutterer wrote: > On Tue, Apr 13, 2021 at 10:44:07PM -0700, Dmitry Torokhov wrote: >> Hi Giulio, >> >> On Tue, Apr 13, 2021 at 04:44:46PM +0200, Giulio Benetti wrote: >>> + >>> + input_mt_report_pointer_emulation(tsdata->input, true); >> >> For touchscreens it does not make much sense to report BTN_DOUBLETAP, >> BTN_TRIPLETAP, etc, events (they are really for touchpads), so I changed >> this to >> >> input_mt_report_pointer_emulation(tsdata->input, false); >> >> to only report ABS_X, ABS_Y, and BTN_TOUCH, and applied. > > Can you expand on this please, just to make sure I'm not misinterpreting > those codes? Those bits are just for how many fingers are down (but without > position), dropping those bits means you restrict the device to a pure > single-touch screen. Or am I missing something here? I've re-tested the driver after setting input_mt_report_pointer_emulation() use_count to false. It works correctly with all touch points expected. That use_count refers to finger count of Touchpad[1]. Also you can see that even with use_count=false this for loop[2] is entered by counting all the mt->slots and then input_event() reports all of them. I hope I've understood correctly :-) [1]: https://elixir.bootlin.com/linux/v5.12-rc7/source/drivers/input/input-mt.c#L190 [2]: https://elixir.bootlin.com/linux/v5.12-rc7/source/drivers/input/input-mt.c#L208 > then again, MT support has been in the kernel for long enough that by now > everything should understand it, so there's a certain "meh" factor. > > Cheers, > Peter > Best regards -- Giulio Benetti Benetti Engineering sas