aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid
AgeCommit message (Collapse)Author
2009-01-04HID: add phys and name ioctls to hidrawJiri Kosina
The hiddev interface provides ioctl() calls which can be used to obtain phys and raw name of the underlying device. Add the corresponding support also into hidraw. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
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 Stern
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: non-input reports can also be numberedJiri Kosina
When computing the maximal buffer size needed, we must take into account that not only input reports can be numbered. Pointed out in bugzilla #10467 Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04HID: ignore mouse interface for unibody macbooksJiri Kosina
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 Scholz
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-23HID: remove setup mutex, fix possible deadlockJiri Slaby
It causes recursive locking warning and is unneeded after introduction of STARTED flag. * Resume vs. stop is effectively solved by DISCONNECT flag. * No problem in suspend vs. start -- urb is submitted even after open which is possible after connect which is called after start. * Resume vs. start solved by STARTED flag. * Suspend vs. stop -- no problem in killing urb and timer twice. Reported-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-20HID: add USB ID for another dual gameron adapterJiri Kosina
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 Kosina
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 Kosina
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-14HID: don't grab devices with no inputJiri Slaby
Some devices have no input interrupt endpoint. These won't be handled by usbhid, but currently they are not refused and reside on hid bus. Perform this checking earlier so that we refuse to control such a device early enough (and not pass it to the hid bus at all). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-13HID: fix radio-mr800 hidquirksAlexey Klimov
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 Klimov
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: fix start/stop cycle in usbhid driverJiri Slaby
`stop' left out usbhid->urb* pointers and so the next `start' thought it needs to allocate nothing and used the memory pointers previously pointed to. This led to memory corruption and device malfunction. Also don't forget to clear disconnect flag on start which was left set by the previous `stop'. This fixes echo DEVICE > /sys/bus/hid/drivers/DRIVER/unbind echo DEVICE > /sys/bus/hid/drivers/DRIVER/bind failures. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-13HID: use single threaded work queue for hid_compatAndi Kleen
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: map macbook keys for "Expose" and "Dashboard"Henrik Rydberg
On macbooks there are specific keys for the user-space functions Expose and Dashboard, which currently has no counterpart in input.h. This patch adds KEY_SCALE and KEY_DASHBOARD, and maps the keyboard accordingly. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-11-13HID: support for new unibody macbooksHenrik Rydberg
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-13HID: fix locking in hidraw_open()Oliver Neukum
As open needs to sleep hidraw was wrong to call it with a spinlock held. Furthermore, open can of course fail which needs to be handled. Signed-off-by: Oliver Neukum <oneukum@suse.de> 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 ↵Alexey Klimov
drivers 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-11-01saner FASYNC handling on file closeAl Viro
As it is, all instances of ->release() for files that have ->fasync() need to remember to evict file from fasync lists; forgetting that creates a hole and we actually have a bunch that *does* forget. So let's keep our lives simple - let __fput() check FASYNC in file->f_flags and call ->fasync() there if it's been set. And lose that crap in ->release() instances - leaving it there is still valid, but we don't have to bother anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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-27HID: sync on deleted io_retry timer in usbhid driverJiri Slaby
When suspending, make sure that the timer is not running any more. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-27HID: fix oops during suspend of unbound HID devicesJiri Slaby
Usbhid structure is allocated on start invoked only from probe of some driver. When there is no driver, the structure is null and causes null-dereference oopses. Fix it by allocating the structure on probe and disconnect of the device itself. Also make sure we won't race between start and resume or stop and suspend respectively. References: http://bugzilla.kernel.org/show_bug.cgi?id=11827 Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Andreas Schwab <schwab@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-26Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: Add support for Sony Vaio VGX-TP1E HID: fix lock imbalance in hiddev HID: fix lock imbalance in hidraw HID: fix hidbus/appletouch device binding regression HID: add hid_type to general hid struct HID: quirk for OLED devices present in ASUS G50/G70/G71 HID: Remove "default m" for Thrustmaster and Zeroplus HID: fix hidraw_exit section mismatch HID: add support for another Gyration remote control Revert "HID: Invert HWHEEL mappings for some Logitech mice"
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-23HID: fix lock imbalance in hiddevJiri Slaby
Don't forget to unlock_kernel() in hiddev_ioctl_usage(). Added in 7961df16819085b8a357720d89d0239036e6af2a (HID: Switch hiddev to unlocked_ioctl). Corresponing sparse warning: drivers/hid/usbhid/hiddev.c:515:10: warning: context imbalance in 'hiddev_ioctl_usage': wrong count at exit drivers/hid/usbhid/hiddev.c:515:10: context 'kernel_lock': wanted 0, got 1 Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-23HID: fix lock imbalance in hidrawJiri Slaby
Add omitted unlock_kernel() to hidraw_ioctl(). Added in 979c407e3b89b606e810fa494ef316896eadbfad (HID: Push down BKL into ioctl handler in hidraw). Corresponing sparse warning: drivers/hid/hidraw.c:267:9: warning: context imbalance in 'hidraw_ioctl': wrong count at exit drivers/hid/hidraw.c:267:9: context 'kernel_lock': wanted 0, got 1 Signed-off-by: Jiri Slaby <jirislaby@gmail.com> 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-22HID: add hid_type to general hid structJiri Slaby
Add type to the hid structure to distinguish to which device type (now only mouse) we are talking to. Needed for per device type ignore list support. Note: this patch leaves the type as unknown for bluetooth devices, there is not support for this in the hidp code. 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-19HID: Remove "default m" for Thrustmaster and ZeroplusAndi Kleen
No reason at all to make these obscure drivers default m Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-17USB: remove warn macro from HID coreGreg Kroah-Hartman
There were two stragglers that got missed in the last merge of the HID tree that forgot to change the warn() calls to dev_warn(). This patch fixes them up. Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17HID: fix hidraw_exit section mismatchJiri Slaby
hidraw_exit() marked as __exit is called from __init function from HID core. Remove the section placement from that function. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> 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-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits) UIO: Fix mapping of logical and virtual memory UIO: add automata sercos3 pci card support UIO: Change driver name of uio_pdrv UIO: Add alignment warnings for uio-mem Driver core: add bus_sort_breadthfirst() function NET: convert the phy_device file to use bus_find_device_by_name kobject: Cleanup kobject_rename and !CONFIG_SYSFS kobject: Fix kobject_rename and !CONFIG_SYSFS sysfs: Make dir and name args to sysfs_notify() const platform: add new device registration helper sysfs: use ilookup5() instead of ilookup5_nowait() PNP: create device attributes via default device attributes Driver core: make bus_find_device_by_name() more robust usb: turn dev_warn+WARN_ON combos into dev_WARN debug: use dev_WARN() rather than WARN_ON() in device_pm_add() debug: Introduce a dev_WARN() function sysfs: fix deadlock device model: Do a quickcheck for driver binding before doing an expensive check Driver core: Fix cleanup in device_create_vargs(). Driver core: Clarify device cleanup. ...
2008-10-16device create: misc: convert device_create_drvdata to device_createGreg Kroah-Hartman
Now that device_create() has been audited, rename things back to the original call to be sane. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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-16HID: fix/improve help texts for quirk driversJiri Kosina
Update the help texts for the HID-quirk drivers, so that they are a little bit more descriptive. Also make some obsolete help descriptions up to date. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-16HID: fix default building of HID-quirk driversJiri Kosina
Commit 9be7bbd54df3c9c393ccd19acc49f90c517d1291 (HID: build drivers for all quirky devices by default) made a wrong assumption about select/depends interaction in Kconfig, resulting in possibility of link failure with certain configuration options. Fix this by explicitly having all the quirk-drivers depend on USB_HID, default to y and make the possibility to alter the settings dependent on EBMEDDED. Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: build drivers for all quirky devices by defaultJiri Kosina
Once kernel configuration has CONFIG_HID turned on, let also all the specialized drivers for quirky devices to be built (unless CONFIG_EMBEDDED is specified), as usually users don't care that much which driver gives them the functionality, but when they want generic support, they probably want to have support for all the quirky devices as well. 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: remove warn() macro from usb hid driversFrom: Greg Kroah-Hartman
USB should not be having it's own printk macros, so remove warn() and use the system-wide standard of dev_warn() wherever possible. In the few places that will not work out, use a basic printk(). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: remove info() macro from usb HID driversGreg Kroah-Hartman
USB should not be having it's own printk macros, so remove info() and use the system-wide standard of dev_info() wherever possible. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: add appletv IR receiver quirkPeter Korsgaard
Similar to the existing IRCONTROL4 handling Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: fix a lockup regression when using force feedback on a PID deviceAnssi Hannula
Commit 8006479c9b75fb6594a7b746af3d7f1fbb68f18f introduced a spinlock in input_dev->event_lock, which is locked when handling input events. However, the hid-pidff driver sleeps when handling events as it waits for reports being sent to the device before changing the report contents again. This causes a system lockup when trying to use force feedback with a PID device, a regression introduced in 2.6.24 and 2.6.23.15. Fix it by extracting the raw report data from struct hid_report immediately when hid_submit_report() is called, therefore allowing drivers to change the contents of struct hid_report immediately without affecting the already-queued transfer. In hid-pidff, re-add the removed usbhid_wait_io() to pidff_erase_effect() instead, to prevent a full report queue from causing the submission to fail, thus not freeing up device memory. pidff_erase_effect() is not called while dev->event_lock is held. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14HID: convert to dev_* printsJiri Slaby
Since we have a real device bound to a driver, we may use struct device for printing. Use dev_* functions instead of printks in 4 drivers. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>