Skip to content

Commit 6e215b6

Browse files
vivekjohnv-valve
authored andcommitted
sixaxis dualshock report via ctrl quirk
1 parent 549c3dc commit 6e215b6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

net/bluetooth/hidp/core.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,16 @@ static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count)
378378
{
379379
struct hidp_session *session = hid->driver_data;
380380

381-
return hidp_send_intr_message(session,
382-
HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT,
383-
data, count);
381+
/* The Sixaxis and Dualshock 4 wants report sent via the ctrl channel */
382+
if(hid->vendor == 0x54c && (hid->product == 0x5c4 || hid->product == 0x268)) {
383+
return hidp_send_ctrl_message(session,
384+
HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_OUPUT,
385+
data, count);
386+
} else {
387+
return hidp_send_intr_message(session,
388+
HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT,
389+
data, count);
390+
}
384391
}
385392

386393
static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum,

0 commit comments

Comments
 (0)