Skip to content

Commit bb44377

Browse files
vs7Project516
authored andcommitted
HID: sony: Enable Bluetooth Gasia third-party PS3 controllers
1 parent 335db05 commit bb44377

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/hid/hid-sony.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,13 +1184,31 @@ static int sixaxis_set_operational_bt(struct hid_device *hdev)
11841184
static const u8 report[] = { 0xf4, 0x42, 0x03, 0x00, 0x00 };
11851185
u8 *buf;
11861186
int ret;
1187+
unsigned char enable_gasia[] = {
1188+
0xA2,
1189+
0x01,
1190+
/* 0x00, right-timeout, right-force, left-timeout, left-force */
1191+
0x00, 0x00, 0x00, 0x00, 0x00, /* rumble values */
1192+
0x00, 0x00, 0x00, 0x00, 0x02, /* 0x02=LED1 .. 0x10=LED4 */
1193+
0xff, 0x27, 0x10, 0x00, 0x32, /* LED 4 */
1194+
0xff, 0x27, 0x10, 0x00, 0x32, /* LED 3 */
1195+
0xff, 0x27, 0x10, 0x00, 0x32, /* LED 2 */
1196+
0xff, 0x27, 0x10, 0x00, 0x32, /* LED 1 */
1197+
0x00, 0x00, 0x00, 0x00, 0x00,
1198+
0x00, 0x00, 0x00, 0x00, 0x00,
1199+
0x00, 0x00, 0x00, 0x00, 0x00,
1200+
0x00, 0x00, 0x00
1201+
};
11871202

11881203
buf = kmemdup(report, sizeof(report), GFP_KERNEL);
11891204
if (!buf)
11901205
return -ENOMEM;
11911206

11921207
ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(report),
11931208
HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
1209+
hid_hw_raw_request(hdev, enable_gasia[0], enable_gasia,
1210+
sizeof(enable_gasia), HID_FEATURE_REPORT,
1211+
HID_REQ_SET_REPORT);
11941212

11951213
kfree(buf);
11961214

0 commit comments

Comments
 (0)