Commit e4c429c4 authored by Jiri Kosina's avatar Jiri Kosina

Merge branch 'for-5.7/logitech' into for-linus

- Logitech HID++ protocol support improvement from Filipe Laíns
parents 0460ceb8 8c9d734c
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include "hid-ids.h" #include "hid-ids.h"
#define DJ_MAX_PAIRED_DEVICES 6 #define DJ_MAX_PAIRED_DEVICES 7
#define DJ_MAX_NUMBER_NOTIFS 8 #define DJ_MAX_NUMBER_NOTIFS 8
#define DJ_RECEIVER_INDEX 0 #define DJ_RECEIVER_INDEX 0
#define DJ_DEVICE_INDEX_MIN 1 #define DJ_DEVICE_INDEX_MIN 1
#define DJ_DEVICE_INDEX_MAX 6 #define DJ_DEVICE_INDEX_MAX 7
#define DJREPORT_SHORT_LENGTH 15 #define DJREPORT_SHORT_LENGTH 15
#define DJREPORT_LONG_LENGTH 32 #define DJREPORT_LONG_LENGTH 32
...@@ -980,6 +980,11 @@ static void logi_hidpp_recv_queue_notif(struct hid_device *hdev, ...@@ -980,6 +980,11 @@ static void logi_hidpp_recv_queue_notif(struct hid_device *hdev,
break; break;
} }
/* custom receiver device (eg. powerplay) */
if (hidpp_report->device_index == 7) {
workitem.reports_supported |= HIDPP;
}
if (workitem.type == WORKITEM_TYPE_EMPTY) { if (workitem.type == WORKITEM_TYPE_EMPTY) {
hid_warn(hdev, hid_warn(hdev,
"unusable device of type %s (0x%02x) connected on slot %d", "unusable device of type %s (0x%02x) connected on slot %d",
...@@ -1368,6 +1373,8 @@ static int logi_dj_ll_parse(struct hid_device *hid) ...@@ -1368,6 +1373,8 @@ static int logi_dj_ll_parse(struct hid_device *hid)
} }
if (djdev->reports_supported & HIDPP) { if (djdev->reports_supported & HIDPP) {
dbg_hid("%s: sending a HID++ descriptor, reports_supported: %llx\n",
__func__, djdev->reports_supported);
rdcat(rdesc, &rsize, hidpp_descriptor, rdcat(rdesc, &rsize, hidpp_descriptor,
sizeof(hidpp_descriptor)); sizeof(hidpp_descriptor));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment