From patchwork Tue Dec 20 15:43:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 35123 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3035946wrn; Tue, 20 Dec 2022 07:44:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf4hXakzM1WhBGvT7uMwvaSGnVUOnQ/HUVoH33soeBKl8EeoQk4+Nmg+TLWVkitHJgchLR+B X-Received: by 2002:a17:907:3e26:b0:7c1:9519:5cfa with SMTP id hp38-20020a1709073e2600b007c195195cfamr32696279ejc.77.1671551077884; Tue, 20 Dec 2022 07:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671551077; cv=none; d=google.com; s=arc-20160816; b=ex/C5XNW/OhQvf0ZhGC07/mipavP8AmuQ3iQhjeLGQvL4Upedz2D+ykgiVwcNKEcei p4/jV7VrERVDlr5xB0FQ6I0HZBOohIqmqoVWiJstykYUP5YuW8ki3PXmrvB9E73/OSPB Pmcnc6r/A8oqQ4uZ3gYFPaLe2nRnjZI76pRfhA8GAdc9BGMvm06NL10+Xt2EY55G/RS2 7nopMtodiHs5q9vUgqwF7MBpBCUrZImh8hMKKUi7rL7sUNxmmXH5uwnEZVBbp3Ss3Rlt EKS6ErjMghYN+ysGB7m0KCcdII+LWC91SRf/iA8bJMkhNXl/mRffj2SWMGy+pbp8w9oK mW2g== 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 :message-id:date:subject:cc:to:from; bh=WnFV2icubqcvqdPMZCtsWdjLgzGhn0Qf5upwSo8EW2s=; b=XNkG/LrPpFQdvmqmvU9z0SxUPzI/ld+DvCEq3m84DRDuXlXt6sC3iQZzci52ayQ6Wr qPFCBLBKSk5sCVedws4ulyp2j7DU/uim1Wr7PDkMnh9NiadrNXwJE6kLIlZwCvXdK238 ymoqT9JA5kDm6OZRtP647fF6J6HnPWNnR9p9WibFS5ByJiYvbNc7BXKHO9V9N6cri4L8 0rTVB3V2yQiID1TntZYCkPmH5RcRSb6VKTM4gAKpFbnU+bcbYM68Y+8ntmso5fy48zT6 i2o9LKkyruyHOKhOdOhK9f9D8ablpW0arIbRTjcdtgFxZ6mqiBzwNANm3M2hQzNidZtx HZsQ== 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 hd39-20020a17090796a700b007c170f6b32esi12809034ejc.527.2022.12.20.07.44.14; Tue, 20 Dec 2022 07:44:37 -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 S233839AbiLTPn4 (ORCPT + 99 others); Tue, 20 Dec 2022 10:43:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233509AbiLTPnw (ORCPT ); Tue, 20 Dec 2022 10:43:52 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C689E1838D; Tue, 20 Dec 2022 07:43:50 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id B098024000A; Tue, 20 Dec 2022 15:43:45 +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 1/3] Revert "HID: logitech-hidpp: add a module parameter to keep firmware gestures" Date: Tue, 20 Dec 2022 16:43:43 +0100 Message-Id: <20221220154345.474596-1-hadess@hadess.net> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, 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?1752724377985334074?= X-GMAIL-MSGID: =?utf-8?q?1752748342545043611?= Now that we're in 2022, and the majority of desktop environments can and should support touchpad gestures through libinput, remove the legacy module parameter that made it possible to use gestures implemented in firmware. This will eventually allow simplifying the driver's initialisation code. This reverts commit 9188dbaed68a4b23dc96eba165265c08caa7dc2a. Signed-off-by: Bastien Nocera --- drivers/hid/hid-logitech-hidpp.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 08ad19097e9e..7f9187201913 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -32,11 +32,6 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Benjamin Tissoires "); MODULE_AUTHOR("Nestor Lopez Casado "); -static bool disable_raw_mode; -module_param(disable_raw_mode, bool, 0644); -MODULE_PARM_DESC(disable_raw_mode, - "Disable Raw mode reporting for touchpads and keep firmware gestures."); - static bool disable_tap_to_click; module_param(disable_tap_to_click, bool, 0644); MODULE_PARM_DESC(disable_tap_to_click, @@ -4355,11 +4350,6 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) hidpp_application_equals(hdev, HID_GD_KEYBOARD)) hidpp->quirks |= HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS; - if (disable_raw_mode) { - hidpp->quirks &= ~HIDPP_QUIRK_CLASS_WTP; - hidpp->quirks &= ~HIDPP_QUIRK_NO_HIDINPUT; - } - if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) { ret = wtp_allocate(hdev, id); if (ret) From patchwork Tue Dec 20 15:43:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 35125 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3036143wrn; Tue, 20 Dec 2022 07:45:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf6SuSJ/f0o1MSCbcqOHAYf4jQf1tle3CvojU5XR0i+3EmPRXAkskEvy8ILz6fEkMU2jhweV X-Received: by 2002:aa7:cb81:0:b0:467:86c7:c4a8 with SMTP id r1-20020aa7cb81000000b0046786c7c4a8mr34984063edt.41.1671551105097; Tue, 20 Dec 2022 07:45:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671551105; cv=none; d=google.com; s=arc-20160816; b=DUC2ticdGMvGdGvXPJ3idq1upk4CxBq/Y/YMwDpPmTJUdiqLnFlnBY/1VPZWYXunmg L4Ohe8Xf+O578hHFI2Ps5Ut7yfQeGRvmAwtWtdkA1uxnuUB2XOgdvLO8GQHAwlqyjzh9 lH007bsYLERTh2otgaBmqufMaqe00mMUQfuOCNf5hlpwuPqtFXZ7BCrhO1lhL4EIbWpZ psu9NZ24GVWf4i6YM1mp4fT2fC9DTlPDJBwzSIs6uKLjpSkBKDC+M5wSVAEiC372ANCW dtJSCHK8nocDnvM+SJmDHCbhtjRxIuEruBlLSk/Ia3GNLt4NXfMMzGhXMEqb9KyWRQ3s QwTg== 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=HEbLfH3P1ULpHtKntFSTcU/e6vIDfCJJGE/urGQesW8=; b=mwiYlM4FaOQRsVGEMUijZRienvmdAHGTlXiUKgz+XcaU3LxrNXAakHZ7A4Xwo/gFeH rRhcppsNV+RE+bLh29HW4L4hcz8UgiB43zqbmRuLjI8bS5/ACwoi3RkSGd+g4hfFRS7Q 8hSpkXj5IH7JwEbFMc5yKOK+VZU3+Z1CNiSLCNXigwkzEwKEZwDqq1jRF1ZLKPzGez02 mpQxeJmjwyuNkZw/CrWHAGqvvNohDWStPk86Z748aPbEVCRdxv8dc2vSe5/JmPdXOdX7 elUP87Zeq9/oJFR6cOZeTxbOWBShDCoCquEVUAFsAGgPYh4FryA0qKoeu+DnFa3FXwVU 3Z9w== 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 p4-20020a056402500400b00461dc830100si11993306eda.452.2022.12.20.07.44.41; Tue, 20 Dec 2022 07:45:05 -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 S233855AbiLTPoD (ORCPT + 99 others); Tue, 20 Dec 2022 10:44:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbiLTPny (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 B9CF714D1E; Tue, 20 Dec 2022 07:43:51 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 601FE240009; Tue, 20 Dec 2022 15:43:48 +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 2/3] HID: logitech-hidpp: Don't restart communication if not necessary Date: Tue, 20 Dec 2022 16:43:44 +0100 Message-Id: <20221220154345.474596-2-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?1752748371591707494?= X-GMAIL-MSGID: =?utf-8?q?1752748371591707494?= Don't stop and restart communication with the device unless we need to modify the connect flags used because of a device quirk. Signed-off-by: Bastien Nocera --- drivers/hid/hid-logitech-hidpp.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 7f9187201913..b4e4a8c79c75 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -4310,6 +4310,7 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) bool connected; unsigned int connect_mask = HID_CONNECT_DEFAULT; struct hidpp_ff_private_data data; + bool will_restart = false; /* report_fixup needs drvdata to be set before we call hid_parse */ hidpp = devm_kzalloc(&hdev->dev, sizeof(*hidpp), GFP_KERNEL); @@ -4360,6 +4361,9 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) return ret; } + if (hidpp->quirks & HIDPP_QUIRK_DELAYED_INIT) + will_restart = true; + INIT_WORK(&hidpp->work, delayed_work_cb); mutex_init(&hidpp->send_mutex); init_waitqueue_head(&hidpp->wait); @@ -4374,7 +4378,7 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) * Plain USB connections need to actually call start and open * on the transport driver to allow incoming data. */ - ret = hid_hw_start(hdev, 0); + ret = hid_hw_start(hdev, will_restart ? 0 : connect_mask); if (ret) { hid_err(hdev, "hw start failed\n"); goto hid_hw_start_fail; @@ -4411,6 +4415,7 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) hidpp->wireless_feature_index = 0; else if (ret) goto hid_hw_init_fail; + ret = 0; } if (connected && (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP)) { @@ -4425,19 +4430,21 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) hidpp_connect_event(hidpp); - /* Reset the HID node state */ - hid_device_io_stop(hdev); - hid_hw_close(hdev); - hid_hw_stop(hdev); + if (will_restart) { + /* Reset the HID node state */ + hid_device_io_stop(hdev); + hid_hw_close(hdev); + hid_hw_stop(hdev); - if (hidpp->quirks & HIDPP_QUIRK_NO_HIDINPUT) - connect_mask &= ~HID_CONNECT_HIDINPUT; + if (hidpp->quirks & HIDPP_QUIRK_NO_HIDINPUT) + connect_mask &= ~HID_CONNECT_HIDINPUT; - /* Now export the actual inputs and hidraw nodes to the world */ - ret = hid_hw_start(hdev, connect_mask); - if (ret) { - hid_err(hdev, "%s:hid_hw_start returned error\n", __func__); - goto hid_hw_start_fail; + /* Now export the actual inputs and hidraw nodes to the world */ + ret = hid_hw_start(hdev, connect_mask); + if (ret) { + hid_err(hdev, "%s:hid_hw_start returned error\n", __func__); + goto hid_hw_start_fail; + } } if (hidpp->quirks & HIDPP_QUIRK_CLASS_G920) { 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 */