Skip to content

Commit

Permalink
Merge branch 'for-5.7/logitech' into for-linus
Browse files Browse the repository at this point in the history
- Logitech HID++ protocol support improvement from Filipe Laíns
  • Loading branch information
Jiri Kosina committed Apr 1, 2020
2 parents 0460ceb + 8c9d734 commit e4c429c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions drivers/hid/hid-logitech-dj.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#include <asm/unaligned.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_RECEIVER_INDEX 0
#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_LONG_LENGTH 32
Expand Down Expand Up @@ -980,6 +980,11 @@ static void logi_hidpp_recv_queue_notif(struct hid_device *hdev,
break;
}

/* custom receiver device (eg. powerplay) */
if (hidpp_report->device_index == 7) {
workitem.reports_supported |= HIDPP;
}

if (workitem.type == WORKITEM_TYPE_EMPTY) {
hid_warn(hdev,
"unusable device of type %s (0x%02x) connected on slot %d",
Expand Down Expand Up @@ -1368,6 +1373,8 @@ static int logi_dj_ll_parse(struct hid_device *hid)
}

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,
sizeof(hidpp_descriptor));
}
Expand Down

0 comments on commit e4c429c

Please sign in to comment.