diff options
author | Hans de Goede <hdegoede@redhat.com> | 2019-04-20 07:21:57 -0400 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-04-23 12:01:33 -0400 |
commit | 1f944ac626084e1fafa3bca010a1be3709adb141 (patch) | |
tree | a067cbf82969b5673eedc7d4fecdc5fb86c81cbe /drivers/hid/hid-logitech-dj.c | |
parent | c9121cf637331b6fc07a60708c6ca0a161e7deb5 (diff) |
HID: logitech-dj: add support for 27 MHz mouse-only receivers
27 MHz mouse-only receivers send an unnumbered input report with the mouse
data, add special handling for this and add the c51b product-id to the
logi_dj_receivers table.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'drivers/hid/hid-logitech-dj.c')
-rw-r--r-- | drivers/hid/hid-logitech-dj.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 3004ca91b76b..08662b97b2cb 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c | |||
@@ -1483,6 +1483,16 @@ static int logi_dj_raw_event(struct hid_device *hdev, | |||
1483 | data[0] = data[1]; | 1483 | data[0] = data[1]; |
1484 | data[1] = 0; | 1484 | data[1] = 0; |
1485 | } | 1485 | } |
1486 | /* The 27 MHz mouse-only receiver sends unnumbered mouse data */ | ||
1487 | if (djrcv_dev->unnumbered_application == HID_GD_MOUSE && | ||
1488 | size == 6) { | ||
1489 | u8 mouse_report[7]; | ||
1490 | |||
1491 | /* Prepend report id */ | ||
1492 | mouse_report[0] = REPORT_TYPE_MOUSE; | ||
1493 | memcpy(mouse_report + 1, data, 6); | ||
1494 | logi_dj_recv_forward_input_report(hdev, mouse_report, 7); | ||
1495 | } | ||
1486 | 1496 | ||
1487 | return false; | 1497 | return false; |
1488 | } | 1498 | } |
@@ -1720,6 +1730,10 @@ static const struct hid_device_id logi_dj_receivers[] = { | |||
1720 | HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, | 1730 | HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, |
1721 | USB_DEVICE_ID_S510_RECEIVER_2), | 1731 | USB_DEVICE_ID_S510_RECEIVER_2), |
1722 | .driver_data = recvr_type_27mhz}, | 1732 | .driver_data = recvr_type_27mhz}, |
1733 | { /* Logitech 27 MHz HID++ 1.0 mouse-only receiver (0xc51b) */ | ||
1734 | HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, | ||
1735 | USB_DEVICE_ID_LOGITECH_27MHZ_MOUSE_RECEIVER), | ||
1736 | .driver_data = recvr_type_27mhz}, | ||
1723 | {} | 1737 | {} |
1724 | }; | 1738 | }; |
1725 | 1739 | ||