From f1d4bed45b553dda2be402e427d8d708c4dca85d Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 5 May 2013 23:12:58 +0200 Subject: HID: wiimote: add Balance Board support This adds Nintendo Wii Balance Board support to the new HOTPLUG capable wiimote core. It is mostly copied from the old extension. This also adds Balance Board device detection. Whenever we find a device that supports the balance-board extension, we assume that it is a real balance board and disable unsupported hardward like accelerometer, IR, rumble and more. Signed-off-by: David Herrmann Signed-off-by: Jiri Kosina --- drivers/hid/hid-wiimote.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/hid/hid-wiimote.h') diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h index 0afc9f9a9bd..8d314ae429b 100644 --- a/drivers/hid/hid-wiimote.h +++ b/drivers/hid/hid-wiimote.h @@ -73,12 +73,14 @@ enum wiimote_devtype { WIIMOTE_DEV_GENERIC, WIIMOTE_DEV_GEN10, WIIMOTE_DEV_GEN20, + WIIMOTE_DEV_BALANCE_BOARD, WIIMOTE_DEV_NUM, }; enum wiimote_exttype { WIIMOTE_EXT_NONE, WIIMOTE_EXT_UNKNOWN, + WIIMOTE_EXT_BALANCE_BOARD, WIIMOTE_EXT_NUM, }; @@ -123,6 +125,9 @@ struct wiimote_state { __u8 cmd_err; __u8 *cmd_read_buf; __u8 cmd_read_size; + + /* calibration data */ + __u16 calib_bboard[4][3]; }; struct wiimote_data { @@ -136,6 +141,10 @@ struct wiimote_data { struct wiimote_ext *ext; struct wiimote_debug *debug; + union { + struct input_dev *input; + } extension; + struct wiimote_queue queue; struct wiimote_state state; struct work_struct init_worker; -- cgit v1.2.3-70-g09d2