diff options
author | Frank Praznik <frank.praznik@oh.rr.com> | 2014-09-14 11:56:38 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-09-15 07:34:53 -0400 |
commit | fb291cbd3f9f7bd5873f112a6924b650440779c6 (patch) | |
tree | 7d78d6a6980649b5924b55e5c5f2916af3051253 | |
parent | 9fddd74a238f03c322b373662803bd1ce80338da (diff) |
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>
-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[] = { | |||
176 | 0x75, 0x06, /* Report Size (6), */ | 176 | 0x75, 0x06, /* Report Size (6), */ |
177 | 0x95, 0x01, /* Report Count (1), */ | 177 | 0x95, 0x01, /* Report Count (1), */ |
178 | 0x15, 0x00, /* Logical Minimum (0), */ | 178 | 0x15, 0x00, /* Logical Minimum (0), */ |
179 | 0x25, 0x7F, /* Logical Maximum (127), */ | 179 | 0x25, 0x3F, /* Logical Maximum (63), */ |
180 | 0x81, 0x02, /* Input (Variable), */ | 180 | 0x81, 0x02, /* Input (Variable), */ |
181 | 0x05, 0x01, /* Usage Page (Desktop), */ | 181 | 0x05, 0x01, /* Usage Page (Desktop), */ |
182 | 0x09, 0x33, /* Usage (Rx), */ | 182 | 0x09, 0x33, /* Usage (Rx), */ |
@@ -200,14 +200,14 @@ static u8 dualshock4_usb_rdesc[] = { | |||
200 | 0x81, 0x02, /* Input (Variable), */ | 200 | 0x81, 0x02, /* Input (Variable), */ |
201 | 0x19, 0x43, /* Usage Minimum (43h), */ | 201 | 0x19, 0x43, /* Usage Minimum (43h), */ |
202 | 0x29, 0x45, /* Usage Maximum (45h), */ | 202 | 0x29, 0x45, /* Usage Maximum (45h), */ |
203 | 0x16, 0xFF, 0xBF, /* Logical Minimum (-16385), */ | 203 | 0x16, 0x00, 0xE0, /* Logical Minimum (-8192), */ |
204 | 0x26, 0x00, 0x40, /* Logical Maximum (16384), */ | 204 | 0x26, 0xFF, 0x1F, /* Logical Maximum (8191), */ |
205 | 0x95, 0x03, /* Report Count (3), */ | 205 | 0x95, 0x03, /* Report Count (3), */ |
206 | 0x81, 0x02, /* Input (Variable), */ | 206 | 0x81, 0x02, /* Input (Variable), */ |
207 | 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ | 207 | 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ |
208 | 0x09, 0x21, /* Usage (21h), */ | 208 | 0x09, 0x21, /* Usage (21h), */ |
209 | 0x15, 0x00, /* Logical Minimum (0), */ | 209 | 0x15, 0x00, /* Logical Minimum (0), */ |
210 | 0x25, 0xFF, /* Logical Maximum (255), */ | 210 | 0x26, 0xFF, 0x00, /* Logical Maximum (255), */ |
211 | 0x75, 0x08, /* Report Size (8), */ | 211 | 0x75, 0x08, /* Report Size (8), */ |
212 | 0x95, 0x27, /* Report Count (39), */ | 212 | 0x95, 0x27, /* Report Count (39), */ |
213 | 0x81, 0x02, /* Input (Variable), */ | 213 | 0x81, 0x02, /* Input (Variable), */ |
@@ -509,8 +509,8 @@ static u8 dualshock4_bt_rdesc[] = { | |||
509 | 0x81, 0x02, /* Input (Variable), */ | 509 | 0x81, 0x02, /* Input (Variable), */ |
510 | 0x19, 0x43, /* Usage Minimum (43h), */ | 510 | 0x19, 0x43, /* Usage Minimum (43h), */ |
511 | 0x29, 0x45, /* Usage Maximum (45h), */ | 511 | 0x29, 0x45, /* Usage Maximum (45h), */ |
512 | 0x16, 0xFF, 0xBF, /* Logical Minimum (-16385), */ | 512 | 0x16, 0x00, 0xE0, /* Logical Minimum (-8192), */ |
513 | 0x26, 0x00, 0x40, /* Logical Maximum (16384), */ | 513 | 0x26, 0xFF, 0x1F, /* Logical Maximum (8191), */ |
514 | 0x95, 0x03, /* Report Count (3), */ | 514 | 0x95, 0x03, /* Report Count (3), */ |
515 | 0x81, 0x02, /* Input (Variable), */ | 515 | 0x81, 0x02, /* Input (Variable), */ |
516 | 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ | 516 | 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ |