mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
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>
This commit is contained in:
parent
c9121cf637
commit
1f944ac626
2 changed files with 15 additions and 0 deletions
|
@ -762,6 +762,7 @@
|
|||
#define USB_DEVICE_ID_S510_RECEIVER_2 0xc517
|
||||
#define USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500 0xc512
|
||||
#define USB_DEVICE_ID_MX3000_RECEIVER 0xc513
|
||||
#define USB_DEVICE_ID_LOGITECH_27MHZ_MOUSE_RECEIVER 0xc51b
|
||||
#define USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER 0xc52b
|
||||
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER 0xc52f
|
||||
#define USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2 0xc532
|
||||
|
|
|
@ -1483,6 +1483,16 @@ static int logi_dj_raw_event(struct hid_device *hdev,
|
|||
data[0] = data[1];
|
||||
data[1] = 0;
|
||||
}
|
||||
/* The 27 MHz mouse-only receiver sends unnumbered mouse data */
|
||||
if (djrcv_dev->unnumbered_application == HID_GD_MOUSE &&
|
||||
size == 6) {
|
||||
u8 mouse_report[7];
|
||||
|
||||
/* Prepend report id */
|
||||
mouse_report[0] = REPORT_TYPE_MOUSE;
|
||||
memcpy(mouse_report + 1, data, 6);
|
||||
logi_dj_recv_forward_input_report(hdev, mouse_report, 7);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1720,6 +1730,10 @@ static const struct hid_device_id logi_dj_receivers[] = {
|
|||
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
|
||||
USB_DEVICE_ID_S510_RECEIVER_2),
|
||||
.driver_data = recvr_type_27mhz},
|
||||
{ /* Logitech 27 MHz HID++ 1.0 mouse-only receiver (0xc51b) */
|
||||
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
|
||||
USB_DEVICE_ID_LOGITECH_27MHZ_MOUSE_RECEIVER),
|
||||
.driver_data = recvr_type_27mhz},
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue