summaryrefslogtreecommitdiffstats
path: root/drivers/hid
AgeCommit message (Collapse)AuthorFilesLines
2011-12-02Merge branch 'for-linus' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: Correct General touch PID
2011-11-23HID: Correct General touch PIDBenjamin Tissoires2-2/+2
Genera Touch told us that 0001 is their single point device and 0003 is the multitouch one. Apparently, we made the tests someone having a prototype, and not the final product. They said it should be safe to do the switch. This partially reverts 5572da0 ("HID: hid-mulitouch: add support for the 'Sensing Win7-TwoFinger'"). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-11-06Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds14-0/+14
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
2011-11-06hid/apple: modern macbook airs use the standard apple function key translationsLinus Torvalds1-3/+0
This removes the use of the special "macbookair_fn_keys" keyboard translation table for the MacBookAir4,x models (ie the 2011 refresh). They use the standard apple_fn_keys[] translation. Apparently only the old MacBook Air's need a different translation table. This mirrors the change that commit da617c7cb915 ("HID: consolidate MacbookAir 4,1 mappings") did for the WELLSPRING6A ones, but does it for the WELLSPRING6 model used on the MacBookAir4,2. Reported-and-tested-by: Dirk Hohndel <hohndel@infradead.org> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Joshua V Dillon <jvdillon@gmail.com> Cc: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-03Merge branch 'for-linus' of ↵Linus Torvalds5-52/+33
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: Revert "HID: multitouch: decide if hid-multitouch needs to handle mt devices" HID: drivers/hid/hid-roccat.c: eliminate a null pointer dereference HID: hid-apple: add device ID of another wireless aluminium HID: Add device IDs for Macbook Pro 8 keyboards
2011-11-01Revert "HID: multitouch: decide if hid-multitouch needs to handle mt devices"Henrik Rydberg1-43/+4
This reverts commit 0db3bfc72adf0c (""HID: multitouch: decide if hid-multitouch needs to handle mt devices"). The generic detection of hid-mt devices has two major flaws, and was merged prematurely. Firstly, the hid-multitouch gets loaded even when the device is handled by a special device. Secondly, the patch only partially duplicates the device whitelist already present in hid-core, effectively rendering a number of devices non-functional. Reported-by: Sean Young <sean@mess.org> Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-11-01HID: drivers/hid/hid-roccat.c: eliminate a null pointer dereferenceJulia Lawall1-9/+9
It is not possible to take the lock in device if device is NULL. The mutex_lock is thus moved after the NULL test. New error handling labels are added at the end to differentiate between the cases where different sets of locks should be unlocks, and between whether or not reader should be freed (only on error). The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ expression E, E1; identifier f; statement S1,S2,S3; @@ if (E == NULL) { ... when != if (E == NULL || ...) S1 else S2 when != E = E1 *E->f ... when any return ...; } else S3 // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-31hid: Fix up files needing export.h for EXPORT_SYMBOLPaul Gortmaker2-0/+2
With module.h being implicitly everywhere via device.h, the absence of explicitly including something for EXPORT_SYMBOL went unnoticed. Since we are heading to fix things up and clean module.h from the device.h file, we need to explicitly include these files now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31hid: Add module.h to fix up implicit users of itPaul Gortmaker12-0/+12
A pending cleanup will mean that module.h won't be implicitly everywhere anymore. Make sure the modular drivers in clocksource are actually calling out for <module.h> explicitly in advance. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-28HID: hid-apple: add device ID of another wireless aluminiumAndreas Krist3-0/+5
I've recently bought a Apple wireless aluminum keyboard (model 2011) which is not yet supported by the kernel - it seems they just changed the device id. After applying the attached patch, the device is fully functional. Signed-off-by: Andreas Krist <andreas.krist@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-28HID: Add device IDs for Macbook Pro 8 keyboardsGökçen Eraslan3-0/+15
This patch adds keyboard support for Macbook Pro 8 models which has WELLSPRING5A model name and 0x0252, 0x0253 and 0x0254 USB IDs. Trackpad support for those models are added to bcm5974 in c331eb580a0a7906c0cdb8dbae3cfe99e3c0e555 ("Input: bcm5974 - Add support for newer MacBookPro8,2). Signed-off-by: Gökçen Eraslan <gokcen@pardus.org.tr> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-25Merge branch 'pm-for-linus' of ↵Linus Torvalds2-5/+4
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm * 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (63 commits) PM / Clocks: Remove redundant NULL checks before kfree() PM / Documentation: Update docs about suspend and CPU hotplug ACPI / PM: Add Sony VGN-FW21E to nonvs blacklist. ARM: mach-shmobile: sh7372 A4R support (v4) ARM: mach-shmobile: sh7372 A3SP support (v4) PM / Sleep: Mark devices involved in wakeup signaling during suspend PM / Hibernate: Improve performance of LZO/plain hibernation, checksum image PM / Hibernate: Do not initialize static and extern variables to 0 PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too PM / Hibernate: Add resumedelay kernel param in addition to resumewait MAINTAINERS: Update linux-pm list address PM / ACPI: Blacklist Vaio VGN-FW520F machine known to require acpi_sleep=nonvs PM / ACPI: Blacklist Sony Vaio known to require acpi_sleep=nonvs PM / Hibernate: Add resumewait param to support MMC-like devices as resume file PM / Hibernate: Fix typo in a kerneldoc comment PM / Hibernate: Freeze kernel threads after preallocating memory PM: Update the policy on default wakeup settings PM / VT: Cleanup #if defined uglyness and fix compile error PM / Suspend: Off by one in pm_suspend() PM / Hibernate: Include storage keys in hibernation image on s390 ...
2011-10-25Merge branch 'upstream' into for-linusJiri Kosina12-53/+270
Conflicts: drivers/hid/hid-core.c drivers/hid/hid-ids.h
2011-10-25Merge branch 'upstream-fixes' into for-linusJiri Kosina5-42/+58
Conflicts: drivers/hid/hid-wacom.c
2011-10-25Merge branches 'acrux', 'logitech', 'multitouch', 'roccat' and 'wiimote' ↵Jiri Kosina17-129/+2460
into for-linus
2011-10-21HID: hid-magicmouse: Magic Trackpad has 1 button, not 2Daniel van Vugt1-0/+7
hid-magicmouse was advertising the Apple Magic Trackpad as having 2 buttons (left and right) when it actually only has 1 button. Advertising multiple buttons makes Xorg disable all button 2 and 3 emulation (using multi-finger clicks). So Xorg users don't get working right/middle-click emulation out of the box. This patch makes hid-magicmouse correctly only report one real button for Magic Trackpad, which in turn makes Xorg enable multi-finger click support to emulate right/middle buttons. [http://launchpad.net/bugs/862094] Signed-off-by: Daniel van Vugt <vanvugt@gmail.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-21HID: Add device IDs for more SJOY adaptersSean Young5-2/+18
Support the following models: Super Joy Box 3 Pro, Super Dual Box Pro and Super Joy Box 5 Pro. These models have support for pressure sensitive buttons and they can force the controller to either digital or analog mode, both of which are not supported yet. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-17HID: primax: remove spurious dependencyJiri Kosina1-2/+1
Remove Kconfig dependency for hid-primax driver on CONFIG_EXPERT. Please see changelog of 73d5e8f77e8 ("HID: fix up 'EMBEDDED' mess in Kconfig") for reasoning behind this. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-17HID: support primax keyboards violating USB HID specTerry Lambert5-0/+130
Primax keyboards with the issue this driver addresses report modifier keys as in band key events instead of as out of band modifier bits, resulting in the modifier keys generating key up events immediately before the keys they are intended to modify. This driver rewrites the raw report data from such keyboards into USB HID 1.11 compliant report data. It only matches the USB vendor and product IDs for the keyboard it has been tested on. Since there are several keyboards, notably a number of laptops and folding USB keyboards known to have similar unresolved problem reports, the list is expected to grow. Signed-off-by: Terry Lambert <tlambert@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-13HID: usbhid: cancel timer for retry synchronouslyOliver Neukum1-1/+1
This makes sure IO is never restarted while a reset is going on In particular there seems to be no protection from hid_retry_timeout() calling hid_start_in() which would start IO after hid_pre_reset() has already called hid_cease_io() because that uses del_timer(), not del_timer_sync() Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-08HID: wacom: Set input bits before registrationDavid Herrmann1-35/+41
We shouldn't change the event flags of input devices after they get registered. Otherwise, udev will not get notified of these flags and cannot setup the devices properly. This fixes the probing to set the input event flags on the input_mapped callback instead of the probe function. Reported-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Tested-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-07Merge branch 'pm-runtime' into pm-for-linusRafael J. Wysocki2-5/+4
* pm-runtime: PM / Tracing: build rpm-traces.c only if CONFIG_PM_RUNTIME is set PM / Runtime: Replace dev_dbg() with trace_rpm_*() PM / Runtime: Introduce trace points for tracing rpm_* functions PM / Runtime: Don't run callbacks under lock for power.irq_safe set USB: Add wakeup info to debugging messages PM / Runtime: pm_runtime_idle() can be called in atomic context PM / Runtime: Add macro to test for runtime PM events PM / Runtime: Add might_sleep() to runtime PM functions
2011-10-05HID: consolidate MacbookAir 4,1 mappingsJiri Kosina1-25/+0
MacbookAir 4,1 doesn't require extra mapping table, as the mappings are identical to apple_fn_keys[]. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-04HID: MacbookAir4,1 and MacbookAir4,2 need entry in hid_mouse_ignore_list[]Jiri Kosina1-0/+6
The respective mouse devices are already supported by bcm5974. Now that Nobuhiro Iwamatsu added support for keyboard to hid-apple driver, we need to ignore the mouse interfaces of these so that they can still be properly claimed by bcm5974 driver. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-10-03HID: Add support MacbookAir 4,1 keyboardNobuhiro Iwamatsu3-0/+37
Added USB device IDs and keyboard map for MacBookAir 4,1 keyboard. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-27HID: hidraw: open count should not increase if errorAmit Nagal1-1/+3
In hidraw_open, if hid_hw_power returns with error, hidraw device open count should not increase. Signed-off-by: Amit Nagal <helloin.amit@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-27HID: hiddev: potential info leak in hiddev_ioctl()Dan Carpenter1-0/+2
Smatch has a new check for Rosenberg type information leaks where structs are copied to the user with uninitialized stack data in them. In this case, the hiddev_devinfo struct has a two byte hole. struct hiddev_devinfo { __u32 bustype; /* 0 4 */ __u32 busnum; /* 4 4 */ __u32 devnum; /* 8 4 */ __u32 ifnum; /* 12 4 */ __s16 vendor; /* 16 2 */ __s16 product; /* 18 2 */ __s16 version; /* 20 2 */ /* XXX 2 bytes hole, try to pack */ __u32 num_applications; /* 24 4 */ Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-26HID: multitouch: decide if hid-multitouch needs to handle mt devicesBenjamin Tissoires1-4/+43
Now that hid-generic ignores all win7 compatible multitouch devices, this patch allows hid-multitouch to catch them. The idea is to rely on the quirk HID_QUIRK_MULTITOUCH to drop the device if no ContactID is given. There is the need for a blacklist here as other devices may need a special driver (ntrig for instance). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-26HID: add autodetection of multitouch devicesBenjamin Tissoires2-0/+17
As mentioned by http://www.microsoft.com/whdc/device/input/DigitizerDrvs_touch.mspx multitouch devices are those that have the input report HID_CONTACTID. This patch detects this and unloads the generic-usb driver. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-22HID: "hid-logitech" driver with Logitech Driving Force GTMichal Malý1-0/+1
There's been a small oversight when adding support for Logitech Driving Force GT. Entry in hid-core was missing so the generic driver instead of hid-logitech was being used. Signed-off-by: Michal Malý <madcatxster@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-20HID: hid-logitech-dj: fix off by oneNestor Lopez Casado2-5/+5
There is a bug where a device with index 6 would write out of bounds in the array of paired devices. This patch fixes that problem. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Olivier Gay <ogay@logitech.com> Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-20HID: hidraw: protect hidraw_disconnect() betterJames Hogan1-2/+2
The function hidraw_disconnect() only acquires the hidraw minors_lock when clearing the entry in hidraw_table. However the device_destroy() call can cause a userland read/write to return with an error. It may cause the program to release the file descripter before the disconnect is finished. hidraw_disconnect() has already set hidraw->exist to 0, which makes hidraw_release() kfree the hidraw structure, which hidraw_disconnect() continues to access and even tries to kfree again. Similarly if a hidraw_release() occurs after setting hidraw->exist to 0, the same thing can happen. This is fixed by expanding the mutex critical section to cover the whole function from setting hidraw->exist to 0 to freeing the hidraw structure, preventing a hidraw_release() from interfering. Signed-off-by: James Hogan <james.hogan@imgtec.com> Tested-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-20HID: hid-multitouch: add support for the IDEACOM 6650 chipStephane Chatty3-10/+25
The IDEACOM 6650 multitouch chip, present in various all-in-one computers, uses the serial version of the HID multitouch protocol. No existing class supports this. In principle, the new MT_CLS_SERIAL should work for other serial panels as well, perhaps including some eGalax panels. Signed-off-by: Stephane Chatty <chatty@enac.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-16Merge branch 'for-linus' of git://github.com/dtor/inputLinus Torvalds1-0/+2
* 'for-linus' of git://github.com/dtor/input: Input: wacom - fix touch parsing on newer Bamboos Input: bcm5974 - add MacBookAir4,1 trackpad support Input: wacom - add POINTER and DIRECT device properties Input: adp5588-keys - remove incorrect modalias Input: cm109 - fix checking return value of usb_control_msg Input: wacom - advertise BTN_TOOL_PEN and BTN_STYLUS for PenPartner Input: wacom - remove pressure for touch devices
2011-09-15HID: Add full support for Logitech Unifying receiversNestor Lopez Casado6-0/+1059
With this driver, all the devices paired to a single Unifying receiver are exposed to user processes in separated /input/dev nodes. Keyboards with different layouts can be treated differently, Multiplayer games on single PC (like home theater PC) can differentiate input coming from different kbds paired to the same receiver. Up to now, when Logitech Unifying receivers are connected to a Linux based system, a single keyboard and a single mouse are presented to the HID Layer, even if the Unifying receiver can pair up to six compatible devices. The Unifying receiver by default multiplexes all incoming events (from multiple keyboards/mice) into these two. Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-08Input: wacom - add POINTER and DIRECT device propertiesJason Gerecke1-0/+2
Adds INPUT_PROP_POINTER or INPUT_PROP_DIRECT as necessary to the hardware supported by the Wacom driver. The DIRECT property is assigned to devices with an embedded screen (i.e. touchscreens and display tablets). The POINTER property is assigned to those without embedded screens. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-07Merge branches 'upstream-fixes' and 'magicmouse' into for-linusJiri Kosina4-23/+67
2011-09-07HID: hidraw: free list for all error in hidraw_openAmit Nagal1-1/+2
In function hidraw_open struct hidraw_list *list should be freed for all error conditions. Signed-off-by: Amit Nagal <helloin.amit@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: roccat: Kone now reports external profile changes via roccat deviceStefan Achatz1-1/+15
Profile changes were only reported when issued mouse internal. Now all changes are reported. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: roccat: cleaned up code for Kone and fixed wrong initialization valueStefan Achatz1-21/+22
Introduced function kone_profile_activated() to reduce code duplication. This by the way fixes a wrong initialization value. Also fixes early mutex unlocks. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: roccat: Kovaplus now reports external profile changes via roccat deviceStefan Achatz1-2/+15
Profile changes were only reported when issued mouse internal. Now all changes are reported. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: roccat: Pyra now reports external profile changes via roccat deviceStefan Achatz1-8/+15
Profile changes were only reported when issued mouse internal. Now all changes are reported. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: roccat: Fixed false dpi reporting when using osd eventStefan Achatz1-2/+2
Actual dpi resolution was set on wrong occassion. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: wacom: Unregister sysfs attributes on removeDavid Herrmann1-0/+1
HID devices can be hotplugged so we should unregister all sysfs attributes when removing a driver. Otherwise, manually unloading the wacom-driver will not remove the sysfs attributes. Only when the device is disconnected, they are removed, eventually. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: wacom: Fix error path of power-supply initializationDavid Herrmann1-12/+9
power_supply_unregister() must not be called if power_supply_register() failed. The wdata->psy.dev pointer may point to invalid memory after a failed power_supply_register() and hence wacom_remove() will fail while calling power_supply_unregister(). This changes the wacom_probe function to fail if it cannot register the power_supply devices. If we would want to keep the previous behaviour we had to keep some flag about the power_supply state and check it on wacom_remove, but this seems inappropriate here. Hence, we simply fail, too, if power_supply_register fails. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: wiimote: Add MAINTAINERS entryDavid Herrmann1-1/+1
Add entry to MAINTAINERS and also bump version level as the core driver is feature complete now. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: wiimote: Read wiimote battery charge levelDavid Herrmann2-0/+61
This registers a power_supply device for every remote to retrieve the current battery charge level. Since this information is not sent by the wiimote continously, we need to explicitely request it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: wiimote: Add status requestDavid Herrmann1-0/+18
The wiimote does not send status reports continuously so this adds a helper function to request a status report and parses the battery charge level. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: wiimote: Initialize IR cam on requestDavid Herrmann1-0/+28
Initialize the IR cam if the related input device is opened by userspace. Stop IR cam again if userspace is no longer interested in its data events. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07HID: wiimote: Add IR initializerDavid Herrmann1-0/+136
The wiimote IR cam needs a fairly complex initialization sequence. This adds a helper function that performs IR initialization synchronously. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>