summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-wiimote-ext.c
Commit message (Collapse)AuthorAgeFilesLines
* HID: wiimote: fix weight conversion error for values > 17kgFlorian Echtler2012-09-181-1/+2
| | | | | Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Parse calibration data of balance boardsFlorian Echtler2012-09-171-1/+38
| | | | | | | | | | | The raw pressure-data that is reported by balance-boards is pretty useless unless calibration data is applied. Therefore, we read the full calibration data on extension initialization and apply it to every reported data. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Add Nintendo Balance-Board supportDavid Herrmann2012-09-171-0/+59
| | | | | | | | | | | The Nintendo Balance-Board is a controller which behaves exactly like the Wii Remote but reports all its data through a special extension device. Hence, we can simply add the Balance-Board as extension device and we get full support for it. Tested-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote-ext: comment spelling fixGiuseppe Bilotta2012-06-051-1/+1
| | | | | Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Parse classic controller dataDavid Herrmann2011-11-221-0/+156
| | | | | | | | | Nintendo Classic Controller extension reports lots of keys, two analog sticks and two analog buttons. We report all data through extension input device to userspace. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Parse nunchuck dataDavid Herrmann2011-11-221-1/+104
| | | | | | | | | The Nintendo Nunchuck extension reports accelerometer values, one analog stick and two buttons. See inline comments for data layout. We report all data to userspace through extension input device. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Parse motion+ dataDavid Herrmann2011-11-221-0/+70
| | | | | | | | | | | | | | 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>
* HID: wiimote: Add extension handler stubsDavid Herrmann2011-11-221-0/+29
| | | | | | | | | | | | | All supported extensions report data as 6 byte block. All DRMs with extension data provide at least 6 extension bytes. Hence a generic handler for all extension bytes is sufficient and can be called on all DRMs. The handler distinguishes the input and passes it to the right handler. Motion+ passes data interleaved so we can have Motion+ and a regular extension enabled simultaneously. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Register input devices for extensionsDavid Herrmann2011-11-221-3/+106
| | | | | | | | | Motion+ and regular extensions are physical adapters for the wiimote so create one input device for each of them. This also allows to enable only opened extensions and turn unused extenions off to save battery power. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Add extension sysfs attributeDavid Herrmann2011-11-221-0/+46
| | | | | | | | Add new sysfs attribute "extension" which returns the currently connected and initialized extensions. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Add extension initializersDavid Herrmann2011-11-221-2/+79
| | | | | | | | | The wiimote extension registers are not fully understood, so we always disable all extensions on extension-port events. Then we reinitialize and reidentify them and activate all requested extensions. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Add extension initializer stubsDavid Herrmann2011-11-221-0/+38
| | | | | | | | Add stub functions to read and identify extensions and then initialize all connected extensions. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: wiimote: Add extension support stubDavid Herrmann2011-11-221-0/+130
The wiimote supports several extensions. This adds a separate source file which handles all extensions and can be disabled at compile-time. The driver reacts on "plug"-events on the extension port and starts a worker which initializes or deinitializes the extensions. Currently, the initialization logic is not fully understood and we can only detect and enable all extensions when all extensions are deactivated. Therefore, we need to disable all extensions, then detect and activate them again to react on "plug"-events. However, deactivating extensions will generate a new "plug"-event and we will never leave that loop. Hence, we only support extensions if they are plugged before the wiimote is connected (or before the ext-input device is opened). In the future we may support full extension hotplug support, but reverse-engineering this may take a while. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
OpenPOWER on IntegriCloud