• Daniel J. Ogorchock's avatar
    HID: nintendo: add support for charging grip · 294a8287
    Daniel J. Ogorchock authored
    This patch adds support for the joy-con charging grip. The peripheral
    essentially behaves the same as a pro controller, but with two joy-cons
    attached to the grip. However the grip exposes the two joy-cons as
    separate hid devices, so extra handling is required. The joy-con is
    queried to check if it is a right or left joy-con (since the product ID
    is identical between left/right when using the grip).
    
    Since controller model detection is now more complicated, the various
    checks for hid product values have been replaced with helper macros to
    reduce code duplication.
    Signed-off-by: default avatarDaniel J. Ogorchock <djogorchock@gmail.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    294a8287
hid-nintendo.c 51.1 KB