Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3299728pxb; Fri, 4 Feb 2022 05:53:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoyngbZdVJyOMblEsxSvLrlJiohzhz5Rm4bnyki8Zaxywe2DkAUIG35warhxDr8eoYHftS X-Received: by 2002:a05:6402:125a:: with SMTP id l26mr3137967edw.455.1643982791248; Fri, 04 Feb 2022 05:53:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643982791; cv=none; d=google.com; s=arc-20160816; b=jfLXTu9QgAe0Cn89h5R/EuZ120TEkdGK+X305YGI7jUc3G4buxeWbN1KK7tRD+4AtV 5Y1nyNJ4mMNw0Vp57inQ0AxeFX6c8yUqKpKloMW16zrOHc2WvqoQjII/jT6ZjbpJ6ZzG /Nq+YWX+SFiUeLm96hHgVRfs6b1TxEeDQhm84VJpqtiSCqZtW8VQRkM3F01dqCtndCDt gSbrjnANRGFw48WJp4N/kJTktgFxbIAYtXoxwmL0GtIYWl+uyyvm0hYqrtzgwP8rzvi/ 8MO+F6km4mjNtih1l1xQO9zB8c9CqVxsZCpIBt/chBcKq/3dQY8x9sLCa1eaATXpZ/Q2 Pvsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6VJokSHsxPkfQMrVgiQDizkBiRMjzQ+sHIs7SD0nGIk=; b=SNlagR0aviviCFIzZg3LGEbctoBbbIEoM5+54CKWglqnFXGZo/UFEXyMKLZpoXFdfN C4uT0tYC/x+6kABIwjGwHyF7aUAjF4MR6J66AbCtZ5jaMoB1IbdvRd8ZJ8notMkdgwfJ AeUl/GJSKXSkgwJy7gdNDgiMrVWrLMbxZV8DC3xdh0fnwk+vFr9d2YYxxNm0Fmd0H4zV lExn+C32WItltwYTORgf5fcFyX9H0hgrmFdFTOI2LpUyAwTFcb+0sdCo6PtGwn7PBkZg qvzQBHzXBNMX0d1TnHN2kDuAhweyiQK0O+gGGuKWmSGp6IgseXzsW08/zZC+E3rO8v// S2gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KpUzOcyx; 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 hb7si1279412ejc.437.2022.02.04.05.52.43; Fri, 04 Feb 2022 05:53:11 -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=KpUzOcyx; 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 S1351846AbiBCOgc (ORCPT + 99 others); Thu, 3 Feb 2022 09:36:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:29119 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351445AbiBCOeB (ORCPT ); Thu, 3 Feb 2022 09:34:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643898841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6VJokSHsxPkfQMrVgiQDizkBiRMjzQ+sHIs7SD0nGIk=; b=KpUzOcyxzIJZRNkXTEFE01tbQQPE2xFcOYcUt5GNnNjY/3xO2LDJwIr5th+oezdU2+OJrA EEZFwd+tkexa9PaMhF/jvsw5B77nEqLwlT94bw6DatXW3i/MeJnt1MI1DD5cvkdn3zIbG3 oXZ1IvVrbMYXzSJ0LDbQ1JTwZjo2hPQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-21-vBG71VSYM-W7fbjWzrH9pA-1; Thu, 03 Feb 2022 09:33:56 -0500 X-MC-Unique: vBG71VSYM-W7fbjWzrH9pA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00A6F1091DA0; Thu, 3 Feb 2022 14:33:54 +0000 (UTC) Received: from plouf.redhat.com (unknown [10.39.192.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id 650947D4D0; Thu, 3 Feb 2022 14:33:51 +0000 (UTC) From: Benjamin Tissoires To: Jiri Kosina , Dmitry Torokhov , Jonathan Corbet , =?UTF-8?q?Ahelenia=20Ziemia=C5=84ska?= , Ping Cheng , Aaron Armstrong Skomra , Jason Gerecke , Peter Hutterer Cc: linux-input@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires Subject: [PATCH v2 12/12] Input: docs: add more details on the use of BTN_TOOL Date: Thu, 3 Feb 2022 15:32:26 +0100 Message-Id: <20220203143226.4023622-13-benjamin.tissoires@redhat.com> In-Reply-To: <20220203143226.4023622-1-benjamin.tissoires@redhat.com> References: <20220203143226.4023622-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- changes in v2: - changed to explain that switching tool in one EV_SYN report is not nice for userspace --- Documentation/input/event-codes.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst index b24ae7d292cc..8741d390b184 100644 --- a/Documentation/input/event-codes.rst +++ b/Documentation/input/event-codes.rst @@ -137,7 +137,11 @@ 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. 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. * BTN_TOUCH: -- 2.33.1