aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-06-25 17:47:04 -0400
committerJiri Kosina <jkosina@suse.cz>2008-10-14 17:50:55 -0400
commitbd28ce008bdc68ef5902f68d2d62cbb7fa78c415 (patch)
tree188317a52208632b330c3e4b0e1cc4576dcb9178 /drivers/hid/usbhid
parent2b88b803018dbc2e9c68cbcd1739186e0715911a (diff)
HID: move sony quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hid-core.c30
-rw-r--r--drivers/hid/usbhid/hid-quirks.c2
2 files changed, 0 insertions, 32 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index e900d597bc2d..b41d0110a75e 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -670,32 +670,6 @@ static void hid_free_buffers(struct usb_device *dev, struct hid_device *hid)
670 usb_buffer_free(dev, usbhid->bufsize, usbhid->ctrlbuf, usbhid->ctrlbuf_dma); 670 usb_buffer_free(dev, usbhid->bufsize, usbhid->ctrlbuf, usbhid->ctrlbuf_dma);
671} 671}
672 672
673/*
674 * Sending HID_REQ_GET_REPORT changes the operation mode of the ps3 controller
675 * to "operational". Without this, the ps3 controller will not report any
676 * events.
677 */
678static void hid_fixup_sony_ps3_controller(struct usb_device *dev, int ifnum)
679{
680 int result;
681 char *buf = kmalloc(18, GFP_KERNEL);
682
683 if (!buf)
684 return;
685
686 result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
687 HID_REQ_GET_REPORT,
688 USB_DIR_IN | USB_TYPE_CLASS |
689 USB_RECIP_INTERFACE,
690 (3 << 8) | 0xf2, ifnum, buf, 17,
691 USB_CTRL_GET_TIMEOUT);
692
693 if (result < 0)
694 err_hid("%s failed: %d\n", __func__, result);
695
696 kfree(buf);
697}
698
699static int usbhid_start_finish(struct hid_device *hid) 673static int usbhid_start_finish(struct hid_device *hid)
700{ 674{
701 struct usb_interface *intf = to_usb_interface(hid->dev.parent); 675 struct usb_interface *intf = to_usb_interface(hid->dev.parent);
@@ -723,10 +697,6 @@ static int usbhid_start_finish(struct hid_device *hid)
723 if ((hid->claimed & HID_CLAIMED_INPUT)) 697 if ((hid->claimed & HID_CLAIMED_INPUT))
724 hid_ff_init(hid); 698 hid_ff_init(hid);
725 699
726 if (hid->quirks & HID_QUIRK_SONY_PS3_CONTROLLER)
727 hid_fixup_sony_ps3_controller(interface_to_usbdev(intf),
728 intf->cur_altsetting->desc.bInterfaceNumber);
729
730 printk(KERN_INFO); 700 printk(KERN_INFO);
731 701
732 if (hid->claimed & HID_CLAIMED_INPUT) 702 if (hid->claimed & HID_CLAIMED_INPUT)
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index f66d2e43b5d5..a154a7dc1e63 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -46,8 +46,6 @@ static const struct hid_blacklist {
46 { USB_VENDOR_ID_PANTHERLORD, USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK, HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS }, 46 { USB_VENDOR_ID_PANTHERLORD, USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK, HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS },
47 { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT }, 47 { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT },
48 48
49 { USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER, HID_QUIRK_SONY_PS3_CONTROLLER | HID_QUIRK_HIDDEV },
50
51 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, 49 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET },
52 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET }, 50 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
53 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, 51 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },