Skip to content

Commit e4c429c

Browse files
author
Jiri Kosina
committed
Merge branch 'for-5.7/logitech' into for-linus
- Logitech HID++ protocol support improvement from Filipe Laíns
2 parents 0460ceb + 8c9d734 commit e4c429c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

drivers/hid/hid-logitech-dj.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#include <asm/unaligned.h>
1717
#include "hid-ids.h"
1818

19-
#define DJ_MAX_PAIRED_DEVICES 6
19+
#define DJ_MAX_PAIRED_DEVICES 7
2020
#define DJ_MAX_NUMBER_NOTIFS 8
2121
#define DJ_RECEIVER_INDEX 0
2222
#define DJ_DEVICE_INDEX_MIN 1
23-
#define DJ_DEVICE_INDEX_MAX 6
23+
#define DJ_DEVICE_INDEX_MAX 7
2424

2525
#define DJREPORT_SHORT_LENGTH 15
2626
#define DJREPORT_LONG_LENGTH 32
@@ -980,6 +980,11 @@ static void logi_hidpp_recv_queue_notif(struct hid_device *hdev,
980980
break;
981981
}
982982

983+
/* custom receiver device (eg. powerplay) */
984+
if (hidpp_report->device_index == 7) {
985+
workitem.reports_supported |= HIDPP;
986+
}
987+
983988
if (workitem.type == WORKITEM_TYPE_EMPTY) {
984989
hid_warn(hdev,
985990
"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)
13681373
}
13691374

13701375
if (djdev->reports_supported & HIDPP) {
1376+
dbg_hid("%s: sending a HID++ descriptor, reports_supported: %llx\n",
1377+
__func__, djdev->reports_supported);
13711378
rdcat(rdesc, &rsize, hidpp_descriptor,
13721379
sizeof(hidpp_descriptor));
13731380
}

0 commit comments

Comments
 (0)