diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 774cd221056659..1e38117ab7dad8 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -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; }