diff options
author | Frank Praznik <frank.praznik@oh.rr.com> | 2014-09-14 19:56:38 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-09-15 15:34:53 +0400 |
commit | fb291cbd3f9f7bd5873f112a6924b650440779c6 (patch) | |
tree | 7d78d6a6980649b5924b55e5c5f2916af3051253 /drivers/hid | |
parent | 9fddd74a238f03c322b373662803bd1ce80338da (diff) | |
download | linux-fb291cbd3f9f7bd5873f112a6924b650440779c6.tar.xz |
HID: sony: Corrections for the DualShock 4 HID descriptor
Fix a few minor issues in the HID descriptor:
- A 6 bit entry had a logical maximum of 255 when the largest it can be is 63.
- A logical max value was incorrectly being set to -1 instead of 255.
- Set the min/max of the gyroscopes to -8192/8191 as that is the range of
values which represent the true controller orientation. Any values beyond
those extents are just noise.
Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-sony.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index ecc6616ab550..75da56d0cfac 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -176,7 +176,7 @@ static u8 dualshock4_usb_rdesc[] = { 0x75, 0x06, /* Report Size (6), */ 0x95, 0x01, /* Report Count (1), */ 0x15, 0x00, /* Logical Minimum (0), */ - 0x25, 0x7F, /* Logical Maximum (127), */ + 0x25, 0x3F, /* Logical Maximum (63), */ 0x81, 0x02, /* Input (Variable), */ 0x05, 0x01, /* Usage Page (Desktop), */ 0x09, 0x33, /* Usage (Rx), */ @@ -200,14 +200,14 @@ static u8 dualshock4_usb_rdesc[] = { 0x81, 0x02, /* Input (Variable), */ 0x19, 0x43, /* Usage Minimum (43h), */ 0x29, 0x45, /* Usage Maximum (45h), */ - 0x16, 0xFF, 0xBF, /* Logical Minimum (-16385), */ - 0x26, 0x00, 0x40, /* Logical Maximum (16384), */ + 0x16, 0x00, 0xE0, /* Logical Minimum (-8192), */ + 0x26, 0xFF, 0x1F, /* Logical Maximum (8191), */ 0x95, 0x03, /* Report Count (3), */ 0x81, 0x02, /* Input (Variable), */ 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ 0x09, 0x21, /* Usage (21h), */ 0x15, 0x00, /* Logical Minimum (0), */ - 0x25, 0xFF, /* Logical Maximum (255), */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255), */ 0x75, 0x08, /* Report Size (8), */ 0x95, 0x27, /* Report Count (39), */ 0x81, 0x02, /* Input (Variable), */ @@ -509,8 +509,8 @@ static u8 dualshock4_bt_rdesc[] = { 0x81, 0x02, /* Input (Variable), */ 0x19, 0x43, /* Usage Minimum (43h), */ 0x29, 0x45, /* Usage Maximum (45h), */ - 0x16, 0xFF, 0xBF, /* Logical Minimum (-16385), */ - 0x26, 0x00, 0x40, /* Logical Maximum (16384), */ + 0x16, 0x00, 0xE0, /* Logical Minimum (-8192), */ + 0x26, 0xFF, 0x1F, /* Logical Maximum (8191), */ 0x95, 0x03, /* Report Count (3), */ 0x81, 0x02, /* Input (Variable), */ 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ |