Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5674337pxb; Mon, 14 Feb 2022 05:05:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/XYVVy74BKZvt/OFRk82403TTFWuPj41UehFxzEhaR8hco62J5u30L4equwVXvyu0RZGy X-Received: by 2002:a17:903:2ce:: with SMTP id s14mr13860166plk.171.1644843922913; Mon, 14 Feb 2022 05:05:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644843922; cv=none; d=google.com; s=arc-20160816; b=CvueTZ/pV5482Kf8CvMU9C46B0cyTDhbdoJ2ITTW0jfepfpP77M28pjnznTuzGPVFo quysV54BL1TZmff+AW/vdANAfMZ7fbJLsbfTsRNerllMLKJPFan2ghO3Ie+61DO/rdIP kd3QrxAwgBfs40SZcpzexSxI2KL7ycwfgWFq4yVhAAq5rORRYg6/mdi8PtgOOTuNEGBz DICk+H81hueQtUR/vyACEPvXCJy61pR5NimdGz7uQgG6r5ajfiok4khBFufns0t6Ntac mR+ZshAegYzORoMqd5T4oGjzntvSl8frugIAEuBfq1juH7IxJkj24m0h+pp24yxGGNsN wUXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+l7hpn1bL8odV+gyyAWmIY7KuNRjJIE1ZtTHLa6TWCo=; b=NO6cPzhyOV3WyYZD2LuOq6SikUwLCCT8kbuNZaJ2WCd8rvjlvL2nC8lByY1jsJ0TqK WkF7hu02ysxnKb73lyfTfgdue39c5AhlYzoxgPYWeJHvGSvboW1fXQ6pFBbG29KnS4QN 1WpegmDRVZ5tsM3QNwBWSJXuv7TSAclnitYqQzOIfwg3vL5lqDynUJoGMhUU7lGMyXlv HN4MnCyAhQxd0dAKTMzjVgPV4XkOf/IlQ2f/o6V/DDX3MBNVm9cA14ZsAYp9DuHWuyNu JDAQHf0wkwlc/QgaM4AvrTylEz440WJGP81p7K3bs131j8wYklbZhYJAjAM89DpbS8jr p3HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B8gdDjWw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1si33633297pfu.353.2022.02.14.05.05.06; Mon, 14 Feb 2022 05:05:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B8gdDjWw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350501AbiBNLRN (ORCPT + 99 others); Mon, 14 Feb 2022 06:17:13 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350732AbiBNLRA (ORCPT ); Mon, 14 Feb 2022 06:17:00 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 853B574859 for ; Mon, 14 Feb 2022 02:48:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644835703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+l7hpn1bL8odV+gyyAWmIY7KuNRjJIE1ZtTHLa6TWCo=; b=B8gdDjWwdbW5GBemTkchWxwLMShgLe4OQKs/e46078uHd/HVvBPDJusw3sq7QzbWnAJ5ck gOuoj0ICiWfPNr3IDe2yXxV16Fj7BCIuxGeEJLzt9BvkXUIgkL++KWsUIeK4LVgvfcznac 1Jmh0bhqaEDrHf3CzdhqiuSr1V7RhEM= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-3-5mcpnLKDNYOPDg61ptRFUA-1; Mon, 14 Feb 2022 05:48:22 -0500 X-MC-Unique: 5mcpnLKDNYOPDg61ptRFUA-1 Received: by mail-pj1-f72.google.com with SMTP id s10-20020a17090a948a00b001b96be201f6so6646384pjo.4 for ; Mon, 14 Feb 2022 02:48:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+l7hpn1bL8odV+gyyAWmIY7KuNRjJIE1ZtTHLa6TWCo=; b=BKToftcIch3nSu3tjx1QCdBhOrawcXFim3Oc498dlcWCTVozS9GXXS1024hORWrk2e tjBsTu+uUJSdXTB/FGeBnixms3pCGWas3hYpJboH3FiiDZA5QaJGWpMbL9j8a4+P3JF/ ZiakqhyLs8dpVvdX3DOqFBTLxwcQcYprXeG4X0+uYkXhZbTQ6GHd+Ph+Cbacu2t0LOlJ RqCRVCiqLy3ZSGWqGnDIEg8w1Q7cPzLM8HmOdCVX2o6OKpJalvoQ+o3T0wHhKsIr59Jt tAZ/CYyKP42tPG3H6FldJvPa3//NJH6DZ7cwIb3bPnZSotyjYBitaCDyNxYAWVMw6ven Xa/w== X-Gm-Message-State: AOAM5315YqZXFjgiHRvPlrROfgKDAcOs7caeU4Rhocl3nQfJvOEjB6sL xlL56H/82TuZtyojm7+PzSE/GEnNPvzkQ5MHV9x5cAyhmraOSVaHTAp65kWtKYbqPPTQY1R4F9n FyOqVDeZ9fjAB1PYd1c0t/sZx9kj/k2LfqYlZLWhR X-Received: by 2002:a17:90a:be02:: with SMTP id a2mr14115820pjs.113.1644835701221; Mon, 14 Feb 2022 02:48:21 -0800 (PST) X-Received: by 2002:a17:90a:be02:: with SMTP id a2mr14115801pjs.113.1644835701012; Mon, 14 Feb 2022 02:48:21 -0800 (PST) MIME-Version: 1.0 References: <20220126161832.3193805-1-benjamin.tissoires@redhat.com> <20220126161832.3193805-13-benjamin.tissoires@redhat.com> In-Reply-To: From: Benjamin Tissoires Date: Mon, 14 Feb 2022 11:48:10 +0100 Message-ID: Subject: Re: [PATCH 12/12] Input: docs: add more details on the use of BTN_TOOL To: Peter Hutterer Cc: Jiri Kosina , Dmitry Torokhov , Jonathan Corbet , =?UTF-8?Q?Ahelenia_Ziemia=C5=84ska?= , Ping Cheng , Aaron Armstrong Skomra , Jason Gerecke , "open list:HID CORE LAYER" , Linux Doc Mailing List , lkml Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, Looks like you commented on v1, and I made some changes in the v2 :) On Wed, Feb 9, 2022 at 7:22 AM Peter Hutterer wrote: > > On Wed, Jan 26, 2022 at 05:18:32PM +0100, Benjamin Tissoires wrote: > > The HID core stack used to be very relaxed considering the BTN_TOOL_* > > usage. With the recent commits, we should now enforce to have only one > > tool at a time, meaning that we can now express that requirement in the > > docs. > > > > Signed-off-by: Benjamin Tissoires > > --- > > Documentation/input/event-codes.rst | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst > > index b24ae7d292cc..41b1fa647dab 100644 > > --- a/Documentation/input/event-codes.rst > > +++ b/Documentation/input/event-codes.rst > > @@ -137,7 +137,10 @@ A few EV_KEY codes have special meanings: > > code should be set to a value of 1. When the tool is no longer interacting > > with the input device, the BTN_TOOL_ code should be reset to 0. All > > trackpads, tablets, and touchscreens should use at least one BTN_TOOL_ > > - code when events are generated. > > + code when events are generated. Likewise all trackpads, tablets, and > > + touchscreens should export only one BTN_TOOL_ at a time. It is > > s/export/set to nonzero/ to avoid any ambiguity with setting the evbit on the > device vs setting the value to nonzero. I can carry this change in the v3. > > > + however accepted to switch tool in one EV_SYN frame by setting the old > > + BTN_TOOL_ at a value of 0 and the new one at 1. > > I would even s/accepted/recommended/ but this LGTM to me, thanks. In v2 I used recommended, but I turned the meaning the other way around. In the v2 it reads: "To not break existing userspace, it is recommended to not switch tool in one EV_SYN frame but first emitting the old BTN_TOOL_ at 0, then emit one SYN_REPORT and then set the new BTN_TOOL_ at 1." So maybe I should use "accepted" in v3? > > Acked-by: Peter Hutterer Do I keep your acked-by in the v2/3? Cheers, Benjamin