diff options
-rw-r--r-- | drivers/hid/hid-sony.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index c71dbe0fe526..145579666f18 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
@@ -818,14 +818,18 @@ static __u8 ps3remote_rdesc[] = { | |||
818 | /* Use collection 1 for joypad buttons */ | 818 | /* Use collection 1 for joypad buttons */ |
819 | 0xA1, 0x02, /* MCollection Logical (interrelated data) */ | 819 | 0xA1, 0x02, /* MCollection Logical (interrelated data) */ |
820 | 820 | ||
821 | /* Ignore the 1st byte, maybe it is used for a controller | 821 | /* |
822 | * number but it's not needed for correct operation */ | 822 | * Ignore the 1st byte, maybe it is used for a controller |
823 | * number but it's not needed for correct operation | ||
824 | */ | ||
823 | 0x75, 0x08, /* GReportSize 0x08 [8] */ | 825 | 0x75, 0x08, /* GReportSize 0x08 [8] */ |
824 | 0x95, 0x01, /* GReportCount 0x01 [1] */ | 826 | 0x95, 0x01, /* GReportCount 0x01 [1] */ |
825 | 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */ | 827 | 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */ |
826 | 828 | ||
827 | /* Bytes from 2nd to 4th are a bitmap for joypad buttons, for these | 829 | /* |
828 | * buttons multiple keypresses are allowed */ | 830 | * Bytes from 2nd to 4th are a bitmap for joypad buttons, for these |
831 | * buttons multiple keypresses are allowed | ||
832 | */ | ||
829 | 0x05, 0x09, /* GUsagePage Button */ | 833 | 0x05, 0x09, /* GUsagePage Button */ |
830 | 0x19, 0x01, /* LUsageMinimum 0x01 [Button 1 (primary/trigger)] */ | 834 | 0x19, 0x01, /* LUsageMinimum 0x01 [Button 1 (primary/trigger)] */ |
831 | 0x29, 0x18, /* LUsageMaximum 0x18 [Button 24] */ | 835 | 0x29, 0x18, /* LUsageMaximum 0x18 [Button 24] */ |
@@ -850,8 +854,10 @@ static __u8 ps3remote_rdesc[] = { | |||
850 | 0x95, 0x01, /* GReportCount 0x01 [1] */ | 854 | 0x95, 0x01, /* GReportCount 0x01 [1] */ |
851 | 0x80, /* MInput */ | 855 | 0x80, /* MInput */ |
852 | 856 | ||
853 | /* Ignore bytes from 6th to 11th, 6th to 10th are always constant at | 857 | /* |
854 | * 0xff and 11th is for press indication */ | 858 | * Ignore bytes from 6th to 11th, 6th to 10th are always constant at |
859 | * 0xff and 11th is for press indication | ||
860 | */ | ||
855 | 0x75, 0x08, /* GReportSize 0x08 [8] */ | 861 | 0x75, 0x08, /* GReportSize 0x08 [8] */ |
856 | 0x95, 0x06, /* GReportCount 0x06 [6] */ | 862 | 0x95, 0x06, /* GReportCount 0x06 [6] */ |
857 | 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */ | 863 | 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */ |
@@ -1928,6 +1934,7 @@ static inline void sony_send_output_report(struct sony_sc *sc) | |||
1928 | static void sony_state_worker(struct work_struct *work) | 1934 | static void sony_state_worker(struct work_struct *work) |
1929 | { | 1935 | { |
1930 | struct sony_sc *sc = container_of(work, struct sony_sc, state_worker); | 1936 | struct sony_sc *sc = container_of(work, struct sony_sc, state_worker); |
1937 | |||
1931 | sc->send_output_report(sc); | 1938 | sc->send_output_report(sc); |
1932 | } | 1939 | } |
1933 | 1940 | ||
@@ -2507,8 +2514,10 @@ static const struct hid_device_id sony_devices[] = { | |||
2507 | .driver_data = VAIO_RDESC_CONSTANT }, | 2514 | .driver_data = VAIO_RDESC_CONSTANT }, |
2508 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE), | 2515 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE), |
2509 | .driver_data = VAIO_RDESC_CONSTANT }, | 2516 | .driver_data = VAIO_RDESC_CONSTANT }, |
2510 | /* Wired Buzz Controller. Reported as Sony Hub from its USB ID and as | 2517 | /* |
2511 | * Logitech joystick from the device descriptor. */ | 2518 | * Wired Buzz Controller. Reported as Sony Hub from its USB ID and as |
2519 | * Logitech joystick from the device descriptor. | ||
2520 | */ | ||
2512 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER), | 2521 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER), |
2513 | .driver_data = BUZZ_CONTROLLER }, | 2522 | .driver_data = BUZZ_CONTROLLER }, |
2514 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER), | 2523 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER), |