summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-wiimote.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-05-06 01:12:58 +0400
committerJiri Kosina <jkosina@suse.cz>2013-06-03 13:07:03 +0400
commitf1d4bed45b553dda2be402e427d8d708c4dca85d (patch)
tree182ad53d5c28f5f1e3e8696f16e36c7ea61cef58 /drivers/hid/hid-wiimote.h
parent4148b6bf8a4a4d6e533329775370ccf49778c061 (diff)
downloadlinux-f1d4bed45b553dda2be402e427d8d708c4dca85d.tar.xz
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 <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wiimote.h')
-rw-r--r--drivers/hid/hid-wiimote.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h
index 0afc9f9a9bd6..8d314ae429b6 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;