Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp863026pxb; Fri, 22 Apr 2022 12:55:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/GA/sVUlGjktGYJ6LK/AR2ubHpeo3l/JMqUYlY0LLWCWi65kvRYK04TcXK9ZCq2j5IDtu X-Received: by 2002:a05:6a00:1304:b0:4e1:2338:f11e with SMTP id j4-20020a056a00130400b004e12338f11emr6767919pfu.24.1650657327865; Fri, 22 Apr 2022 12:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650657327; cv=none; d=google.com; s=arc-20160816; b=0jQpWZjb+zWJftfdc1xJmhjuAkCjTAm1N4QB1YbZbQGP6mYRyt8Ei6e7BLLfzDJJJL GA+5I4gI65y8YMWqAolYaTzkUTfS9ANoFYqh0O5/aU+uOnruqHWW3R6SkWrK8QmuDAzV fYCm/UkqgPs4Mv3+OHSNluomyKto2K2egAe2+1osnxjJYW5SLOkZlBtK8wYfG/b7IQHK 8WS1hCLCM5UzUshyXMlEOEOn0089cQ7CoRLJoomwpQx/iqEKeNLRYvXDjk8NlSJ3HMAC LI2ieAudjTF1GVGz+QnkKDBD+hp435UI2zvGn+b+/sMt/ePgm5wTUaDvktjLpI3ulrGR JU4w== 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=swQTkiKjFD5ptp4W3Ja/W8eTKagq0ceNN+OGlm4hQ/4=; b=feuISP55ZIMljXGC+UrKQb676/3WG5MuQaI/Y95BMM3zCbpiYJsEhgZo3Ld3xioIjD BgT8B0TDbH8vc4nu3H7Aeh4z2GBADPm667z6a8LDHnhNTJNsv9MCcY03BNVmWd7No258 JO2zSCd6qxO2HZ7YKwwXTw/zxnQlG9vOAXgqqicie8wJ9lHVk2qp0GhNgI5SSGNIoPZQ 7I2y/LSiLdAO1oNA7aIKbOckSf6icfWjlXnzwNHQWHqJCdM7YqgD+N/EEq/FZDG5w0mY TqETyAZ0opJriFHKIPo1CQITjHEMqgm5eqUfFyj8dIA7v6d8LGdi9exdUA1qLhZUlvQU LjZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NoPiKXW+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p18-20020a639512000000b003aa8b6e4691si6767010pgd.761.2022.04.22.12.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:55:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NoPiKXW+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C809D23B823; Fri, 22 Apr 2022 12:01:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390969AbiDURyU (ORCPT + 99 others); Thu, 21 Apr 2022 13:54:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390955AbiDURyN (ORCPT ); Thu, 21 Apr 2022 13:54:13 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6786D49CAE; Thu, 21 Apr 2022 10:51:23 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id e2so1460496wrh.7; Thu, 21 Apr 2022 10:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=swQTkiKjFD5ptp4W3Ja/W8eTKagq0ceNN+OGlm4hQ/4=; b=NoPiKXW+7QpOjDKp7ziLUhiCsVn1X8FjKO8AO+JWtvK9ZEZrXXM28kWkJnfsWXH6MW 5cY40nKZbGmAJRZulx5OrFs49VpNkpJ6uRKSP27CxctLa2/P6R1528Iv/tfYWr7/xF2E TF6d2AR4AVOWEtAJDTY6Khvw4JAMmo4QwwT1XcYTmZp0+ac1x67pns3W1J/+EUJAdxDh YTARN/nII2+baMOH3JIPs+z8ysYsqCLmRGUzAm4IzHwBNUqF1jSaWogUuF/HyAGid0zr tTjwFWrI2J0EJ6qhkBa+DiU1BVh12rNnu8e0iHYivIjip9J96ZzKyFXSFYka/uWZcImt xraw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=swQTkiKjFD5ptp4W3Ja/W8eTKagq0ceNN+OGlm4hQ/4=; b=rNyzQQGjitSfbvom9Csl8hCTbBOlA6KFvL5TJDPyicQH/f+8ibAQZjPGMX4xkt7Czy GOvsJrMh3p1/Tgtc9jmwguFBWr1gZYZtG9P8jj+Zrmc+YV6ZDyI5FcuxkhHv0cNqa4VH tx/FcN5Zy2ajBg5KbY9c1xAPTlgCWSdEAW6kExifOkqd6vAM51Q999Ovy9yPcPUTmxic I2WswVXDh3BGV4yHkg/zP3cHBh/WggI6GD4ScogVroDN7QrpxHuOr+hAV2wP7V4OuW09 gjBuplLN1nNmRLgKZF7u7Xk6puajgHmC1b/8xu2jN/dcJZnwAd2FyhsXv4Yd4/OC/5QA xnIQ== X-Gm-Message-State: AOAM531N8qgGhqiWaA90VtKGElYQlpYsqoYnNSJvesRWWvW80hC6x8dP H1/vcZ2OIQbZf9T6rIwMQ4QnaEo9A+U= X-Received: by 2002:adf:b64b:0:b0:207:f20d:23f0 with SMTP id i11-20020adfb64b000000b00207f20d23f0mr643640wre.11.1650563482009; Thu, 21 Apr 2022 10:51:22 -0700 (PDT) Received: from localhost.localdomain ([94.73.37.128]) by smtp.gmail.com with ESMTPSA id l28-20020a05600c1d1c00b0038ece66f1b0sm2685634wms.8.2022.04.21.10.51.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 10:51:21 -0700 (PDT) From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, spbnick@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Subject: [PATCH for-5.19/uclogic 5/5] HID: uclogic: Disable pen usage for Huion keyboard interfaces Date: Thu, 21 Apr 2022 19:50:52 +0200 Message-Id: <20220421175052.911446-6-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220421175052.911446-1-jose.exposito89@gmail.com> References: <20220421175052.911446-1-jose.exposito89@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 From: Nikolai Kondrashov Disable pen usage inputs for Huion interfaces reporting on-the-frame buttons. We don't want to change those, as they mostly work, but we want to avoid creation of a mute pen interface, confusing to users. Signed-off-by: Nikolai Kondrashov Signed-off-by: José Expósito --- drivers/hid/hid-uclogic-params.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c index b85585ac3372..22f9c4f9da8a 100644 --- a/drivers/hid/hid-uclogic-params.c +++ b/drivers/hid/hid-uclogic-params.c @@ -713,7 +713,8 @@ static int uclogic_params_huion_init(struct uclogic_params *params, /* If it's a custom keyboard interface */ if (bInterfaceNumber == 1) { - /* Keep everything intact */ + /* Keep everything intact, but mark pen usage invalid */ + p.pen.usage_invalid = true; goto output; /* Else, if it's not a pen interface */ } else if (bInterfaceNumber != 0) { -- 2.25.1