From patchwork Tue Dec 20 09:22:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 35001 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2862873wrn; Tue, 20 Dec 2022 01:23:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXuzk17X7W+CdcdDI65QzaCWBFM1zobEUkYjoiHtAqmTD2vRf0sETBAC5qXC8j2y4IwlV0mS X-Received: by 2002:a17:906:1b4e:b0:7b2:c227:126d with SMTP id p14-20020a1709061b4e00b007b2c227126dmr1085021ejg.20.1671528223201; Tue, 20 Dec 2022 01:23:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671528223; cv=none; d=google.com; s=arc-20160816; b=bAnGeim5cZNZ3UsN8Qw++yb/YOhqf6fiAqf2rmp4CLh4YFZAukp36xvb91Jld70tjl Bb1FyP9aYkzlbCw6yFmo69aCKKuFlhlo9hvbUaFDasdDHzGhUgOrq8cbm0P7PJzrBwUH /ZdoFc3Cvo+Q9fDEJ0Au1+LuoSPTwWNVvDuLfCjD7nXLvKv0BECzjn6ffqsN0PlkTbs7 j7JmcEWN9N161s3+vYwepYMpc31CyabMEYOcHhOzWaE3jGwT6P2ijlghbi5pyTdgQPGS m6w9yNSZj9fyci+MaUOCWlSp47Ub7DkXMiv9G7Rix3ZIiRiDvU6nlUI7kwQVxZ7fMagA 0Ivw== 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=LqcGyNOORjYvyr79URQ1gndkhcU9NNhfu+brYbKKEoM=; b=uy3ygdiYe694hGx9TowGBPyDOfAHiHqMsbUn7Z2Q+KAMPssaFczcxu461Y+pdx/33j hO6nD1VbcyfeOiOPdvEDiSOnZO4SzbEVM23SqnpKbqhbaB3H1WXq5FaEEU+5DnjiVve9 X2CGxHhxEMBv8wdFBCf7ZZSr9MGAwcGQmpmCA44fNkRjV0tE5D0Gs/8JYIbvXm0wDYy8 ZC3R0hcR6lQFV3TBbIhyQCcTmFPUKXHCXCYA6OrP9Rwu6a6TSy2Lw4U/Spo3O9qzCA49 tivJrQklUKC1MQEZFzUib92ojnhcdeQSITQ2g3d/u9VFFvXdYIJKDyvY4iHOVXK1Cklx L1jA== 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 qf20-20020a1709077f1400b007c1052c9243si12865638ejc.15.2022.12.20.01.23.19; Tue, 20 Dec 2022 01:23:43 -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 S233437AbiLTJW0 (ORCPT + 99 others); Tue, 20 Dec 2022 04:22:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233409AbiLTJWN (ORCPT ); Tue, 20 Dec 2022 04:22:13 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2468F26FF; Tue, 20 Dec 2022 01:22:11 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 3A1041C0007; Tue, 20 Dec 2022 09:22:08 +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 1/3] Revert "HID: logitech-hidpp: add a module parameter to keep firmware gestures" Date: Tue, 20 Dec 2022 10:22:05 +0100 Message-Id: <20221220092207.428640-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?1752724377985334074?= 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. --- 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 09:22:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 35003 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2863060wrn; Tue, 20 Dec 2022 01:24:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuDF8X7yuP4Oe2aV8MlEN7yKqBdaZXgZpLvDWxuAc0rDY3mkVOpwyjvTvvOGdhHOIDNdo43 X-Received: by 2002:a17:906:9f08:b0:81d:3231:591e with SMTP id fy8-20020a1709069f0800b0081d3231591emr7427237ejc.49.1671528251985; Tue, 20 Dec 2022 01:24:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671528251; cv=none; d=google.com; s=arc-20160816; b=ID83yX2oVozdb6b/bPbIVP6drFYYwz6pKnEUe3lekWE/lWiGD0px+JNqEN9kzcRY2F pbzL0/J04800n1j1indbA4B7BOJ1abY1QzOWky2LzltGgpU8qiYp6RyzWq0+nvswxCUB XehxDhZdGnfk5uM8/ajkmrM1jUzoPwK1+KA7p6BRhR26v0F3UGN1AsrfEeGGo4aHOmSv nVumBlVgm5GJFAr/q1KxnoGKMb3QijI5RLZKAhp916OD7Z1c0rcd/5keKLGaOqk8GSKC AAt6tg1/p9o/BTB/CkO08851cZn64yXKvck0yDo8x1FCkBIQp2v5O/eOQu8XNOKQh/N/ exow== 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=yAs4cr953ahf5GRngcmeIUy0Avaj9K/QirQTmIpWJsk=; b=LnhUqArrlLLZZeW4NuTwBuyEU6rTlZuHu2Mxvz92hTyBMQ1smQEkC8a0YoOU4llpp5 c8CoMGgCSCQZSw5a7ba9DwhEx0+ULX4K2jG6H0Mpi0tTyVEm4SjKDdMFIjzU08QEahGC Fd22ZLQEWNQLwRdDg8HIvSIpVdjbmI3o7KsT1E5LKgEd6E7F52NTbYyDIf585PvO9gCg fZU3B79tnm7lU69qVMldPmOMVcpB197gRD81JxpQmTGANP/7fA/777JXwGQROjhf3D5R tlle1W3vRYRLeHZPW8LISuCtbdaweXllbCk46pujALdWBCoiBzfMixR1YwdLjKSvjYel qanA== 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 i8-20020a05640242c800b0046443638c9esi1078113edc.262.2022.12.20.01.23.48; Tue, 20 Dec 2022 01:24: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; 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 S233468AbiLTJW3 (ORCPT + 99 others); Tue, 20 Dec 2022 04:22:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233389AbiLTJWP (ORCPT ); Tue, 20 Dec 2022 04:22:15 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B8C4C2E; Tue, 20 Dec 2022 01:22:13 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id BCC1C1C000A; Tue, 20 Dec 2022 09:22:10 +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 2/3] HID: logitech-hidpp: Don't restart communication if not necessary Date: Tue, 20 Dec 2022 10:22:06 +0100 Message-Id: <20221220092207.428640-2-hadess@hadess.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220092207.428640-1-hadess@hadess.net> References: <20221220092207.428640-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, 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?1752724408700658727?= X-GMAIL-MSGID: =?utf-8?q?1752724408700658727?= Don't stop and restart communication with the device unless we need to modify the connect flags used because of a device quirk. --- 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 09:22:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 35002 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2863032wrn; Tue, 20 Dec 2022 01:24:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXsAOdFvVQ3I2+2bLqVJJ1PlqHyJQ5jkI9dMPqyVJ6BL11NiixeoLVTK/uJOXqITFbISVr/8 X-Received: by 2002:a05:6402:334:b0:470:72d9:a9ed with SMTP id q20-20020a056402033400b0047072d9a9edmr1290678edw.7.1671528247459; Tue, 20 Dec 2022 01:24:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671528247; cv=none; d=google.com; s=arc-20160816; b=mVoAoWS48Bm+0b44qSqHlWPnu2/ELd7mbh42kx6hiRROXsG/XdukwXJBT/KHS8zCdZ 1iY5m3OtPmXkOVP9xhNnXMJ2/IKfLQo1GHO/2ZSLbNnJM8iO9uTeUE0ADS3YRKPuMxBx 7R2C6scAxb0BMKGRyrSE0pn52hmUAnA9r6h0iF3Q0VfvEegcTWxZeHDpKXnsQHLh6JaZ LS6hEK2hT/dgDy7K5jkaXbTUZXI6FKWDP8I1bhavLjobkEqsDLWKLYMCX6VLsaP80S83 tgj5NSQ6wJgMqAx76dTl+TBx8j1JdRYG34RPSeqeysHMTKeVBpBafv1DhiIJYuAe0d26 j+hQ== 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=YWEjMiL2o5Af6JdWdb9gn2uyVMzmJ9Yil88l4CDcJYM=; b=Sj57d2oKGGyUyQgs7qDuCwRcfCQXWr2ZSVCEJz2YUbwu7/dfAQQFdPxSmpB8X/xj++ 4SnnVHJ+n20ilyxhPm0x3m8wROjI65Onpw4tn27YsxwMN+B3GZdYH+f0a/xD1p65XD2R +PbG4jHcUb5zHrqGfrz5RrY21rM4qjjJqP14N3l6v11zU/vwp/c++hzvTDtBJIFkJhfZ yGNCOmY2W0feQr+OyKsD19MIS1iQJZYZHMK4TbLxUWS5A4LhAv2kDPm5OX74KVbvnctR a6ixr5nhhHWHju41ZvbZnX4MmAXXN6NySfSs4G1GiSinM6Q/4YGAw16xzI7HOIjkzWaX WKBw== 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 v6-20020a056402348600b004627d582888si11618870edc.24.2022.12.20.01.23.44; Tue, 20 Dec 2022 01:24:07 -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 S233477AbiLTJWc (ORCPT + 99 others); Tue, 20 Dec 2022 04:22:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233413AbiLTJWQ (ORCPT ); Tue, 20 Dec 2022 04:22:16 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24E3F5F98; Tue, 20 Dec 2022 01:22:15 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 916B91C0005; Tue, 20 Dec 2022 09:22:12 +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 3/3] HID: logitech-hidpp: Remove HIDPP_QUIRK_NO_HIDINPUT quirk Date: Tue, 20 Dec 2022 10:22:07 +0100 Message-Id: <20221220092207.428640-3-hadess@hadess.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220092207.428640-1-hadess@hadess.net> References: <20221220092207.428640-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, 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?1752724403705918964?= X-GMAIL-MSGID: =?utf-8?q?1752724403705918964?= 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. 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 */