Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1351601imm; Wed, 25 Jul 2018 16:43:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcrqHm1dlJ+XKzcxLR+mYCEH7u3otPpT/J0LfZHmK/YGbTse5JGJaF4fmK+bQyG661iTC/m X-Received: by 2002:a63:2106:: with SMTP id h6-v6mr22343365pgh.161.1532562205846; Wed, 25 Jul 2018 16:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532562205; cv=none; d=google.com; s=arc-20160816; b=XErVGVEXL+v81NG8ZR7k8oy/O8Dt3kxsX1ghBV9lnvw6LjSJjUMe6jpkqYssjTGMJH KPaJG7VrwR0f5v5vCbT1ANs4/CQMEAS2WkqBvMMJGn+2O//F1nAkPGylIW6F2fWEWHR+ V+5fyvblWY6ATRPEsRB40b+nhvFelhE4PQBICQj+bWSGp90T42wCzd1Hzp7T+X+ZEi96 3DHcxV8zSUXLRuUXYF2oYKs/LjiVA4kXBAaZrWjOvYZXcU9042r1hooo7k/NLNlAbaRR cAVuwVeOCXRVs9HKttzMPjUNMbXP59pE1A6gmENbkSK/7y5eo/CrQKVy9IbQlOY9y/Gt oxvQ== 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:dkim-signature:arc-authentication-results; bh=DXiR6jobdeTgdgZHolqSeWE5AY8vuP2Jb++cjJkWkSo=; b=sBweA2eDX5cVNX4MtKA01MhbYxb2m5avFJ9HysdE5zkwE523jXAM/dJrq7wHS+GCW5 ot5Yp7FIliSFSd88pVd7Ao+mLGAp2kIZTA2jfXDRorjbGCeg1fyYpZQpJBZSfg4AH2W4 YOXZVFjnb82a1OMbZCCRmS9xaySC7hOWfT8lRzYsVsOQQI7CrbaGpdnUuZtiv1iibfzu a2QaVySStvkF/5L5dN/9pZeTD1qEddFNXlS8yDSW7xkEJFIgrz3px2D7yjpp0NjmSW9g 5KiU8VOaG10Vj8egs3oc+tmZnQr2w3RDue5veq6yQSBK8p1DWB9wrvcsnB2hN7WhBD/C gnig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="PwJ/vPPc"; 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 x25-v6si16344836pfi.138.2018.07.25.16.43.11; Wed, 25 Jul 2018 16:43:25 -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="PwJ/vPPc"; 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 S1731632AbeGZAfJ (ORCPT + 99 others); Wed, 25 Jul 2018 20:35:09 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44381 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731420AbeGZAfJ (ORCPT ); Wed, 25 Jul 2018 20:35:09 -0400 Received: by mail-pg1-f195.google.com with SMTP id r1-v6so6264215pgp.11; Wed, 25 Jul 2018 16:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DXiR6jobdeTgdgZHolqSeWE5AY8vuP2Jb++cjJkWkSo=; b=PwJ/vPPcDxXxGV/SyE6w4rQyHGP0XVXE6vIxjHQRBf1vqzFPrj9NMz+Z4sddUEjNvU gC1CCXfHyZLhgL07Xc8Ejcno7GI6Y6X/SlRjosyIxWbu7djZ45apiU5XEK2qNRCzZqpi 9RYyJQhJNA4Zc14PYR/bYHclQKgri5u8gCH4TBq4oyIrIJw8yodGXuq+vwbkFAKa4/mb t5Eg4rz5veTRIsGAfh8nL/RU9HdIIsH3npR8jr/L+AExzdtORlzSqWNb2/+GpGhX+oCE gzIkslQwmlx6NHsYfx1PmLmUIY3/1YQNDeYekEgtcKkB6oTHVjoWnNZxFv6SgSrb1mJh ksAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DXiR6jobdeTgdgZHolqSeWE5AY8vuP2Jb++cjJkWkSo=; b=ayrcdF9jrx9mEWMhhBVHFziO2W2X/BnDUeZC8JpDtEbLRj8jcwaKMrM1DSMsd1Urkq CbA+EeZZdYLpT3ol83532yXxZWBS2BZx+nV2NFdhMbnJ6A+sMTr7XX5y6b99gu1Dm6GD 2+l9dEpW2uuu2qK/+0brLkDJy5FbBlrJfXKInCeseEu9bySw7TItfERF1bNcEzNqQ9IW f/DKiCnLL3TjkkBbNZLCmbcJsOLs+11wsxhOSvUojIm7zDtVNBmU/g8mGJyCZ7lKAyiS q7fQrXwMVGYM4r2tkshiHmx1BIvqMFrWjhnw0Skl9g0ng+Z570rxhSJ8p+bCDutt8Olm c0Zw== X-Gm-Message-State: AOUpUlHMiJwWdHiRrepHSaH59Jxbkd0lIPxvywKQAKhy+KSwq8JA50nl IHNtaugGKCUCvRLKANbd5AQ= X-Received: by 2002:a62:4ece:: with SMTP id c197-v6mr13297389pfb.240.1532560873285; Wed, 25 Jul 2018 16:21:13 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id p66-v6sm41382143pfd.65.2018.07.25.16.21.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 16:21:12 -0700 (PDT) Date: Wed, 25 Jul 2018 16:21:10 -0700 From: Dmitry Torokhov To: Peter Hutterer Cc: Benjamin Tissoires , 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: <20180725232110.GA80336@dtor-ws> References: <20180720215122.23558-1-nick@shmanahar.org> <20180720215122.23558-9-nick@shmanahar.org> <20180723223347.GJ100814@dtor-ws> <20180725052641.GA7072@jelly> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180725052641.GA7072@jelly> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 25, 2018 at 03:26:41PM +1000, Peter Hutterer wrote: > 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. Hmm, I do like the "input_mt_close_slot()", or "input_mt_report_slot_inactive()". I think the input_mt_report_slot_state() is fine for "opening" the slot, as, with it now returning bool, we can do: if (input_mt_report_slot_state(dev, MT_TOOL_FINGER, state)) { ... < report events for active slot > } Thanks. -- Dmitry