From patchwork Tue Dec 20 15:43:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 35124 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3036102wrn; Tue, 20 Dec 2022 07:45:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf7kCjoMnrv95g3qtTtkNYsyabKEkOAxw4L22kcy5pdJFeiwG8Ew6f+G0mZzlzRINluHxBrr X-Received: by 2002:a17:906:5a54:b0:7c0:eba2:f9dd with SMTP id my20-20020a1709065a5400b007c0eba2f9ddmr40833551ejc.53.1671551099887; Tue, 20 Dec 2022 07:44:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671551099; cv=none; d=google.com; s=arc-20160816; b=A2gmHFaWoTrOIEdxzlWjXBpVP1pJy3pUP3kMxjdjYv4pA3OgmzhtIjkZX9VdbKGksR lqow9qmy+GDd9Gpt7OyekrZr+wxiqLi3U+zeec+mnndcFv3c9LYdD1SaDp6GYNytRdGB Hvu8npTTT4C1QxrqoV9Mrr28j8XFHro7IhihuD70WQnclFfhNskxM6SoGKtHNMATcI7Y pTTWkkF+j3NMzDdY1DmmnHMvGcY283gNj7u8usKvUYDy6RuyV6X5Qmy2tSuY/ofWme8R iqmLvNmGTr4zuloFTgc7Mw014aqck2dpFGzC1JinT5eqRtI9BTLBMtgdyRRBsOORRbhe jzQQ== 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; bh=3LFia6XFElwK++V7m0VzvUu+iWG+6mxS6EJwU3tD3dI=; b=p25StHmVZepuNSZPeYI68LMu14JHhjPmdopYeqyfhqoJMuBC/Qy5mVqOzFb/LRHcSE m+uwn2FedqURW3U8+CKBNgIbJQtXnk1KyrxwZmzlf6hkLYb+HMhjnSvA8ebfNxABdDyb EYJsHWwf7u1Gp8BbkM2TUshrNj4EaIfIeweL7dlPAeWRjZgwogRdaG90LHCSCfuE/rB4 RQOPAhACUl9SGOrBtgVanMTIJLwJhhrN17CX6fgOFiSvoF6y7CRFaiaoXtyMVDihyiGK z7/gX2obCPBkMyeQCP20HI+KgL8WKUFZxbfnaK6fLEyC/oLQrMYYnhO87PuV+MeCVJHm F9sw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d12-20020a056402078c00b0046d8fb1cfc9si10428196edy.313.2022.12.20.07.44.36; Tue, 20 Dec 2022 07:44:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233860AbiLTPn7 (ORCPT + 99 others); Tue, 20 Dec 2022 10:43:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233534AbiLTPny (ORCPT ); Tue, 20 Dec 2022 10:43:54 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF7CE18686; Tue, 20 Dec 2022 07:43:53 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 6E45024000C; Tue, 20 Dec 2022 15:43:50 +0000 (UTC) From: Bastien Nocera To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jiri Kosina , Benjamin Tissoires , "Peter F . Patel-Schneider" , =?utf-8?q?Filipe_La?= =?utf-8?q?=C3=ADns?= , Nestor Lopez Casado Subject: [PATCH v2 3/3] HID: logitech-hidpp: Remove HIDPP_QUIRK_NO_HIDINPUT quirk Date: Tue, 20 Dec 2022 16:43:45 +0100 Message-Id: <20221220154345.474596-3-hadess@hadess.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220154345.474596-1-hadess@hadess.net> References: <20221220154345.474596-1-hadess@hadess.net> MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752748365711298206?= X-GMAIL-MSGID: =?utf-8?q?1752748365711298206?= HIDPP_QUIRK_NO_HIDINPUT isn't used by any devices but still happens to work as HIDPP_QUIRK_DELAYED_INIT is defined to the same value. Remove HIDPP_QUIRK_NO_HIDINPUT and use HIDPP_QUIRK_DELAYED_INIT everywhere instead. Tested on a T650 which requires that quirk, and a number of unifying and Bluetooth devices that don't. Signed-off-by: Bastien Nocera --- drivers/hid/hid-logitech-hidpp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index b4e4a8c79c75..2092fb1be627 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -67,7 +67,7 @@ MODULE_PARM_DESC(disable_tap_to_click, /* bits 2..20 are reserved for classes */ /* #define HIDPP_QUIRK_CONNECT_EVENTS BIT(21) disabled */ #define HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS BIT(22) -#define HIDPP_QUIRK_NO_HIDINPUT BIT(23) +#define HIDPP_QUIRK_DELAYED_INIT BIT(23) #define HIDPP_QUIRK_FORCE_OUTPUT_REPORTS BIT(24) #define HIDPP_QUIRK_UNIFYING BIT(25) #define HIDPP_QUIRK_HIDPP_WHEELS BIT(26) @@ -83,8 +83,6 @@ MODULE_PARM_DESC(disable_tap_to_click, HIDPP_CAPABILITY_HIDPP20_HI_RES_SCROLL | \ HIDPP_CAPABILITY_HIDPP20_HI_RES_WHEEL) -#define HIDPP_QUIRK_DELAYED_INIT HIDPP_QUIRK_NO_HIDINPUT - #define HIDPP_CAPABILITY_HIDPP10_BATTERY BIT(0) #define HIDPP_CAPABILITY_HIDPP20_BATTERY BIT(1) #define HIDPP_CAPABILITY_BATTERY_MILEAGE BIT(2) @@ -4205,7 +4203,7 @@ static void hidpp_connect_event(struct hidpp_device *hidpp) if (hidpp->capabilities & HIDPP_CAPABILITY_HI_RES_SCROLL) hi_res_scroll_enable(hidpp); - if (!(hidpp->quirks & HIDPP_QUIRK_NO_HIDINPUT) || hidpp->delayed_input) + if (!(hidpp->quirks & HIDPP_QUIRK_DELAYED_INIT) || hidpp->delayed_input) /* if the input nodes are already created, we can stop now */ return; @@ -4436,7 +4434,7 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) hid_hw_close(hdev); hid_hw_stop(hdev); - if (hidpp->quirks & HIDPP_QUIRK_NO_HIDINPUT) + if (hidpp->quirks & HIDPP_QUIRK_DELAYED_INIT) connect_mask &= ~HID_CONNECT_HIDINPUT; /* Now export the actual inputs and hidraw nodes to the world */