Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions drivers/hid/hid-sony.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,31 @@ static int sixaxis_set_operational_bt(struct hid_device *hdev)
HID_FEATURE_REPORT, HID_REQ_SET_REPORT);

kfree(buf);

static const __u8 enable_gasia[] = {
0xA2,
0x01,
0x00, 0x00, 0x00, 0x00, 0x00, // rumble values [0x00, right-timeout, right-force, left-timeout, left-force]
0x00, 0x00, 0x00, 0x00, 0x02, // 0x02=LED1 .. 0x10=LED4
0xff, 0x27, 0x10, 0x00, 0x32, // LED 4
0xff, 0x27, 0x10, 0x00, 0x32, // LED 3
0xff, 0x27, 0x10, 0x00, 0x32, // LED 2
0xff, 0x27, 0x10, 0x00, 0x32, // LED 1
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
};
__u8 *buf;

buf = kmemdup(enable_gasia, sizeof(enable_gasia), GFP_KERNEL);
if (!buf)
return -ENOMEM;

hid_hw_raw_request(hdev, buf[0], buf, sizeof(enable_gasia),
HID_FEATURE_REPORT, HID_REQ_SET_REPORT);

kfree(buf);

return ret;
}
Expand Down