• Roderick Colenbrander's avatar
    HID: sony: Comply to Linux gamepad spec for DS4 · 9131f8cc
    Roderick Colenbrander authored
    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: default avatarRoderick Colenbrander <roderick.colenbrander@sony.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    9131f8cc
hid-sony.c 102 KB