summaryrefslogtreecommitdiff
path: root/drivers/hid
AgeCommit message (Collapse)Author
2008-05-20HID: remove CVS keywordsAdrian Bunk
This patch removes CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-05-20HID: Add iMON LCDs to blacklistDylan R Semler
The new iMON LCDs from SoundGraph need to be blacklisted from HID in order to be used by lirc. Signed-off-by: Dylan R Semler <dylan.semler@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-05-20HID: add Microchip PICKit 1 and PICkit 2 to blacklistXiaofan Chen
Microchip PICkit 1 and PICKit 2 USB Programmers are USB HID class of device but they are not real HID device. They are now supported by libusb based programs like the following programs. pk2 and pk2cmd Linux port: http://home.pacbell.net/theposts/picmicro/ usb_pickit: http://tfc.duke.free.fr/pickit.html usb_pickit original version: http://charm.cs.uiuc.edu/users/olawlor/projects/2003/microchip/ Therefore it ispreferred to blacklist them. Signed-off-by: Xiaofan Chen <xiaofanc@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-05-20HID: split Numlock emulation quirk from HID_QUIRK_APPLE_HAS_FN.Diego 'Flameeyes' Petteno
Since 2.6.25 the HID_QUIRK_APPLE_HAS_FN quirk is enabled even for non-laptop Apple keyboards of the Aluminium series. The USB version of these don't need Numlock emulation, like the laptop (and Aluminium Wireless) do, as they have a proper keypad. This patch splits the Numlock emulation for Apple keyboards in a different quirk flag, so that it can be enabled for all the keyboards but the Aluminium USB ones. If the Numlock emulation is enabled for Aluminium USB keyboards, the JKL and UIO keys become the numeric pad, and the rest of the keyboard is disabled, included the key used to disable Numlock. Additionally, these keyboard should not have a Numlock at all, as the Numlock key is instead replaced by the 'Clear' key as usual for Apple USB keyboards. Signed-off-by: Diego 'Flameeyes' Petteno <flameeyes@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-29hid-core: use get_unaligned_* helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28usbhid endianness annotations and fixesAl Viro
usb_control_msg() converts arguments to little-endian itself, doing that in caller means breakage on big-endian boxen. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits) Input: wacom - add support for Cintiq 20WSX Input: ucb1400_ts - IRQ probe fix Input: at32psif - update MODULE_AUTHOR with new email Input: mac_hid - add lockdep annotation to emumousebtn Input: i8042 - fix incorrect usage of strncpy and strncat Input: bf54x-keys - add infrastructure for keypad wakeups Input: add MODULE_ALIAS() to hotpluggable platform modules Input: drivers/char/keyboard.c - use time_after Input: fix ordering in joystick Makefile Input: wm97xx-core - support use as a wakeup source Input: wm97xx-core - use IRQF_SAMPLE_RANDOM Input: wm97xx-core - only schedule interrupt handler if not already scheduled Input: add Zhen Hua driver Input: aiptek - add support for Genius G-PEN 560 tablet Input: wacom - implement suspend and autosuspend Input: xpad - set proper buffer length for outgoing requests Input: omap-keypad - fix build warning Input: gpio_keys - irq handling cleanup Input: add PS/2 serio driver for AVR32 devices Input: put ledstate in the keyboard notifier ...
2008-04-22HID: Suppress hidinput for Samsung IR controlRobert Schedel
Samsung USB remotes (0419:0001) report six keys via standard HID usage pages (arrow keys, OK, Power). Kernel 2.6.25 maps those to input events (in addition to the hiddev report). The remaining 43 keys are reported via proprietary HID report page and therefore by hiddev only. Applications using hiddev and input device might process the 6 standard keys twice. To avoid this, the input device will be suppressed for the Samsung remote with a quirk entry, forcing to use the hiddev device only. LIRC already contains the proper support. Signed-off-by: Robert Schedel <r.schedel@yahoo.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: remove 60x GTCO devices from blacklistJiri Kosina
Jeremy Robertson reports that GTCO engineers made a mistake and we don't need 0x60x GTCO product ids blacklisted. This mostly reverts dda3fd35, but leaves PID 0x1007 intact. Reported-by: Jeremy Roberson <jeremy.roberson@einstruction.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: WiseGroup 866 Dual Joypad needs output reports quirkJiri Kosina
WiseGroup Ltd, MP-8866 Dual Joypad needs to skip output reports, as it contains force-feedback output reports. Reported-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: ThrustMaster FF driver is no longer experimentalJiri Kosina
There is no need to keep a few years old ThrustMaster force-feedback driver as experimental. HID_FF is currently marked experimental anyway, so this is even redundant. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: Logitech diNovo Mini pad supportJiri Kosina
Logitech diNovo Mini needs DUPLICATE_USAGES quirk. Reported-by: Tom Horsley <tom.horsley@att.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: fix race between open() and disconnect() in usbhidOliver Neukum
There is a window: task A task B spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ usb_set_intfdata(intf, NULL); spin_unlock_irq(&usbhid->inlock); usb_kill_urb(usbhid->urbin); usb_kill_urb(usbhid->urbout); usb_kill_urb(usbhid->urbctrl); del_timer_sync(&usbhid->io_retry); cancel_work_sync(&usbhid->reset_work); if (!hid->open++) { res = usb_autopm_get_interface(usbhid->intf); if (res < 0) { hid->open--; return -EIO; } } if (hid_start_in(hid)) if (hid->claimed & HID_CLAIMED_INPUT) hidinput_disconnect(hid); in which an open() to an already disconnected device will submit an URB to an undead device. In case disconnect() was called by an ioctl, this'll oops. Fix by introducing a new flag and checking it in hid_start_in(). Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: make hid_input_field and usbhid_modify_dquirk staticAdrian Bunk
This patch makes the following needlessly global functions static: - hid-core.c:hid_input_field() - usbhid/hid-quirks.c:usbhid_modify_dquirk() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: pass numbered reports properly to hidrawJiri Kosina
The numbered reports need to be passed properly to hidraw (i.e. with the first data field indicating the report number), otherwise userspace has no idea about the identification of the report. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: fix misplaced rdesc quirkJiri Kosina
This moves the misplaced rdesc quirk to the place where it belongs. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: force feedback driver for Logitech Rumblepad 2Anssi Hannula
Add force feedback support for Logitech Rumblepad 2. Tested-By: Edgar Simo <bobbens@gmail.com> Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: move wait from hid to usbhidJiri Slaby
Since only place where this is used is usbhid, move it there. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: fix sparse warningsJiri Slaby
Fix these sparse warnings: .../hid/hid-core.c:100:15: warning: incorrect type in assignment (different signedness) .../hid/hid-core.c:100:15: expected signed int [usertype] *value .../hid/hid-core.c:100:15: got unsigned int *<noident> by unsigned -> s32 .../hid/hid-input-quirks.c:336:10: warning: Using plain integer as NULL pointer by 0 -> NULL .../hid/usbhid/hid-core.c:786:46: warning: incorrect type in argument 3 (different signedness) .../hid/usbhid/hid-core.c:786:46: expected int *max .../hid/usbhid/hid-core.c:786:46: got unsigned int *<noident> .../hid/usbhid/hid-core.c:787:47: warning: incorrect type in argument 3 (different signedness) .../hid/usbhid/hid-core.c:787:47: expected int *max .../hid/usbhid/hid-core.c:787:47: got unsigned int *<noident> .../hid/usbhid/hid-core.c:788:48: warning: incorrect type in argument 3 (different signedness) .../hid/usbhid/hid-core.c:788:48: expected int *max .../hid/usbhid/hid-core.c:788:48: got unsigned int *<noident> by int -> unsigned int Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: only dump report traffic with debug level 2Anssi Hannula
Currently using debug=1 with hid module prints out all sent and received reports to the kernel log, while in many cases we only want to see the report descriptors and hid-input mappings that are printed when a device is probed. Add new level debug=2, and only dump the report traffic with that level. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: patch to add NOGET for DMI/AcomdataPete Zaitcev
This must be the weirdest failure yet. My external disk stops processing the storage commands the moment it receives a GET_REPORT. The firmware does not crash; if I do rmmod hid, then SET-INTERFACE restores normal operations. Still, I cannot live without the keyboard when I want backup my files. Adding the NOGET quirk fixes this problem for me. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: Sunplus Wireless Desktop needs report descriptor fixupJiri Kosina
This device has reports lower logical maximum compared to the real usages for Zoom+ and Zoom- it emits. This patch bumps the values in the report descriptor up, and also adjusts HID_MAX_USAGE accordingly. Reported-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: quirk for MS Wireless Desktop Receiver (model 1028)Jim Duchek
Microsoft's wireless desktop receiver (Model 1028) has a bug in the report descriptor -- namely, in four seperate places it uses USAGE_MIN and _MAX when it quite obviously doesn't intend to. In other words, it reports that it has pretty much _everything_ in 'consumer' and 'generic desktop'. And then the X evdev driver believes I have a mouse with 36 absolute axes and a huge pile of keys and buttons, when I in fact, should have zero. 255/256 in three of the cases, and 0-1024 in another. This patch fixes the report descriptor of this device before it enters the HID parser. Signed-off-by: Jim Duchek <jim.duchek@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbdPekka Sarnila
Many vendors highspeed devices give erroneously fullspeed interval value in endpoint descriptor for interrupt endpoints. This quirk fixes up that by recalculating the right value for highspeed device. At the time of hid configuration this quirk calculates which highspeed interval value gives same interval delay as, or next smaller then, what it would be if the original value would be interpreted as fullspeed value. In subsequent urbs that new value is used instead. Forming the 'hid->name' in usb_hid_config() was moved up to accommodate more descriptive printk reporting the fixup. In this patch the quirk is set for one such device: Afatech DVB-T 2 infrared HID-keyboard. It reports value 16 which means 4,069s in highspeed while obviously 16ms was intended. In this case quirk calculates new value to be 8 which gives when interpreted as highspeed value 16ms as wanted. The behavior of the device was verified to be what expected both before and after the patch. Signed-off-by: Pekka Sarnila <sarnila@adit.fi> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22HID: fix build failure in hiddev_ioctl with gcc 3.2Jean Delvare
Fix build failure in hiddev_ioctl with gcc 3.2: http://bugzilla.kernel.org/show_bug.cgi?id=10121 The trick is to move the handling of ioctls which need to allocate memory to separate functions. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-15Input: aiptek - add support for Genius G-PEN 560 tabletGuryanov Dmitry
USBHID driver only supports relative mode with this tablet so let aiptek module handle it. Signed-off-by: Dmitry Guryanov <guryanov@dgap.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-03-18HID: update key codes for Apple aluminiumMichael Hanselmann
F5 and F6 have no second function printed on them. Thus their definitions have been removed from the table. KEY_CYCLEWINDOWS doesn't name the function of Mac OS X' Expose properly and because we couldn't find a better key code, we decided to use KEY_FN_F4 instead. We also changed KEY_BACK and KEY_FORWARD, which apply to browser functions, to KEY_PREVIOUSSONG and KEY_NEXTSONG, since the keys are intended to control a music player. Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-03-18HID: fix comment in hid_input_report()Jiri Kosina
The hid_input_report() in debug mode of course outputs the report itself, not the device report descriptor. Fix this error in comment. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-03-18HID: BADPAD entry for NATSU Playstation USB adapterAndrew Burton
Add quirk entry for BADPAD for the NATSU Playstation USB adapter. The adapter is supported under Linux, but with bad direction detection. Signed-off-by: Andrew Burton <adb@iinet.net.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-03-18HID: Use DIV_ROUND_UPJulia Lawall
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-03-18HID: remove HID_QUIRK_APPLE_ISO_KEYBOARD for 4th generation macbookTobias Mueller
4th generation MacBook (product id 0x022a) from Apple doesn't need HID_QUIRK_APPLE_ISO_KEYBOARD fix anymore. Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-02-13HID: add USB IDs for MacBook 3rd generationTobias Mueller
Add support for Macbook 3rd generation special mappings. Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-02-11HID: add LCSPEC from VERNIER to quirk listJiri Kosina
We need to blacklist this device, as it should be handled by ldusb driver. Reported-by: stephen <stephen.ware@eqware.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-02-11HID: fix processing of event quirksJiri Kosina
The old code (before move) stopped further processing of the event after it has been already processed by the quirk handler. The new code didn't propagate the return value properly, and therefore the processing always proceeded, which was wrong. This patch fixes it. Pointed out in kernel.org bugzilla #9842 Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-02-11HID: Blacklist new GTCO CalComp USB device PIDsJeremy Roberson
Adds new GTCO CalComp USB device PIDs to the blacklist. Signed-off-by: Jeremy A. Roberson <jroberson@gtcocalcomp.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: ADS/Tech Radio si470x needs blacklist entryTobias Lorenz
This patch adds blacklist entries in hid-quirks.c to let the usbhid driver ignore the si470x radio devices. They are now handled by the new radio-si470x driver. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: Logitech Extreme 3D needs NOGET quirkJiri Kosina
Logitech Extreme 3D needs NOGET quirk, otherwise it times out at the time of connect. Reported-by: Mike Sharov <msharov@softhome.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: Refactor MS Presenter 8K key mappingJan Kiszka
Following the suggestion of Jonas, this patch maps the special keys of the MS Presenter 8000 to targets that should allow for better re-mapping according to individual use cases (i.e. I avoided hard-wiring to standard keys). This time I also included the last missing key event (switching back from presentation mode). The optimal Xmodmap customization for using the Presenter with OpenOffice now looks like this for me: keycode 175 = Escape keycode 179 = F5 keysym XF86Forward = Right keysym XF86Back = Left Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: MS Presenter mapping for PID 0x0701Jiri Kosina
0x045e/0x0701 also needs the hid-input mapping quirk established by quirk_microsoft_presenter_8k(). Reported-by: Jonas Delrue <jonas_delrue@hotmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: Support Samsung IR remoteRobert Schedel
Samsung USB remotes (0419:0001) are rejected by kernel 2.6.23, because the report descriptor from the remote contains a 48 bit HID report field. HID 1.11 states: Fields may span at most 4 bytes. This patch, based on 2.6.23, fixes this by modifying the internal report descriptor in hid-quirks.c. Additional user space support (e.g. LIRC) is required to fetch the information from the hiddev interface. The burden to reconstruct the data is moved into userspace (lirc through hiddev). There is no need to set HID_QUIRK_HIDDEV quirk, as the device has also output applications, which trigger the creation of hiddev device automatically. Signed-off-by: Robert Schedel <r.schedel@yahoo.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: fix compilation of hidbp drivers without usbhidJiri Kosina
We can use the blacklist only if usbhid code is compiled. Reported-by: jurriaan <thunder7@xs4all.nl> Cc: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: Blacklist the Gretag-Macbeth Huey display colorimeterNicolas Mailhot
The Gretag-Macbeth Huey display colorimeter claims to be an HID device but isn't. As a result the linux HID device will claim it, preventing FLOSS software like Argyll CMS from talking to it. Tested-by: Frederic Crozat <fcrozat@mandriva.com> Signed-off-by: Nicolas Mailhot <nicolas.mailhot@laposte.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: the `bit' in hidinput_mapping_quirks() is an out parameterFengguang Wu
Fix a panic, by changing hidinput_mapping_quirks(,, unsigned long *bit,) to hidinput_mapping_quirks(,, unsigned long **bit,) The `bit' in this function is an out parameter. Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: remove redundant WARN_ON()s in order not to scare usersJiri Kosina
The WARN_ON() in implement() and extract() spit out stacktraces and a lot of other information that might make users think that there is something seriously wrong with the system. WARN_ON() should not be deliberately triggerable by userspace application, which these can be. Usually this WARN_ON() triggers when hid2hci utility is sending the data that don't correspond to the device's report descriptor. Convert these messages to more friendly printk(). Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: force hiddev creation for SONY PS3 controllerBastien Nocera
The device is not discoverable, and needs to be poked to set its master, the Bluetooth device it will try to connect to when the "Home" button is pressed without a cable plugged in. Using libusb means disconnecting the device from its driver to get the report descriptor. Using hiddev, we can poke it without relinquishing control over it, so when you plug it in, it would still work as a pad. This could be then used by sixpair program, after it is rewritten to use hiddev instead of libusb. Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: Use hid blacklist in usbmouse/usbkbdPascal Terjan
This fixes wacom tablets not working if usbmouse is loaded. Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: proper handling of MS 4k and 6k devicesJiri Kosina
This removes ugly macros IS_* to distinguish devices that need special handling in hid-input, and establish proper quirks for them. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: remove unused variable in quirk event handlerJiri Kosina
Remove unused variable in quirk event handler. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: hid-input quirk for BTC 8193Jiri Kosina
BTC 8193 keyboard handles its scrollwheel in very non-standard way. It produces two non-standard usages for scrolling up and down, in both cases with postive value equaling to 1. We handle this by temporary mapping, which we then catch in quirk event handler, and remap to negative HWHEEL even in order to introduce correct behavior. Also the button requires special mapping, as it triggers standard-violating usage code. Reported in kernel.org bugzilla #9385 Reported-by: Kir Kolyshkin <kir@sacred.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28HID: separate hid-input event quirks from generic codeJiri Kosina
This patch separates also the hid-input quirks that have to be applied at the time the event occurs, so that the generic code handling HUT-compliant devices is not messed up by them too much. Signed-off-by: Jiri Kosina <jkosina@suse.cz>