aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid
AgeCommit message (Collapse)AuthorFilesLines
2012-09-19HID: picoLCD: drop version check during probeBruno Prémont1-18/+0
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-19HID: wacom: Fix wacom_probe error handlingAxel Lin1-9/+14
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 <[email protected]> Tested-by: Przemo Firszt <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-18HID: sensors: remove some unneeded checksDan Carpenter1-9/+0
"report_id" is unsigned so it's never less than zero. These checks can be removed without any problem. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-09-18HID: sensors: use GFP_ATOMIC under spinlockDan Carpenter1-2/+2
We're holding a spinlock here so we can't call kmalloc() with GFP_KERNEL. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-09-18HID: sensors: fix up for mfd_add_devices() API changeStephen Rothwell1-1/+1
Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-09-18HID: wiimote: fix weight conversion error for values > 17kgFlorian Echtler1-1/+2
Signed-off-by: Florian Echtler <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-17HID: roccat: conditional blacklisting of Roccat modulesStefan Achatz1-0/+2
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-17HID: wiimote: Parse calibration data of balance boardsFlorian Echtler1-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 <[email protected]> Signed-off-by: Florian Echtler <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-17HID: wiimote: Add Nintendo Balance-Board supportDavid Herrmann1-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 <[email protected]> Signed-off-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-17HID: Fix return values in open_collection()Sachin Kamat1-3/+3
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-17HID: lenovo-tpkbd: Remove unnecessary casts of void pointersAxel Lin1-114/+33
container_of() never returns NULL, thus also remove the NULL checking for it. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-17HID: prodikeys: Remove unnecessary casts of void pointersAxel Lin1-9/+9
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-17HID: lg4ff: Remove unnecessary casts of void pointersAxel Lin1-2/+2
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-17HID: lg: Remove unnecessary casts of void pointersAxel Lin1-5/+5
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-16Merge 3.6-rc6 into staging-nextGreg Kroah-Hartman3-5/+8
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 <[email protected]>
2012-09-11HID: picolcd: fix build error if !CONFIG_DEBUG_FSAxel Lin1-5/+4
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-10HID: holtekff: use %*ph to dump small buffersAndy Shevchenko1-2/+1
Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-08HID: picoLCD: fix a NULL test in picolcd_raw_cir()Dan Carpenter1-1/+1
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 <[email protected]> Reviewed-by: Bruno Prémont <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-07Merge branch 'upstream-fixes' of ↵Linus Torvalds2-2/+6
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 Freund1-1/+3
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-07HID: primax: Remove px_probe() and px_remove() functionsAxel Lin1-25/+0
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-07HID: waltop: Remove waltop_probe() and waltop_remove() functionsAxel Lin1-29/+0
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 <[email protected]> Acked-by: Nikolai Kondrashov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-06HID: sensors: introduce sensor frameworksrinivas pandruvada3-0/+710
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-09-06HID: sensors: add to special driver listsrinivas pandruvada2-0/+11
Adding Intel and STM sensor hub in the list of drivers with specialized driver. Signed-off-by: srinivas pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-09-05dj: memory scribble in logi_djAlan Cox1-2/+2
Allocate a structure not a pointer to it ! Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-09-05HID: hid-lcpower: Use HID_UP_LOGIVENDOR instead of hard coded 0x0ffbc0000Axel Lin1-1/+1
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-05HID: picoLCD: use proper device as input_dev parentBruno Prémont1-1/+1
Signed-off-by: Bruno Prémont <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-05HID: picoLCD: fix dumping of IR_DATA reportBruno Prémont1-2/+2
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-05HID: picoLCD: optimize for inactive debugfsBruno Prémont1-1/+1
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-05HID: picoLCD: Add support for CIRBruno Prémont3-5/+98
Implement support for picoLCD's CIR header using RC_CORE for decoding the IR event stream. Signed-off-by: Bruno Prémont <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-05HID: picoLCD: rework hid-fbdev interactionBruno Prémont2-109/+126
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-05HID: picoLCD: prevent NULL pointer dereferencesBruno Prémont1-1/+1
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-05HID: remove Paul Walmsley's copyright from places where it shouldn't beJiri Kosina17-17/+0
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 <[email protected]> Acked-by: Paul Walmsley <[email protected]>
2012-09-03HID: Remove "default m" from HID_LOGITECH_DJJosh Triplett1-1/+0
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-09-02HID: update hid_have_special_driver[] explanationJiri Kosina1-1/+8
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 <[email protected]>
2012-09-02HID: Only dump input if someone is listeningHenrik Rydberg1-1/+2
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-27HID: uclogic: Add support for UC-Logic TWHA60Nikolai Kondrashov3-0/+100
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 <[email protected]>
2012-08-27Merge branch 'master' into upstreamJiri Kosina2-1/+2
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 Rydberg1-3/+9
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-27HID: Remove duplicate ID for QUANTA 3001 touchscreenSimon Farnsworth2-2/+1
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 <[email protected]> Acked-by: Henrik Rydberg <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-27HID: add NOGET quirk for Eaton Ellipse MAX UPSAlan Stern1-0/+1
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 <[email protected]> Reported-by: Laurent Bigonville <[email protected]> CC: <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-23Merge branch 'upstream-fixes' of ↵Linus Torvalds1-1/+0
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
2012-08-22HID: Remove QUANTA from special drivers listSimon Farnsworth1-1/+0
This QUANTA device is driven by the generic hid-multitouch.ko driver, and therefore shouldn't be in the special drivers list. This has been an oversight in 4fa3a58 ("HID: hid-multitouch: Switch to device groups"). Signed-off-by: Simon Farnsworth <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-22HID: picolcd: Add missing #include <linux/uaccess.h>Geert Uytterhoeven1-0/+1
m68k/allmodconfig: drivers/hid/hid-picolcd_debugfs.c: In function ‘picolcd_debug_reset_write’: drivers/hid/hid-picolcd_debugfs.c:54: error: implicit declaration of function ‘copy_from_user’ drivers/hid/hid-picolcd_debugfs.c: In function ‘picolcd_debug_eeprom_read’: drivers/hid/hid-picolcd_debugfs.c:112: error: implicit declaration of function ‘copy_to_user’ Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-20workqueue: deprecate system_nrt[_freezable]_wqTejun Heo1-1/+1
system_nrt[_freezable]_wq are now spurious. Mark them deprecated and convert all users to system[_freezable]_wq. If you're cc'd and wondering what's going on: Now all workqueues are non-reentrant, so there's no reason to use system_nrt[_freezable]_wq. Please use system[_freezable]_wq instead. This patch doesn't make any functional difference. Signed-off-by: Tejun Heo <[email protected]> Acked-By: Lai Jiangshan <[email protected]> Cc: Jens Axboe <[email protected]> Cc: David Airlie <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Rusty Russell <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: David Howells <[email protected]>
2012-08-20workqueue: deprecate flush[_delayed]_work_sync()Tejun Heo1-1/+1
flush[_delayed]_work_sync() are now spurious. Mark them deprecated and convert all users to flush[_delayed]_work(). If you're cc'd and wondering what's going on: Now all workqueues are non-reentrant and the regular flushes guarantee that the work item is not pending or running on any CPU on return, so there's no reason to use the sync flushes at all and they're going away. This patch doesn't make any functional difference. Signed-off-by: Tejun Heo <[email protected]> Cc: Russell King <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Mattia Dongili <[email protected]> Cc: Kent Yoder <[email protected]> Cc: David Airlie <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Karsten Keil <[email protected]> Cc: Bryan Wu <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Alasdair Kergon <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Cc: David Woodhouse <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Cc: Anton Vorontsov <[email protected]> Cc: Sangbeom Kim <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Eric Van Hensbergen <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Steven Whitehouse <[email protected]> Cc: Petr Vandrovec <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Avi Kivity <[email protected]>
2012-08-16HID: picolcd: using vmalloc() requires the include of vmalloc.hStephen Rothwell1-0/+1
Fixes thes build errors: drivers/hid/hid-picolcd_fb.c: In function 'picolcd_fb_destroy': drivers/hid/hid-picolcd_fb.c:350:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration] drivers/hid/hid-picolcd_fb.c: In function 'picolcd_init_framebuffer': drivers/hid/hid-picolcd_fb.c:508:2: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration] drivers/hid/hid-picolcd_fb.c:508:12: warning: assignment makes pointer from integer without a cast [enabled by default] Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-15HID: hidraw: improve error handling in hidraw_init()Alexey Khoroshilov1-4/+11
Several improvements in error handling: - do not report success if alloc_chrdev_region() failed - check for error code of cdev_add() - use unregister_chrdev_region() instead of unregister_chrdev() if class_create() failed Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-15HID: multitouch: Add ELAN production request when resume.Scott Liu1-0/+27
Add ELAN production request when resume. Some Elan legacy devices require SET_IDLE to be set on resume. It should be safe to send it to other devices too. Tested on 3M, Stantum, Cypress, Zytronic, eGalax, and Elan panels. Suggested by Benjamin Tissoires <[email protected]> Signed-off-by: Scott Liu <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-08-15HID: multitouch: Add support for eGalax 0x73f7Thierry Reding2-0/+4
Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>