Skip to content

Commit 9d1bd93

Browse files
MavChtzJiri Kosina
authored andcommitted
HID: logitech-dj: Add support for a 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. The device now reports the status of its battery in wireless mode and libratbag now recognizes the device and it can be configured with Piper. libratbag/libratbag#1122 Co-developed-by: Filipe Laíns <[email protected]> Signed-off-by: Filipe Laíns <[email protected]> Signed-off-by: Mavroudis Chatzilazaridis <[email protected]> Reviewed-by: Bastien Nocera <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent c05b8a9 commit 9d1bd93

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@
866866
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_2 0xc534
867867
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1 0xc539
868868
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_1 0xc53f
869+
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_2 0xc547
869870
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_POWERPLAY 0xc53a
870871
#define USB_DEVICE_ID_SPACETRAVELLER 0xc623
871872
#define USB_DEVICE_ID_SPACENAVIGATOR 0xc626

drivers/hid/hid-logitech-dj.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,11 +1692,12 @@ static int logi_dj_raw_event(struct hid_device *hdev,
16921692
}
16931693
/*
16941694
* Mouse-only receivers send unnumbered mouse data. The 27 MHz
1695-
* receiver uses 6 byte packets, the nano receiver 8 bytes.
1695+
* receiver uses 6 byte packets, the nano receiver 8 bytes,
1696+
* the lightspeed receiver (Pro X Superlight) 13 bytes.
16961697
*/
16971698
if (djrcv_dev->unnumbered_application == HID_GD_MOUSE &&
1698-
size <= 8) {
1699-
u8 mouse_report[9];
1699+
size <= 13){
1700+
u8 mouse_report[14];
17001701

17011702
/* Prepend report id */
17021703
mouse_report[0] = REPORT_TYPE_MOUSE;
@@ -1980,6 +1981,10 @@ static const struct hid_device_id logi_dj_receivers[] = {
19801981
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
19811982
USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_1),
19821983
.driver_data = recvr_type_gaming_hidpp},
1984+
{ /* Logitech lightspeed receiver (0xc547) */
1985+
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
1986+
USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_2),
1987+
.driver_data = recvr_type_gaming_hidpp},
19831988

19841989
{ /* Logitech 27 MHz HID++ 1.0 receiver (0xc513) */
19851990
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER),

0 commit comments

Comments
 (0)