HID: sony: Set proper bit flags on DS4 output report
authorRoderick Colenbrander <roderick.colenbrander@sony.com>
Fri, 24 Mar 2017 22:17:48 +0000 (15:17 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 6 Apr 2017 12:41:17 +0000 (14:41 +0200)
Only set bit flags for the portions of the DS4 output report
for which we have data.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c

index 9863adf768ac6bdde728e6ab4206a7e85062a022..107aae9627bc717804bd701544acccfa0e386b0a 100644 (file)
@@ -1998,13 +1998,13 @@ static void dualshock4_send_output_report(struct sony_sc *sc)
        if (sc->quirks & (DUALSHOCK4_CONTROLLER_USB | DUALSHOCK4_DONGLE)) {
                memset(buf, 0, DS4_OUTPUT_REPORT_0x05_SIZE);
                buf[0] = 0x05;
-               buf[1] = 0xFF;
+               buf[1] = 0x07; /* blink + LEDs + motor */
                offset = 4;
        } else {
                memset(buf, 0, DS4_OUTPUT_REPORT_0x11_SIZE);
                buf[0] = 0x11;
                buf[1] = 0xC0; /* HID + CRC */
-               buf[3] = 0x0F;
+               buf[3] = 0x07; /* blink + LEDs + motor */
                offset = 6;
        }