From d4bdf2d2ba737c2c02ec014bdc2db40a030595d0 Mon Sep 17 00:00:00 2001 From: Nicolas Adenis-Lamarre Date: Wed, 20 Jun 2018 12:55:15 +0200 Subject: HID: wiimote: add support for Guitar-Hero devices This adds the drums and guitar extensions for Wiimote devices. Devices are reported as "Nintendo Wii Remote Guitar/Drums". If I ever get my hands on "RockBand" guitars, I will try to report them via the same interface so user-space does not have to bother which device it deals with. This is a rebase of the original commits 8e22ecb603c8 and 73f8645db191. They were reverted several years ago, since they were dependent on the ABS_* rework of the input core. Sadly, this never worked out so these commits were never pushed into a release. This rebase now uses the ABS_HAT* event codes to report all pressure information. Signed-off-by: Nicolas.Adenis-Lamarre (Original commits by Nicolas, adapted to v4.18 by David) Signed-off-by: David Herrmann Signed-off-by: Jiri Kosina --- drivers/hid/hid-wiimote.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/hid/hid-wiimote.h') diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h index 510ca77fe14e..3bf3d3cc1c38 100644 --- a/drivers/hid/hid-wiimote.h +++ b/drivers/hid/hid-wiimote.h @@ -89,6 +89,8 @@ enum wiimote_exttype { WIIMOTE_EXT_CLASSIC_CONTROLLER, WIIMOTE_EXT_BALANCE_BOARD, WIIMOTE_EXT_PRO_CONTROLLER, + WIIMOTE_EXT_DRUMS, + WIIMOTE_EXT_GUITAR, WIIMOTE_EXT_NUM, }; @@ -137,6 +139,7 @@ struct wiimote_state { /* calibration/cache data */ __u16 calib_bboard[4][3]; __s16 calib_pro_sticks[4]; + __u8 pressure_drums[7]; __u8 cache_rumble; }; -- cgit v1.2.3