aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoderick Colenbrander <roderick.colenbrander@sony.com>2016-10-07 15:39:39 -0400
committerJiri Kosina <jkosina@suse.cz>2016-10-10 04:43:26 -0400
commitbdae9e0e95364123fb7d372872bd7efd1760867c (patch)
treebae57910aefda7f51876879389ff2127297d4163
parentcdc1c0215ab449077cd160dde4fcd1c5f41dec6e (diff)
HID: sony: Adjust value range for motion sensors
The motion sensor values are 16-bit, so make the value range match. It is hard to reach the upper values, but they can be reached. At least the current accelerometer value of 8192 is very easy to pass. It is still not nice that the motion sensors live in no man's land in between ABS_MISC and ABS_MT_SLOT, but that's something for another time, which the proposed ABS_ACCEL_*/ABS_GYRO_* were meant for. Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-sony.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index b206d856d351..bd847906c770 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -405,14 +405,14 @@ static u8 dualshock4_usb_rdesc[] = {
405 0x19, 0x40, /* Usage Minimum (40h), */ 405 0x19, 0x40, /* Usage Minimum (40h), */
406 0x29, 0x42, /* Usage Maximum (42h), */ 406 0x29, 0x42, /* Usage Maximum (42h), */
407 0x16, 0x00, 0x80, /* Logical Minimum (-32768), */ 407 0x16, 0x00, 0x80, /* Logical Minimum (-32768), */
408 0x26, 0x00, 0x7F, /* Logical Maximum (32767), */ 408 0x26, 0xFF, 0x7F, /* Logical Maximum (32767), */
409 0x75, 0x10, /* Report Size (16), */ 409 0x75, 0x10, /* Report Size (16), */
410 0x95, 0x03, /* Report Count (3), */ 410 0x95, 0x03, /* Report Count (3), */
411 0x81, 0x02, /* Input (Variable), */ 411 0x81, 0x02, /* Input (Variable), */
412 0x19, 0x43, /* Usage Minimum (43h), */ 412 0x19, 0x43, /* Usage Minimum (43h), */
413 0x29, 0x45, /* Usage Maximum (45h), */ 413 0x29, 0x45, /* Usage Maximum (45h), */
414 0x16, 0x00, 0xE0, /* Logical Minimum (-8192), */ 414 0x16, 0x00, 0x80, /* Logical Minimum (-32768), */
415 0x26, 0xFF, 0x1F, /* Logical Maximum (8191), */ 415 0x26, 0xFF, 0x7F, /* Logical Maximum (32767), */
416 0x95, 0x03, /* Report Count (3), */ 416 0x95, 0x03, /* Report Count (3), */
417 0x81, 0x02, /* Input (Variable), */ 417 0x81, 0x02, /* Input (Variable), */
418 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ 418 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */
@@ -714,14 +714,14 @@ static u8 dualshock4_bt_rdesc[] = {
714 0x19, 0x40, /* Usage Minimum (40h), */ 714 0x19, 0x40, /* Usage Minimum (40h), */
715 0x29, 0x42, /* Usage Maximum (42h), */ 715 0x29, 0x42, /* Usage Maximum (42h), */
716 0x16, 0x00, 0x80, /* Logical Minimum (-32768), */ 716 0x16, 0x00, 0x80, /* Logical Minimum (-32768), */
717 0x26, 0x00, 0x7F, /* Logical Maximum (32767), */ 717 0x26, 0xFF, 0x7F, /* Logical Maximum (32767), */
718 0x75, 0x10, /* Report Size (16), */ 718 0x75, 0x10, /* Report Size (16), */
719 0x95, 0x03, /* Report Count (3), */ 719 0x95, 0x03, /* Report Count (3), */
720 0x81, 0x02, /* Input (Variable), */ 720 0x81, 0x02, /* Input (Variable), */
721 0x19, 0x43, /* Usage Minimum (43h), */ 721 0x19, 0x43, /* Usage Minimum (43h), */
722 0x29, 0x45, /* Usage Maximum (45h), */ 722 0x29, 0x45, /* Usage Maximum (45h), */
723 0x16, 0x00, 0xE0, /* Logical Minimum (-8192), */ 723 0x16, 0x00, 0x80, /* Logical Minimum (-32768), */
724 0x26, 0xFF, 0x1F, /* Logical Maximum (8191), */ 724 0x26, 0xFF, 0x7F, /* Logical Maximum (32767), */
725 0x95, 0x03, /* Report Count (3), */ 725 0x95, 0x03, /* Report Count (3), */
726 0x81, 0x02, /* Input (Variable), */ 726 0x81, 0x02, /* Input (Variable), */
727 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ 727 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */