Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp405760imm; Tue, 24 Jul 2018 22:28:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfa2wzE2qhq4noQSTUkXaZIxQnDQYk5DAiAyRuGu0qa6c7bZPuwREuR/H0EqQfrwgbOBgNV X-Received: by 2002:a63:8dca:: with SMTP id z193-v6mr19185875pgd.228.1532496487267; Tue, 24 Jul 2018 22:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532496487; cv=none; d=google.com; s=arc-20160816; b=Y1cKxGO0rp2FeMMkPdQAl0PhLSo2WEumjWSPH8Zr888UKk7MkIOtghxG4NMOSK4kJN vpu4LpBSXqXWHpULchBeYxE5TjBekQYuLAECz1XtQddPPNLI8hpRe6W/s2nEyC4b+fZM 761wuClvUg4tdKCDACZinBVSKPXYB/RISw51N0TUcEequ+MJ6ue8svt0MFSp/Ou8VGQ3 Ropo9DNsfKxOXbWtqIrFXrfA+D11OLQ0o+TV+MavgNLTbwoQ7NHSsUt/JR6V1fIeYwqA bIxZCn+RdOvgQGQ1qVaI29mbgFtYMX1uTQFFZAPc/rJJ1y3ORAzkirHv2vQMJ0aHXYc+ +cRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=SXRZwzeAcrqTHDVuj2MpF+mxM8tLxNCsoAeJpnldJPU=; b=OmSNY5E/py/V42Cux4x7NPansDmKfYrlsVut4jrJWkD281PeEzP0OCWjm3kYhicxn2 b9vkVQtL4vPWPBpdrxlDkYRYG+mX3IGGWw6seELWIOU3fXZLpx5x6kStYuMx3MtGFuS4 IDEjSP4vP7flTb3XAO9m3Z40ThS7VI5gfsa3tCiNcb+L3naoeQnovymS1wZqUwmeBqrj KM7VYeKI9nDNcxiIybYOlWvz+NBtdt2AEVvF6GACxNZqNhzCM0mwDso7k84SJf787IXP vONVI6TaMyeee8WTTK6XsWbRJmgPR74fD3GBWv6786L7Q2yhiuz0w9iF/Uv8UpTBlDUy xNtQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70-v6si12184113plc.164.2018.07.24.22.27.52; Tue, 24 Jul 2018 22:28:07 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728286AbeGYGgr (ORCPT + 99 others); Wed, 25 Jul 2018 02:36:47 -0400 Received: from leo.clearchain.com ([199.73.29.74]:57605 "EHLO mail.clearchain.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727564AbeGYGgq (ORCPT ); Wed, 25 Jul 2018 02:36:46 -0400 Received: from leo.clearchain.com (localhost [127.0.0.1]) by mail.clearchain.com (8.15.2/8.15.2) with ESMTPS id w6P5QkxS046776 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Jul 2018 14:56:46 +0930 (CST) (envelope-from peter.hutterer@who-t.net) X-Authentication-Warning: leo.clearchain.com: Host localhost [127.0.0.1] claimed to be leo.clearchain.com Received: (from whot@localhost) by leo.clearchain.com (8.15.2/8.15.2/Submit) id w6P5QjNE046773; Wed, 25 Jul 2018 14:56:45 +0930 (CST) (envelope-from peter.hutterer@who-t.net) X-Authentication-Warning: leo.clearchain.com: whot set sender to peter.hutterer@who-t.net using -f Date: Wed, 25 Jul 2018 15:26:41 +1000 From: Peter Hutterer To: Benjamin Tissoires Cc: Dmitry Torokhov , Nick Dyer , lkml , "open list:HID CORE LAYER" , cphealy@gmail.com, nikita.yoush@cogentembedded.com, l.stach@pengutronix.de, nick.dyer@itdev.co.uk Subject: Re: [PATCH v1 09/10] Input: atmel_mxt_ts - tool type is ignored when slot is closed Message-ID: <20180725052641.GA7072@jelly> References: <20180720215122.23558-1-nick@shmanahar.org> <20180720215122.23558-9-nick@shmanahar.org> <20180723223347.GJ100814@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.4.3 (mail.clearchain.com [127.0.0.1]); Wed, 25 Jul 2018 14:56:47 +0930 (CST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 10:23:27AM +0200, Benjamin Tissoires wrote: > On Tue, Jul 24, 2018 at 12:34 AM Dmitry Torokhov > wrote: > > > > On Fri, Jul 20, 2018 at 10:51:21PM +0100, Nick Dyer wrote: > > > From: Nick Dyer > > > > > > input_mt_report_slot_state() ignores the tool when the slot is closed. > > > Remove the tool type from these function calls, which has caused a bit of > > > confusion. > > > > Hmm, maybe we could introduce MT_TOOL_NONE or MT_TOOL_INACTIVE and get > > rid of the 3rd parameter? It will require a bit of macro trickery for a > > release or 2... > > I am not sure what would be the benefit of adding those new tools, if > the input_mt code discards them. Do you want to forward them to the > userspace with the release? > This reminds me the discussion we had recently with the touchscreens > releasing the slots with a MT_TOOL_PALM. > > Anyway, better include Peter as he will be using this new MT_TOOL. thanks for the CC, would've missed this. From what I read this would be a helper for internal changes only, not exposed to userspace? If so maybe it's better/easier/more readable to break it into two functions input_mt_open_slot(dev, MT_TOOL_FINGER) input_mt_close_slot(dev) This removes any ambiguity about the handling of the tool and should be a fairly trivial search/replace. Replace the 'open/close' terminology with whatever suits better. Cheers, Peter > > > Signed-off-by: Nick Dyer > > > --- > > > drivers/input/touchscreen/atmel_mxt_ts.c | 5 ++--- > > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c > > > index d7023d261458..c31af790ef84 100644 > > > --- a/drivers/input/touchscreen/atmel_mxt_ts.c > > > +++ b/drivers/input/touchscreen/atmel_mxt_ts.c > > > @@ -838,8 +838,7 @@ static void mxt_proc_t9_message(struct mxt_data *data, u8 *message) > > > * have happened. > > > */ > > > if (status & MXT_T9_RELEASE) { > > > - input_mt_report_slot_state(input_dev, > > > - MT_TOOL_FINGER, 0); > > > + input_mt_report_slot_state(input_dev, 0, 0); > > > mxt_input_sync(data); > > > } > > > > > > @@ -855,7 +854,7 @@ static void mxt_proc_t9_message(struct mxt_data *data, u8 *message) > > > input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, area); > > > } else { > > > /* Touch no longer active, close out slot */ > > > - input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, 0); > > > + input_mt_report_slot_state(input_dev, 0, 0); > > > } > > > > > > data->update_input = true; > > > -- > > > 2.17.1 > > > > > > > -- > > Dmitry > -- > To unsubscribe from this list: send the line "unsubscribe linux-input" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >