1
0
Fork 0

HID: sony: Fix SHANWAN pad rumbling on USB

The SHANWAN PS3 clone joypad will start its rumble motors as soon as
it is plugged in via USB. As the additional USB interrupt does nothing on
the original PS3 Sixaxis joypads, and makes a number of other
clone joypads actually start sending data, disable that call for
the SHANWAN so the rumble motors aren't started on plug.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hifive-unleashed-5.1
Bastien Nocera 2017-11-07 15:24:47 +01:00 committed by Jiri Kosina
parent be7484acc6
commit 492ca83c3d
1 changed files with 10 additions and 4 deletions

View File

@ -1439,10 +1439,16 @@ static int sixaxis_set_operational_usb(struct hid_device *hdev)
goto out;
}
ret = hid_hw_output_report(hdev, buf, 1);
if (ret < 0) {
hid_info(hdev, "can't set operational mode: step 3, ignoring\n");
ret = 0;
/*
* But the USB interrupt would cause SHANWAN controllers to
* start rumbling non-stop.
*/
if (strcmp(hdev->name, "SHANWAN PS3 GamePad")) {
ret = hid_hw_output_report(hdev, buf, 1);
if (ret < 0) {
hid_info(hdev, "can't set operational mode: step 3, ignoring\n");
ret = 0;
}
}
out: