HID: sony: Comply to Linux gamepad spec for DS4
authorRoderick Colenbrander <roderick.colenbrander@sony.com>
Wed, 23 Nov 2016 22:07:08 +0000 (14:07 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 28 Nov 2016 13:54:57 +0000 (14:54 +0100)
commit9131f8cc2b4eaf7c08d402243429e0bfba9aa0d6
tree8a4e69d3716c97050d3a42d7f9c2d37ae0b800af
parentac797b95f53276c132c51d53437e38dd912413d7
HID: sony: Comply to Linux gamepad spec for DS4

The DS4 side of hid-sony used the hid-core layer to assign buttons
and axes based on the HID report descriptors. The default mapping
was strange e.g. right stick using ABS_Z/ABS_RZ or the physical
'south button' being reported as BTN_EAST etcetera.

This patch makes the DS4 side ofi the hid-sony driver comply to
the Linux game controller spec as suggested in a discussion with
Dmitry on the linux-input list.

Currently the main user of the DS4 is the SDL2 library, which has
a mapping table using vendor/device/version as a key. In order to
not break SDL2 we discussed adjusting the version number, so it
can have both mappings. This was discust on linux-input and we
discussed privately with SDL2 developers.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c