]> git.baikalelectronics.ru Git - kernel.git/commit
HID: nintendo: add support for charging grip
authorDaniel J. Ogorchock <djogorchock@gmail.com>
Sat, 11 Sep 2021 17:36:34 +0000 (13:36 -0400)
committerJiri Kosina <jkosina@suse.cz>
Wed, 27 Oct 2021 08:05:52 +0000 (10:05 +0200)
commitc4ec8473e1735ed3c3a6e83b5abf0abde973bede
treeb8e62dc5636cb7a54cedea293e7872ff5f0e5e13
parent01befe4671d2670f18cec319adacf457d2d675a1
HID: nintendo: add support for charging grip

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: Daniel J. Ogorchock <djogorchock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-ids.h
drivers/hid/hid-nintendo.c