From patchwork Sun Jun 25 16:21:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mavroudis Chatzilazaridis X-Patchwork-Id: 13292024 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA827EB64DC for ; Sun, 25 Jun 2023 16:22:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229481AbjFYQWH (ORCPT ); Sun, 25 Jun 2023 12:22:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjFYQWG (ORCPT ); Sun, 25 Jun 2023 12:22:06 -0400 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0CD918D for ; Sun, 25 Jun 2023 09:22:01 -0700 (PDT) Date: Sun, 25 Jun 2023 16:21:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687710116; x=1687969316; bh=dkbkKkywTM+ffvqs2p1uk7wkn9i7Ko57glA4RAdYeL8=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=GMbky8+my3ae8mRp+Q8yFXtVPrEcZBHUhcxtH0YuBGhK3cGwwYC/oVa8OI9S5SbVX SD/PUg4cczObTBgUMWArdsaFeLmcJHGMoiadcQYkvygkWdMItSMgQF/ZjTb7Og7DfM X2SgXjRVmNoVRva1ABycRZDpKxInpTa3pXK9x2NrGMPYpZlRfbi2rkVysy/J6R//TX epLhZdD3ha78hvAAyz/fLNjLRoiOve+d49P+TylqoCBSRjLxho0hlzd5WmW/MIE60z +yUFZQakxrQBZEipjHilU6eNZ0Y9Bf1qEkBw+uaklUgdgqs9I/8Vbnf3FSx3G58cG9 8gveVUSbnbfpg== To: jikos@kernel.org From: Mavroudis Chatzilazaridis Cc: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com, lains@riseup.net, Mavroudis Chatzilazaridis Subject: [RESEND PATCH 1/2] HID: logitech-dj: Add support for new lightspeed receiver iteration Message-ID: <20230625162131.17921-1-mavchatz@protonmail.com> Feedback-ID: 20039310:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The lightspeed receiver for the Pro X Superlight uses 13 byte mouse reports without a report id. The workaround for such cases has been adjusted to handle these larger packets. libratbag recognizes the device and input events are passing through. https://github.com/libratbag/libratbag/pull/1122 Co-developed-by: Filipe Laíns Signed-off-by: Filipe Laíns Signed-off-by: Mavroudis Chatzilazaridis --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-logitech-dj.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) -- 2.34.1 diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 5d29abac2300..ea3a1e7be2c7 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -864,6 +864,7 @@ #define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_2 0xc534 #define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1 0xc539 #define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_1 0xc53f +#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_2 0xc547 #define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_POWERPLAY 0xc53a #define USB_DEVICE_ID_SPACETRAVELLER 0xc623 #define USB_DEVICE_ID_SPACENAVIGATOR 0xc626 diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 62180414efcc..fef67da0de53 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -1692,11 +1692,12 @@ static int logi_dj_raw_event(struct hid_device *hdev, } /* * Mouse-only receivers send unnumbered mouse data. The 27 MHz - * receiver uses 6 byte packets, the nano receiver 8 bytes. + * receiver uses 6 byte packets, the nano receiver 8 bytes, + * the lightspeed receiver (Pro X Superlight) 13 bytes. */ if (djrcv_dev->unnumbered_application == HID_GD_MOUSE && - size <= 8) { - u8 mouse_report[9]; + size <= 13){ + u8 mouse_report[14]; /* Prepend report id */ mouse_report[0] = REPORT_TYPE_MOUSE; @@ -1980,6 +1981,10 @@ static const struct hid_device_id logi_dj_receivers[] = { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_1), .driver_data = recvr_type_gaming_hidpp}, + { /* Logitech lightspeed receiver (0xc547) */ + HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, + USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_2), + .driver_data = recvr_type_gaming_hidpp}, { /* Logitech 27 MHz HID++ 1.0 receiver (0xc513) */ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER), From patchwork Sun Jun 25 16:21:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mavroudis Chatzilazaridis X-Patchwork-Id: 13292025 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4681AEB64DD for ; Sun, 25 Jun 2023 16:22:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbjFYQWN (ORCPT ); Sun, 25 Jun 2023 12:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbjFYQWL (ORCPT ); Sun, 25 Jun 2023 12:22:11 -0400 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA757193 for ; Sun, 25 Jun 2023 09:22:07 -0700 (PDT) Date: Sun, 25 Jun 2023 16:21:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687710124; x=1687969324; bh=AcdBB/40IASGAGeiCoIqo5lG2vgePb4cmrJ/82hiIjY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=c9aiLbdpP+CXcnt2+ir02JE/eBFFD1DiXxl1y1MzMH8eSt8w+MR+IVCX4EAqpEMxa 9c6EjO9dFHo0w/1Ljah6TCabCIXsAEWH3fa1PVPwTxOg7UD43Xbp9f0+icSysjUcHC 9qul9jBqr4m+O+jnEYQVvviOz/rvpiSdG1aSVfRBlirBzVYWO7ZfhBvnTcDsWYul+F YyvYuft9x6Tq+p64ppu+7bSt9GMxj9E8jJeRxW6NYsl60c4MgbZ0CXBkL7NFBQEv6l yYUp4HD8h5cJOf+qCSWKWpI0bXu46Ob/AzxXHbT4STksiDxZcLynW8iFdSE7wwbfUe XC34Hhsx9VccA== To: jikos@kernel.org From: Mavroudis Chatzilazaridis Cc: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com, lains@riseup.net, Mavroudis Chatzilazaridis Subject: [RESEND PATCH 2/2] HID: logitech-hidpp: Add support for the Pro X Superlight Message-ID: <20230625162131.17921-2-mavchatz@protonmail.com> In-Reply-To: <20230625162131.17921-1-mavchatz@protonmail.com> References: <20230625162131.17921-1-mavchatz@protonmail.com> Feedback-ID: 20039310:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This patch adds support for the Pro X Superlight. Tested over USB. Co-developed-by: Filipe Laíns Signed-off-by: Filipe Laíns Signed-off-by: Mavroudis Chatzilazaridis --- drivers/hid/hid-logitech-hidpp.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.34.1 diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 5e1a412fd28f..a718535fb87d 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -4616,6 +4616,8 @@ static const struct hid_device_id hidpp_devices[] = { .driver_data = HIDPP_QUIRK_CLASS_G920 | HIDPP_QUIRK_FORCE_OUTPUT_REPORTS }, { /* Logitech G Pro Gaming Mouse over USB */ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC088) }, + { /* Logitech G Pro X Superlight Gaming Mouse over USB */ + HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC094) }, { /* G935 Gaming Headset */ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0x0a87),