Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2460326rdg; Mon, 14 Aug 2023 03:23:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVBs4GgXpQjMIBc1D4RNdmBJw8ow9aUWsgNcDi+3YH5Ug3bQ461AoPXkjaqwaivO6CH2CU X-Received: by 2002:a05:6a00:10cd:b0:67f:3dcd:bc00 with SMTP id d13-20020a056a0010cd00b0067f3dcdbc00mr11353113pfu.2.1692008608159; Mon, 14 Aug 2023 03:23:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692008608; cv=none; d=google.com; s=arc-20160816; b=FNq850AhLn5TCjwrKZnlmz5PwfpPNua1RxTIzhSgn7+dBpHEb5i2ZECMgpH1/L6e7E zeIMVeJQDPl+zAh765JAI8GutOEC+U/1PzX/kjBLLwdg9TsVq3MXKngoDT+AjOhcFJ5U BW4lNQeEZHmNGC6Txo+6t260tqeskfR1ROxFTJpr9PBwypFq6G4j5pS8j0p3kHL65Mcw TtfbUCmI4BRph/nNeebY5Gxla7uP0kWMUbkmvKc8N1hOk9Fgcu+PgUsVGQKpXt8zvLta V5pi8C7n5VYe8YIxVCmYph4uYGTnxMTCXLGcRBl4zWnFntW1fl1qHWHuABQphuya3Ymm OPhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=jgvKYqEDGbRP1ZbFQMOyQu2xgIwiu2BzB3OedC6r+0c=; fh=UbkRHZlhEvvHiHJ7sA8QxfaY0wmpXz3XSs3fnSkMDL8=; b=JWJ4nMTjwr8TrLkz7qyTFya/TjT9buG5E0NvdexaiRLKN8lnTqLMytLFPrOtwwptPW jkiUysAAO+GJBuAazPv/xh39oR/j6OaTTNJBnDNY3zvqluqmEao0w3zpUdGg2QJUdWtZ PzPhaMWtdn4GOitARivx0uFuhV//CsTz81RcXA3Rt6BYA39NiQPK6onbq4u/bMslcb1j YMFcQarVBoJPwE/U8iQKokh4LVh3RKV4u2/kBr5ew8XmHed2cAvk8nQ2uc6PhSeWCjdp XohzOvoszeDJYex5JzGuiyjcaeoKRl3ULZRNX0kZmbGDbjEHtj3GjYgpKZe0majBD+8s W/Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ayL/D07s"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020a65454a000000b00564ca42aad9si7913526pgr.894.2023.08.14.03.23.15; Mon, 14 Aug 2023 03:23:28 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b="ayL/D07s"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230247AbjHNJUi (ORCPT + 99 others); Mon, 14 Aug 2023 05:20:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230394AbjHNJUJ (ORCPT ); Mon, 14 Aug 2023 05:20:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 634B2D7; Mon, 14 Aug 2023 02:20:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F0D516486A; Mon, 14 Aug 2023 09:20:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36761C433C9; Mon, 14 Aug 2023 09:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692004807; bh=Ty8NGGo3JXqkLqy19/JnXSoN8dOjRRuIxGNMQ/ei/yg=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=ayL/D07sybSSXx91QRT+sfjHSv1xt9+FnHggMXSIPVjQT2ONqxYFnfhkSj+mN8IPU R4//m+/pU5sy1y2IV7G6+LMCzADqp/cycW5oNhocoZEtl0Q8hz7vOqM8tbqQDRSGc1 NEmLROUfR8L/bUzwgOIX/9t8hk2A9NEGvvPRLQj9EjLRYqm3Ur3+4wGXRRFL/Z1euw ThLemRoiWudA0feoOVM4bnZE/VgfdnjrRRhVMf8uLBWWBg6ct3Dl+JseG1u9AmPZ2t hHOs7Z4N4rFHGiDVqM5Rs+lDfNb9U05yK/VmnUfuIP+SN+mJMNOKzmROfX9o6Kn5UJ RopzdLqrfyCrw== Date: Mon, 14 Aug 2023 11:20:04 +0200 (CEST) From: Jiri Kosina To: Illia Ostapyshyn cc: Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Nils Fuhler Subject: Re: [PATCH RESEND] HID: input: Support devices sending Eraser without Invert In-Reply-To: <20230613152559.108594-1-ostapyshyn@sra.uni-hannover.de> Message-ID: References: <20230613152559.108594-1-ostapyshyn@sra.uni-hannover.de> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Tue, 13 Jun 2023, Illia Ostapyshyn wrote: > Some digitizers (notably XP-Pen Artist 24) do not report the Invert > usage when erasing. This causes the device to be permanently stuck with > the BTN_TOOL_RUBBER tool after sending Eraser, as Invert is the only > usage that can release the tool. In this state, Touch and Inrange are > no longer reported to userspace, rendering the pen unusable. > > Prior to commit 87562fcd1342 ("HID: input: remove the need for > HID_QUIRK_INVERT"), BTN_TOOL_RUBBER was never set and Eraser events were > simply translated into BTN_TOUCH without causing an inconsistent state. > > Introduce HID_QUIRK_NOINVERT for such digitizers and detect them during > hidinput_configure_usage(). This quirk causes the tool to be released > as soon as Eraser is reported as not set. Set BTN_TOOL_RUBBER in > input->keybit when mapping Eraser. > > Fixes: 87562fcd1342 ("HID: input: remove the need for HID_QUIRK_INVERT") > Co-developed-by: Nils Fuhler > Signed-off-by: Nils Fuhler > Signed-off-by: Illia Ostapyshyn Applied, thanks. > --- > We were wondering about the reason to keep quirk bits reserved for > backward compatibility. Is it because of dynamic quirks at module load > time? Yes, that is indeed the case. Thanks, -- Jiri Kosina SUSE Labs