[PATCH] ps3 controller clone

From
Andrew Haines <hidden>
Date
2013-12-22 23:33:24
Hi this is my first kernel patch.

I have a ps3 controller clone that dmesg calls "Gasia Co.,Ltd PS(R) Gamepad." When I plugged it in it was recognized but did not send any output. After some searching I found http://www.spinics.net/lists/linux-input/msg18172.html and changed my kernel according to the patch on that email which didn't fix the problem. I installed wireshark and connected the controller to Windows(VirtualBox) and came up with the solution in the attached patch.

My controller needed the additional
hdev->hid_get_raw_report(hdev, 0xf5, buf, 64, HID_FEATURE_REPORT)
and an interrupt set.

I tried to use the newer hdev->hid_output_raw_report rather than calling usb_interrupt_msg but I think usbhid->urbout is null in usbhid_output_raw_report since it gets sent as a SET_REPORT instead of URB_INTERRUPT out.

I did a little testing and running testrumble just after the controller is attached does initialize the controller so that the buttons send output. (Only with the additional hid_get_raw_report(hdev, 0xf5...)

I'm completely new to the kernel and have no idea how to allocate urbout. I did some searching but I'm not sure where to look.

Regards,

Andrew Haines

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help