Skip to contentSkip to conversation

HID: logitech-dj: Add support for new lightspeed receiver iteration

PATCH RESEND Superseded Mavroudis Chatzilazaridis 2 participants 5 messages Jun 25, 2023 – Jun 29, 2023

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/2 HID: logitech-dj: Add support for new lightspeed receiver iteration

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

---
 drivers/hid/hid-ids.h         |  1 +
 drivers/hid/hid-logitech-dj.c | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/hid/hid-ids.h +1 -0
index 5d29abac2300..ea3a1e7be2c7 100644
@@ -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
drivers/hid/hid-logitech-dj.c +8 -3
index 62180414efcc..fef67da0de53 100644
@@ -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),

--
2.34.1

#1 lore raw

PATCH RESEND 2/2 HID: logitech-hidpp: Add support for the Pro X Superlight

This patch adds support for the Pro X Superlight. Tested over USB.

---
 drivers/hid/hid-logitech-hidpp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/hid/hid-logitech-hidpp.c +2 -0
index 5e1a412fd28f..a718535fb87d 100644
@@ -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),

--
2.34.1

#2 lore raw

Re: [RESEND PATCH 2/2] HID: logitech-hidpp: Add support for the Pro X Superlight

Quoted 1 line · Mavroudis Chatzilazaridis

This patch adds support for the Pro X Superlight. Tested over USB.

Could you please list which functionality this gains the device? Battery reporting? Hi-res scrolling? Something else?

Quoted 28 lines

---
 drivers/hid/hid-logitech-hidpp.c | 2 ++

 1 file changed, 2 insertions(+)
drivers/hid/hid- renamed from drivers/hid/hid-logitech-hidpp.c +0 -0

logitech-hidpp.c
index 5e1a412fd28f..a718535fb87d 100644

drivers/hid/hid-logitech-hidpp.c +0 -0
@@ -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), --
2.34.1

#3 lore raw

Re: [RESEND PATCH 2/2] HID: logitech-hidpp: Add support for the Pro X Superlight

Quoted 5 lines · Bastien Nocera
Quoted 1 line · Mavroudis Chatzilazaridis

This patch adds support for the Pro X Superlight. Tested over USB.

Could you please list which functionality this gains the device? Battery reporting? Hi-res scrolling? Something else?

Sure thing. The device gains battery reporting in both wired and wireless mode. Also, without this it's not being recognized by something like Piper in wireless mode, and thus can't be configured.

#4 lore raw

Re: [RESEND PATCH 2/2] HID: logitech-hidpp: Add support for the Pro X Superlight

Quoted 5 lines · Mavroudis Chatzilazaridis
Quoted 4 lines · Bastien Nocera
Quoted 2 lines · Mavroudis Chatzilazaridis

This patch adds support for the Pro X Superlight. Tested over USB.

Quoted 7 lines
Quoted 2 lines

Could you please list which functionality this gains the device? Battery reporting? Hi-res scrolling? Something else?

Sure thing. The device gains battery reporting in both wired and wireless mode. Also, without this it's not being recognized by something
like Piper in wireless mode, and thus can't be configured.

Great. Could you add that information in the commit message for a v2?