aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/hid-core.c
AgeCommit message (Collapse)Author
2009-01-22MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatc ↵merge
hes-tracking-fix-stray-endmenu-patch-1232632040-1232632141 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-10-30HID: add quirk entry for no-name keyboard (0x13ba/0x0017)Alan Stern
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 Kosina
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 Slaby
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 Kosina
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 Kosina
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 Nicholson
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 Wilson
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 Kosina
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 Chehab
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 Chehab
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 Chehab
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 Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move thrustmaster FF processingJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move pantherlord FF processingJiri Slaby
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 Slaby
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 Cattiau
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 Hughes
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 Kosina
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 Slaby
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>
2008-10-14HID: move connect quirksJiri Slaby
Move connecting from usbhid to the hid layer and fix also hidp in that manner. This removes all the ignore/force hidinput/hiddev connecting quirks. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move dell quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move sony quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move samsung quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move gyration quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move monterey quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move petalynx quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move belkin quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move chicony quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move ezkey quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move cherry quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move a4tech quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move cypress quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move sunplus quirksJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move microsoft quirksJiri Slaby
Move them from the core code to a separate driver. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: indent switches/casesJiri Slaby
Bring switch and cases into coding style and save thus some indentation to make the code tighter. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: add compat supportJiri Slaby
Add compat option to hid code to allow loading of all modules on systems which don't allow autoloading because of old userspace. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move apple quirksJiri Slaby
Move them from the core code to a separate driver. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move ignore quirksJiri Slaby
Move ignore quirks from usbhid-quirks into hid-core code. Also don't output warning when ENODEV is error code in usbhid and try ordinal input in hidp when that error is returned. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: move logitech quirksJiri Slaby
Move them from the core and input code to a separate driver. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: hid, make parsing event drivenJiri Slaby
Next step for complete hid bus, this patch includes: - call parser either from probe or from hid-core if there is no probe. - add ll_driver structure and centralize some stuff there (open, close...) - split and merge usb_hid_configure and hid_probe into several functions to allow hooks/fixes between them Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: make a bus from hid codeJiri Slaby
Make a bus from hid core. This is the first step for converting all the quirks and separate almost-drivers into real drivers attached to this bus. It's implemented to change behaviour in very tiny manner, so that no driver needs to be changed this time. Also add generic drivers for both usb and bt into usbhid or hidp respectively which will bind all non-blacklisted device. Those blacklisted will be either grabbed by special drivers or by nobody if they are broken at the very rude base. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23HID: use get/put_unaligned_* helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> 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-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 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-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-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>