aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-05-02HID: fix oops in hid_check_keys_pressed()Jiri Kosina1-0/+3
If the device is not claimed by hid-input (i.e devices driver by userspace hiddev/hidraw-based drivers, or completely detached from HID and driver by libusb), we must not check the hid->inptus, as it is not guaranteed to be initialized, as this is performed only for devices handled by hid-input. Reported-by: Guillaume Chazarain <guichaz@gmail.com> Tested-by: Guillaume Chazarain <guichaz@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-17HID: Add support for the G25 force feedback wheel in native modeChristophe Borivant1-0/+1
Add Product Id 0xc299 for the Logitech G25 force feedback wheel The Logitech G25 force feedback wheel, is first recognize by the kernel with the product id "0xc294". In this mode, we can't use all the axes and buttons of the wheel. Using a userland utility, it is possible to make the wheel switch to native mode -- http://svn.vdrift.net/viewvc.cgi/trunk/tools/G25manage/?root=VDrift In native mode, the wheel change its id number to "0xc299". The packet that needs to be sent to the wheel to swtich to native mode and change its PID is { 0xf8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 } Signed-off-by: Christophe Borivant <christophe.borivant@wanadoo.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30Merge branch 'autosuspend' into for-nextJiri Kosina1-0/+16
Conflicts: drivers/hid/hid-core.c
2009-03-30HID: remove compat stuffJiri Slaby1-21/+0
This removal was scheduled and there is no problem with later distros to adapt for the new bus, thanks to aliases. module-init-tools map files are deprecated nowadays, so that the patch which introduced hid ones into the m-i-t won't be accepted and hence there is no reason for leaving compat stuff in. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30HID: add support for Kye/Genius Ergo 525VJiri Kosina1-0/+1
This device sends several buttons in a separate field, which is wrongly described in the report descriptor. Fix it in the following way: - change led usage page to button - report size 8 count 1 becomes report size 1 count 8 - the button usage range changed to 4-7 (the mouse has three buttons in a different field already). Reported-by: Tomas Hanak <tomas.hanak@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30HID: Support Apple mini aluminum keyboardRyan Finnie1-0/+3
New USB device ids and quirks for the "mini" Apple USB aluminum keyboards released Tuesday, model A1242. Note that while I own the ANSI (0x021d) version and cannot verify that the ISO (0x021e) and JIS (0x021f) versions exist, previous releases have followed the triple id convention for awhile now, and the device ids fit perfectly between USB_DEVICE_ID_APPLE_GEYSER4_* and USB_DEVICE_ID_APPLE_ALU_*. Signed-off-by: Ryan Finnie <ryan@finnie.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30HID: support for Kensington slimblade deviceJiri Kosina1-0/+1
0x47d/0x2041 device sends two extra buttons in 0xff00 usage page and therefore requires special handling. Reported-by: Jason Noble <nobleja@polezero.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30HID: DragonRise game controller force feedback driverRichard Walmsley1-0/+1
Adds force feedback support for USB DragonRise Inc. game controllers. These devices are mass produced in China and distributed under several vendors. Signed-off-by: Richard Walmsley <richwalm@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-25HID: autosuspend support for USB HIDOliver Neukum1-0/+16
This uses the USB busy mechanism for aggessive autosuspend of USB HID devices. It autosuspends all opened devices supporting remote wakeup after a timeout unless - output is being done to the device - a key is being held down (remote wakeup isn't triggered upon key release) - LED(s) are lit - hiddev is opened As in the current driver closed devices will be autosuspended even if they don't support remote wakeup. The patch is quite large because output to devices is done in hard interrupt context meaning a lot a queuing and locking had to be touched. The LED stuff has been solved by means of a simple counter. Additions to the generic HID code could be avoided. In addition it now covers hidraw. It contains an embryonic version of an API to let the generic HID code tell the lower levels which capabilities with respect to power management are needed. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-02-17HID: move tmff and zpff devices from ignore_list to blacklistAnssi Hannula1-6/+6
The devices handled by hid-tmff and hid-zpff were added in the hid_ignore_list[] instead of hid_blacklist[] in hid-core.c, thus disabling them completely. hid_ignore_list[] causes hid layer to skip the device, while hid_blacklist[] indicates there is a specific driver in hid bus. Re-enable the devices by moving them to the correct list. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-02-17HID: blacklist Powercom USB UPSMichael Tokarev1-0/+1
For quite some time users with various UPSes from Powercom were forced to play magic with bind/unbind in /sys in order to be able to see the UPSes. The beasts does not work as HID devices, even if claims to do so. cypress_m8 driver works with the devices instead, creating a normal serial port with which normal UPS controlling software works. The manufacturer confirmed the upcoming models with proper HID support will have different device IDs. In any way, it's wrong to have two completely different modules for one device in kernel. Blacklist the device in HID (add it to hid_ignore_list) to stop this mess, finally. Signed-off-By: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-29HID: document difference between hid_blacklist and hid_ignore_listJiri Kosina1-0/+2
Many people get it wrong and add device IDs into hid_blacklist instead of hid_ignore_list. Let's put a little comment in place. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-29HID: add antec-branded soundgraph imon devices to blacklistJarod Wilson1-0/+2
hid_ignore_list additions for the Antec-branded SoundGraph iMon VFD and LCD devices (0x15c2:0x0044 and 0x0045). These devices are driven by lirc. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04Merge branch 'upstream-fixes' into for-nextJiri Kosina1-0/+1
Conflicts: drivers/hid/hid-ids.h
2009-01-04HID: don't allow DealExtreme usb-radio be handled by usb hid driverAlexey Klimov1-0/+1
This device is already handled by radio-si470x driver, and we therefore want usbhid to ignore it. Patch places usb ids of that device in ignore section of hid-core.c Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: driver for TopSeed Cyberlink quirky remoteLev Babiev1-0/+1
I recently picked up a Cyberlink branded remote control produced by TopSeed Tech Corp. Alas, it appears that this device is using non-standard mappings for some of it's keys (Usage page 0xffbc). Signed-off-by: Lev Babiev <harley@hosers.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: force feedback driver for GreenAsia 0x12 PIDLukasz Lubojanski1-0/+1
I have implemented Force Feedback driver for another "GreeAsia" based device (0e8f:0012 "GreenAsia Inc. USB Joystick"). The functionality was tested with MANTA Warior MM816 and SpeedLink Strike2 SL-6635 and fftest software - everything seems to work right. Signed-off-by: Lukasz Lubojanski <lukasz@lubojanski.info> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: add dynids facilityJiri Slaby1-3/+98
Allow adding new devices to the hid drivers on the fly without a need of kernel recompilation. Now, one can test a driver e.g. by: echo 0003:045E:00F0.0003 > ../generic-usb/unbind echo 0003 045E 00F0 > new_id from some driver subdir. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: add n-trig digitizer supportRafi Rubin1-0/+1
Added quirks for the N-Trig digitizer. Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers1-3/+4
This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. CC: Jiri Kosina <jkosina@suse.cz> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: automatically call usbhid_set_leds in usbhid driverAlan Stern1-5/+0
This patch (as1146c) makes usbhid automatically call usbhid_set_leds() for any device that supports the keyboard boot protocol. In theory this should be perfectly safe. BIOSes send the LED output report as part of their normal device initialization, so any keyboard device supporting the boot protocol has to be able to handle it. As a side effect, the hid-dell and hid-bright drivers are no longer needed, and the Logitech keyboard driver can be removed from hid-lg. CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: ignore mouse interface for unibody macbooksJiri Kosina1-0/+3
The mouse interface on unibody macbooks is going to be handled by bcm59743 driver in 2.6.29. Reported-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-28HID: Apple ALU wireless keyboards are bluetooth devicesJan Scholz1-3/+3
While parsing 'hid_blacklist' in the apple alu wireless keyboard is not found. This happens because in the blacklist it is declared with HID_USB_DEVICE although the keyboards are really bluetooth devices. The same holds for 'apple_devices' list. This patch fixes it by changing HID_USB_DEVICE to HID_BLUETOOTH_DEVICE in those two lists. Signed-off-by: Jan Scholz <Scholz@fias.uni-frankfurt.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-20HID: add USB ID for another dual gameron adapterJiri Kosina1-0/+1
0x0810/0x0002 needs the very same handling as 0x0001. Reported-by: Steve Conklin <sconklin@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-20HID: unignore mouse on unibody macbooksJiri Kosina1-3/+0
In commit a96d6ef34, the mouse interfaces on the unibody macbooks were put into hid mouse ignore list. This was a little bit too premature though, as the corresponding bcm5974 changes are scheduled for 2.6.29. Remove these devices from the ignore list for now, in order to provide at least basic functionality with the HID driver. Will be reintroduced in 2.6.29 Reported-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-17HID: fix blacklist entries for greenasia/pantherlordJiri Kosina1-2/+2
Fix misplaced quirk entries for devices driven by hid-pl driver. The devices shouls be only blacklisted by generic HID driver, not completely ignored. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-13HID: fix radio-mr800 hidquirksAlexey Klimov1-1/+1
This patch fixes radio-mr800 hidqurks. Removes it from blacklist entry and places it in ignore entry in hid/hid-core.c Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-13HID: fix kworld fm700 radio hidquirksAlexey Klimov1-1/+1
This patch fixes kworld fm700 usb-radio hidqurks that handled by radio-si470x. Removes it from blacklist entry and places it in ignore entry in hid/hid-core.c The bug went in through the V4L/DVB tree by commit 6a13378a without HID maintainer being involved at all. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-13HID: use single threaded work queue for hid_compatAndi Kleen1-1/+1
Use single threaded work queue for hid_compat I doubt HID really needs to scale over multiple CPUs. So only use a single threaded workqueue for HID_COMPAT. This avoids some excessive thread use on systems with a larger number of CPUs. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-13HID: support for new unibody macbooksHenrik Rydberg1-0/+6
The unibody MacBook 5 and MacBook Pro 5 come with a new version of the bcm5974 trackpad. This patch adds the USB device ids and all the appropriate quirks, including hid_blacklist. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-11V4L/DVB (9337a): HID: Don't allow KWorld radio fm700 be handled by usb hid driversAlexey Klimov1-0/+1
This device is already handled by radio-si470x driver, and we therefore want usbhid to ignore it. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-30HID: add quirk entry for no-name keyboard (0x13ba/0x0017)Alan Stern1-0/+1
This patch (as1157) adds a no-name PS/2-to-USB keyboard+mouse adapter to the hid-dell driver. (The device shows up with a Product string saying "Generic USB K/B", nothing more.) This will force an initial "Set-LEDs" report to be sent to the device, without which it won't send any keystroke information. Several bug reports mentioning this device have been filed in various forums; the patch should resolve them. This is just a temporary stop-gap for 2.6.28. A later patch for 2.6.29 will introduce a more generic mechanism for "Set-LEDs", making this change (and the entire hid-dell driver) unnecessary. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-23HID: Add support for Sony Vaio VGX-TP1EJiri Kosina1-0/+1
The Sony Vaio VGX-TP1E multimedia PC has a wireless keyboard with a touchpad. The mouse pointer is wrongly declared as constant non-data variable, which make HID code to completely ignore all the "Pointer" usages. Fix the report descriptor before it enters the parser to contain touchpad pointer description that is correctly parsable (declaring data rather than constant). Reported-by: Stefan Hundhammer <sh@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-22HID: fix hidbus/appletouch device binding regressionJiri Slaby1-0/+38
The appletouch mouse devices are grabbed by the hid bus and not released even if apple driver says ENODEV (as expected) -- these are composite USB devices, for which we only ignore the mouse interface. This is currently not handled by hidbus code properly. Move the ignoring one level upper to forbid the hid layer to grab the device. Reported-by: Justin Mattock <justinmattock@gmail.com> Reported-by: Steven Noonan <steven@uplinklabs.net> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-20HID: quirk for OLED devices present in ASUS G50/G70/G71Jiri Kosina1-0/+1
The new revision of OLED device (0x0b05/0x175b) found in ASUS G50/G70/G71 should be ignored the same way we currently do for 0x1726, so that asus_oled driver can make use of the device. Reported-by: Costin Grigoras <costin.grigoras@cern.ch> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-17HID: add support for another Gyration remote controlJiri Kosina1-0/+1
There is a slightly different Gyration remote control, which requires the quirks we already have in place for the 0x0002 PID, plus KEY_MEDIA mapping is different. Reported-by: Marc Randolph <mrand@pobox.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-17Revert "HID: Invert HWHEEL mappings for some Logitech mice"Dan Nicholson1-2/+0
This reverts commit 740f370dc61dc478d891d7d47660bb3ae39ddb4f. It turned out to be correct in the first place: a positive value should be sent when the wheel is moved to the right, and a negative value when moved to the left. This is the behavior expected by the Xorg evdev driver. I must have had a remapping somewhere else in my system when originally testing this. Testing on another system shows that the unpatched kernel is correct. Here is a bug report from Mandriva that brought the problem to my attention: https://qa.mandriva.com/show_bug.cgi?id=44309#c19 Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-16HID: blacklist additional SoundGraph iMon LCD modelsJarod Wilson1-0/+2
hid_ignore_list additions for more SoundGraph iMon LCD devices Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: add missing blacklist entry for Apple ATV ircontrolJiri Kosina1-0/+1
This device is already handled by hid-apple driver, but the blacklist entry was missing in generic driver. Reported-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: add support for Bright ABNT2 brazilian deviceMauro Carvalho Chehab1-0/+1
This keyboard needs to reset the LEDS during probe. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: Don't let Avermedia Radio FM800 be handled by usb hid driversMauro Carvalho Chehab1-0/+1
Based on an original patch from Alexey Klimov <klimov.linux@gmail.com>, against kernel version 2.6.27. This device is already handled by radio-mr800 driver, and we therefore want usbhid not to touch it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: fix numlock led on Dell device 0x413c/0x2105Mauro Carvalho Chehab1-0/+1
This keyboard needs to re-sync numlock after probing. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move zeroplus FF processingJiri Slaby1-0/+2
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move thrustmaster FF processingJiri Slaby1-0/+4
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move pantherlord FF processingJiri Slaby1-0/+2
Move the force feedback processing into a separate module. [jkosina@suse.cz: fix Kconfig texts a little bit] Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: fix tty<->hid deadlockJiri Slaby1-1/+10
hid_compat_load() runs on the default workqueue, it request_module(), it execs modprobe, it exits, tty flushes default workqueue, it hangs, because we are still in it. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Tested-by: <Valdis.Kletnieks@vt.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: ignore iBuddy devicesRemi Cattiau1-0/+2
iBuddy devices claim to be HID devices, but they are not. Add them to the blacklist. Signed-off-by: Remi Cattiau <remi@cattiau.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: remove ignore quirk for MGE UPS devicesRichard Hughes1-2/+2
This patch reverts the change made four years ago here: http://www.vg.kernel.org/pub/linux/kernel/people/gregkh/usb/2.4/usb-hid-2.4.25-pre7.patch UPS's made by MGE can be used with usbhid just fine, and by removing the ignore quirk allows them to be used with HAL so they just work when plugged in, without needing to be manually configured. With the ignore quirk in place a user would have to configure NUT before the UPS could be used, as NUT uses it's own internal USB matching framework to match against the USB devices, do low level control messages on the device and then parse the HID tables all in userspace. This is not needed, as allowing the device to be claimed as a usbhid device allows it to be used like any other USB UPS device. The devices correctly advertise the power device page which can be queried for the device state. I assume the quirk was changed so that people using < libusb 0.1.8 could still use NUT's internal HID code to manage the UPS. libusb 0.1.8 was released quite some time ago: 2004-02-11. This patch does not break NUT as in drivers/libusb.c the device is force unbound from the kernel driver using usb_detach_kernel_driver_np () where it can be controlled like normal. [jkosina@suse.cz: adapt to the new hidbus code] Signed-off-by: Richard Hughes <rhughes@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: introduce list for hiddev creation forcingJiri Kosina1-18/+29
Introduce a list of devices for which there is need to force a creation of the hiddev interface, but still they are operated by generic driver (i.e. certain UPS). Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move logitech FF processingJiri Slaby1-0/+7
Merge the logitech force feedback processing directly into logitech driver from the usbhid core. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>