Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 492ca83c authored by Bastien Nocera's avatar Bastien Nocera Committed by Jiri Kosina
Browse files

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: default avatarBastien Nocera <hadess@hadess.net>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent be7484ac
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1439,11 +1439,17 @@ static int sixaxis_set_operational_usb(struct hid_device *hdev)
		goto out;
	}

	/*
	 * 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:
	kfree(buf);