summaryrefslogtreecommitdiff
path: root/drivers/hid
AgeCommit message (Collapse)Author
2012-09-19Merge branch 'for-next' of git://github.com/rydberg/linux into from-henrikJiri Kosina
Pull Input and HID updates for 3.7 from Henrik Rydberg: "The tree contains input core changes, Acked by Dmitry, which substantially reduces the irqsoff latency for all input devices. It also contains MT changes which allows further memory reduction, speedup and hardware support in the HID Multitouch driver. Lastly, you get the conversion of the bcm5974 driver to MT-B, which due to the mixed dependency of the tree fits better here than anywhere else." Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-19HID: hid-multitouch: Add Flatfrog supportHenrik Rydberg
Add support for the Flatfrog Multitouch 3200 panel. This panel advertises some fields that it does not use, hence the new quirk. Cc: Pablo Cases <pablo.cases@flatfrog.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19HID: hid-multitouch: Fix contact count on 3M panelsHenrik Rydberg
Some devices report the number of contacts via the unreliable CONTACTCOUNT usage, rather than using the CONTACTMAX feature. Without this patch, the 3M devices are constrained to the default maximum of ten fingers. Cc: Benjamin Tissoires <benjamin.tissoires@enac.fr> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19HID: hid-multitouch: Remove the redundant touch stateHenrik Rydberg
With the input_mt_sync_frame() function in place, there is no longer any need to keep the full touch state in the driver. This patch removes the slot state and replaces the lookup code with the input-mt equivalent. Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19HID: hid-multitouch: Simplify setup and frame synchronizationHenrik Rydberg
With the input_configured() callback in place, the setup and frame synchronization can be simplified. The input device initialization is moved to mt_input_configured(), to make sure the full HID report has been seen. Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19HID: Add an input configured notification callbackHenrik Rydberg
A hid device may create several input devices, and a driver may need to prepare or finalize the configuration per input device. Currently, there is no sane way for a driver to know when a device has been configured. This patch adds a callback providing that information. Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Tested-by: Ping Cheng <pingc@wacom.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19Input: MT - Add flags to input_mt_init_slots()Henrik Rydberg
Preparing to move more repeated code into the mt core, add a flags argument to the input_mt_slots_init() function. Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Tested-by: Ping Cheng <pingc@wacom.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start()Axel Lin
Current implementation of hid_hw_start() allows connect_mask to be 0. Setting hdev->claimed = HID_CLAIMED_INPUT before calling hid_hw_start() is not necessary. Remove it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-By: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-19HID: picoLCD: drop version check during probeBruno Prémont
Commit 4ea5454203d991ec85264f64f89ca8855fce69b0 [HID: Fix race condition between driver core and ll-driver] introduced new locking around probe/remove functions that prevents any report/reply from hardware to reach driver until it returned from probe. As such, the ask-reply way to checking picoLCD firmware version during probe is bound to timeout and let probe fail. Drop the check to let driver successfully probe again (until locking issues are resolved allowing to reinstate the check). Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-19HID: wacom: Fix wacom_probe error handlingAxel Lin
OLEDs/LED are not critical for tablet functioning thus ignore OLED/LED initialisation failures. This patch does clean up all the sysfs attribute files in error paths. Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-18HID: sensors: remove some unneeded checksDan Carpenter
"report_id" is unsigned so it's never less than zero. These checks can be removed without any problem. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-18HID: sensors: use GFP_ATOMIC under spinlockDan Carpenter
We're holding a spinlock here so we can't call kmalloc() with GFP_KERNEL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-18HID: sensors: fix up for mfd_add_devices() API changeStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-18HID: wiimote: fix weight conversion error for values > 17kgFlorian Echtler
Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17HID: roccat: conditional blacklisting of Roccat modulesStefan Achatz
Roccat devices are standard compatible, specific drivers are only needed for extended functionality. If Roccat drivers are not configured, hid-generic binds these devices now. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17HID: wiimote: Parse calibration data of balance boardsFlorian Echtler
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>
2012-09-17HID: wiimote: Add Nintendo Balance-Board supportDavid Herrmann
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>
2012-09-17HID: Fix return values in open_collection()Sachin Kamat
Return -ENOMEM instead of -1 if memory allocation fails. Return -EINVAL instead of -1 for stack overflow and underflow errors. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17HID: lenovo-tpkbd: Remove unnecessary casts of void pointersAxel Lin
container_of() never returns NULL, thus also remove the NULL checking for it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17HID: prodikeys: Remove unnecessary casts of void pointersAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17HID: lg4ff: Remove unnecessary casts of void pointersAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17HID: lg: Remove unnecessary casts of void pointersAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-16Merge 3.6-rc6 into staging-nextGreg Kroah-Hartman
This pulls in the staging tree fixes in 3.6-rc6 into our branch to resolve the merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11HID: picolcd: fix build error if !CONFIG_DEBUG_FSAxel Lin
Current code missed the definition for picolcd_debug_out_report, but add definition for picolcd_debug_raw_event twice. This patch fixes below build error: CC [M] drivers/hid/hid-picolcd_core.o In file included from drivers/hid/hid-picolcd_core.c:34:0: drivers/hid/hid-picolcd.h:176:20: error: redefinition of 'picolcd_debug_raw_event' drivers/hid/hid-picolcd.h:162:20: note: previous definition of 'picolcd_debug_raw_event' was here make[2]: *** [drivers/hid/hid-picolcd_core.o] Error 1 make[1]: *** [drivers/hid] Error 2 make: *** [drivers] Error 2 if CONFIG_DEBUG_FS is unset. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-10HID: holtekff: use %*ph to dump small buffersAndy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-08HID: picoLCD: fix a NULL test in picolcd_raw_cir()Dan Carpenter
Smatch complains that the NULL checking in this function is not consistent and could lead to a NULL dereference. The comments say that we should return here if rc_dev is NULL so I've changed the test to match the comment. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-07Merge branch 'upstream-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: "It contains a fix for Eaton Ellipse MAX UPS from Alan Stern, performance improvement (not processing debug data if noone is interested), by Henrik Rydberg, and allowing tpkbd-driven devices to work even with generic driver in a crippled mode, by Andres Freund." * 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured HID: Only dump input if someone is listening HID: add NOGET quirk for Eaton Ellipse MAX UPS
2012-09-07HID: tpkbd: work even if the new Lenovo Keyboard driver is not configuredAndres Freund
c1dcad2d32d0252e8a3023d20311b52a187ecda3 added a new driver configured by HID_LENOVO_TPKBD but made the hid_have_special_driver entry non-optional which lead to a recognized but non-working device if the new driver wasn't configured (which is the correct default). Signed-off-by: Andres Freund <andres@anarazel.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-07HID: primax: Remove px_probe() and px_remove() functionsAxel Lin
The px_probe() and px_remove() functions do not have any special initialization and cleanup. Remove them and let HID core handle the default probe/remove actions. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-07HID: waltop: Remove waltop_probe() and waltop_remove() functionsAxel Lin
The waltop_probe() and waltop_remove() functions do not have any special initialization and cleanup. Remove them and let HID core handle the default probe/remove actions. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-06HID: sensors: introduce sensor frameworksrinivas pandruvada
Adding processing for HID Sensor usage table as defined by HID 1.12, Request #: HUTRR39, dated 05 May, 2011. This driver uses HID driver framework to register, send and receive events. This uses MFD framework, so that actual processing for a specific usage id can be done in a different driver. For example an accelerometer driver can be a separate driver and use the interface provided by this driver to register for events. Signed-off-by: srinivas pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-06HID: sensors: add to special driver listsrinivas pandruvada
Adding Intel and STM sensor hub in the list of drivers with specialized driver. Signed-off-by: srinivas pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-05dj: memory scribble in logi_djAlan Cox
Allocate a structure not a pointer to it ! Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-05HID: hid-lcpower: Use HID_UP_LOGIVENDOR instead of hard coded 0x0ffbc0000Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-05HID: picoLCD: use proper device as input_dev parentBruno Prémont
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-05HID: picoLCD: fix dumping of IR_DATA reportBruno Prémont
The first payload byte indicates how many IR data bytes are following, not including itself. The IR data bytes appear in pairs as they represent a series of 16bit intervals. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-05HID: picoLCD: optimize for inactive debugfsBruno Prémont
Matthieu CASTET adjusted picolcd_debug_out_report() to only operate when there is an active listener on debugfs for events. Do the same on the more important picolcd_debug_raw_event() that is called in interrupt context as opposed to picolcd_debug_out_report() which happens in whichever context that sends reports to device. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-05HID: picoLCD: Add support for CIRBruno Prémont
Implement support for picoLCD's CIR header using RC_CORE for decoding the IR event stream. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-05HID: picoLCD: rework hid-fbdev interactionBruno Prémont
Split out all FB related data out of struct picolcd_data into a struct picolcd_fb_data that is allocated with fb_info. This way fb_info may cleanly outlive struct picolcd_data for as long as needed for its last user to drop his reference. Access to struct picolcd_data is now protected with struct picolcd_fb_data's lock and tile update reports are only generated while picolcd_fbdata->picolcd is not NULL and is not marked as failed (which indicates unplug in progress). Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-05HID: picoLCD: prevent NULL pointer dereferencesBruno Prémont
Driver code expects to get access to struct picolcd_data from hiddev and is not prepared to find a NULL pointer there. Most prominent candidate to trip on it is picolcd_fb_deferred_io(). Delay removing struct picolcd_data from hiddev until all sub-devices have been unregistered. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-05HID: remove Paul Walmsley's copyright from places where it shouldn't beJiri Kosina
Paul Walmsley has implemented dynamic quirk handling back in 2007 through commits: 2eb5dc30eb ("USB HID: encapsulate quirk handling into hid-quirks.c") 8222fbe67c ("USB HID: clarify static quirk handling as squirks") 8cef908235 ("USB HID: add support for dynamically-created quirks") 876b9276b9 ("USB HID: add 'quirks' module parameter") and as such, his copyright rightly belongs to drivers/hid/usbhid/hid-quirks.c file. However when generic HID code has been converted to bus and individual quirks separated out to individual drivers on the bus, the copyright has been blindly transfered into all the tiny drivers, which actually don't contain any of Pauls' copyrighted code. Remove the copyright from those sub-drivers. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Paul Walmsley <paul@pwsan.com>
2012-09-03HID: Remove "default m" from HID_LOGITECH_DJJosh Triplett
HID_LOGITECH_DJ uses "default m", which enables it in default kernel builds. Since this module just enables extra, non-critical functionality for one particular piece of hardware (specifically, differentiating multiple wireless keyboards and mice as separate input devices rather than treating them as one device), and the hardware works just fine with the default USB HID support, drop the "default m". Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-02HID: update hid_have_special_driver[] explanationJiri Kosina
Update the comment of hid_have_special_driver[] field to reflect the fact that multitouch devices don't need to be present there. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-02HID: Only dump input if someone is listeningHenrik Rydberg
Going through the motions of printing the debug message information takes a long time; using the keyboard can lead to a 160 us irqsoff latency. This patch skips hid_dump_input() when there are no open handles, which brings latency down to 100 us. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-08-27HID: uclogic: Add support for UC-Logic TWHA60Nikolai Kondrashov
Add support for UC-Logic Tablet TWHA60. It is known to be sold as Genius EasyPen M610 and Monoprice MP1060-HA60. As this tablet has several variations with different number and different assignments of frame buttons, they are simply mapped to F1-F24 range and are left for users to remap in userspace. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-08-27Merge branch 'master' into upstreamJiri Kosina
Sync with Linus' tree so that we don't have build falures due to Quanta 3001 ID reshuffling.
2012-08-27HID: hid-debug: Show rdesc for unclaimed devicesHenrik Rydberg
Since commit a7197c2e, the raw report descriptor is available also for unclaimed devices. This patchs make it show in the rdesc debugfs node. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-08-27HID: Remove duplicate ID for QUANTA 3001 touchscreenSimon Farnsworth
For some reason, we had two IDs for the QUANTA 3001 touchscreen controller, one USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001 and one USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN. As this has caused confusion, remove USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN completely, and fix places where it was used to refer to USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-08-27HID: add NOGET quirk for Eaton Ellipse MAX UPSAlan Stern
This patch (as1603) adds a NOGET quirk for the Eaton Ellipse MAX UPS device. (The USB IDs were already present in hid-ids.h, apparently under a different name.) Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Laurent Bigonville <l.bigonville@edpnet.be> CC: <stable@vger.kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-08-23Merge branch 'upstream-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fix from Jiri Kosina: "Fix for one particular device not being properly claimed by hid-multitouch driver" * 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: Remove QUANTA from special drivers list