HID: wiimote: Parse motion+ data
authorDavid Herrmann <dh.herrmann@googlemail.com>
Thu, 17 Nov 2011 13:12:07 +0000 (14:12 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 22 Nov 2011 22:09:45 +0000 (23:09 +0100)
commitb17b57a5d0fcfc1d6ba582a086b3a22510aef03d
tree7f15f6289c72ab1dc2a8ea5dc311102e08457230
parent0b6815d75d8bf214998455d94061a40f3b4a77f3
HID: wiimote: Parse motion+ data

Motion+ reports rotation gyro data which we report to userspace as ABS_RX/Y/Z
values. The device reports them either in fast or slow mode. We adjust the
values to get a linear scale so userspace does not need to know about slow and
fast mode.

The motion+ also reports whether an extension is connected to it. We keep track
of this value and reinitialize the extensions if an extension is plugged or
unplugged.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-wiimote-ext.c