Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180859
b: refs/heads/master
c: f9ce7c2
h: refs/heads/master
i:
  180857: cf0e3ba
  180855: 7c7ae76
v: v3
  • Loading branch information
Bastien Nocera authored and Jiri Kosina committed Feb 3, 2010
1 parent 3a20ace commit e70cfc9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46a709b900bfcf43244cd19cf3245c77484ec733
refs/heads/master: f9ce7c283c16538955d5d094101889792bcde109
1 change: 1 addition & 0 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,7 @@ static const struct hid_device_id hid_blacklist[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) },
Expand Down
21 changes: 19 additions & 2 deletions trunk/drivers/hid/hid-sony.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
* to "operational". Without this, the ps3 controller will not report any
* events.
*/
static int sony_set_operational(struct hid_device *hdev)
static int sony_set_operational_usb(struct hid_device *hdev)
{
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
struct usb_device *dev = interface_to_usbdev(intf);
Expand All @@ -73,6 +73,12 @@ static int sony_set_operational(struct hid_device *hdev)
return ret;
}

static int sony_set_operational_bt(struct hid_device *hdev)
{
unsigned char buf[] = { 0x53, 0xf4, 0x42, 0x03, 0x00, 0x00 };
return hdev->hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT);
}

static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
int ret;
Expand Down Expand Up @@ -101,7 +107,17 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
goto err_free;
}

ret = sony_set_operational(hdev);
switch (hdev->bus) {
case BUS_USB:
ret = sony_set_operational_usb(hdev);
break;
case BUS_BLUETOOTH:
ret = sony_set_operational_bt(hdev);
break;
default:
ret = 0;
}

if (ret < 0)
goto err_stop;

Expand All @@ -121,6 +137,7 @@ static void sony_remove(struct hid_device *hdev)

static const struct hid_device_id sony_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE),
.driver_data = VAIO_RDESC_CONSTANT },
{ }
Expand Down

0 comments on commit e70cfc9

Please sign in to comment.