dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

359 Commits

Author SHA1 Message Date
Jiri Slaby b170060c6c HID: sync on deleted io_retry timer in usbhid driver
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-27 15:07:08 +01:00
Jiri Slaby 3d5afd324a HID: fix oops during suspend of unbound HID devices
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-27 15:06:01 +01:00
Linus Torvalds ecc96e7920 Merge branch 'for-linus' of 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-26 16:34:14 -07:00
Jiri Slaby eb9910894d HID: fix lock imbalance in hiddev
Don't forget to unlock_kernel() in hiddev_ioctl_usage().
Added in 7961df1681
(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-23 01:47:34 +02:00
Jiri Slaby a73a63701f HID: add hid_type to general hid struct
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-22 14:45:11 +02:00
Greg Kroah-Hartman 46fcaec505 USB: remove warn macro from HID core
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-17 14:41:09 -07:00
From: Greg Kroah-Hartman 7d89fe12bd HID: remove warn() macro from usb hid drivers
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-14 23:51:03 +02:00
Greg Kroah-Hartman ddbe324919 HID: remove info() macro from usb HID drivers
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-14 23:51:03 +02:00
Anssi Hannula f129ea6d1e HID: fix a lockup regression when using force feedback on a PID device
Commit 8006479c9b 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-14 23:51:02 +02:00
Jiri Slaby 76483cf4d0 HID: remove hid-ff
hid-ff.c now calls only pidff (generic driver), the special ones are now
in separate drivers. Invoke pidff on all non-special directly.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:51:01 +02:00
Jiri Slaby 987fbc1f7d HID: move zeroplus FF processing
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:51:01 +02:00
Jiri Slaby 10e41a711e HID: move thrustmaster FF processing
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:51:00 +02:00
Jiri Slaby 5f022298aa HID: move pantherlord FF processing
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-14 23:51:00 +02:00
Jiri Kosina 66ebf66e49 HID: add support for Super Dual Box Pro USB PS2/PS2 adapter
This seems to be the very same device, as already supported Smartjoy
dual Plus, but with slightly different vendor ID. Let's support this
one too.

Reported-by: David Ashley <dashxdr@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:57 +02:00
Jiri Slaby 606bd0a861 HID: move logitech FF processing
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-14 23:50:56 +02:00
Jiri Slaby 6edfa8dc33 HID: move reset leds quirk
Move the handling of the leds resetting from the core to
the dell and logitech drivers.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:56 +02:00
Jiri Slaby 93c10132a7 HID: move connect quirks
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-14 23:50:56 +02:00
Jiri Slaby fea6f1833b HID: move dell quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:55 +02:00
Jiri Slaby bd28ce008b HID: move sony quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:55 +02:00
Jiri Slaby 2b88b80301 HID: remove rdesc quirk support
Remove support for both dynamic and static report descriptor
quirks. There is no longer rdesc code which it would support,
so it's useless.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:55 +02:00
Jiri Slaby 980a3da6ac HID: move samsung quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:54 +02:00
Jiri Slaby 3b8006e510 HID: move monterey quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:53 +02:00
Jiri Slaby 1e76253220 HID: move petalynx quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:53 +02:00
Jiri Slaby b5635b129b HID: move belkin quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:53 +02:00
Jiri Slaby 1f243e302c HID: move ezkey quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:52 +02:00
Jiri Slaby 3b239cd739 HID: move cherry quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:52 +02:00
Jiri Slaby 14a21cd459 HID: move a4tech quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:51 +02:00
Jiri Slaby 0f2213208f HID: move cypress quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:51 +02:00
Jiri Slaby 90231e7eaf HID: move sunplus quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:51 +02:00
Jiri Slaby 78a849a682 HID: move microsoft quirks
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-14 23:50:50 +02:00
Jiri Slaby 880d29f109 HID: indent switches/cases
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-14 23:50:50 +02:00
Jiri Slaby 8c19a51591 HID: move apple quirks
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-14 23:50:49 +02:00
Jiri Slaby d458a9dfc4 HID: move ignore quirks
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-14 23:50:49 +02:00
Jiri Slaby 5f22a79923 HID: move logitech quirks
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-14 23:50:49 +02:00
Jiri Slaby 990436a7c9 HID: move ids into separate file
Move ids from hid-quirks.c into separate file, since it will be needed in
more than one place.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-14 23:50:48 +02:00
Jiri Slaby c500c97140 HID: hid, make parsing event driven
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-14 23:50:48 +02:00
Jiri Slaby 85cdaf524b HID: make a bus from hid code
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-10-14 23:50:48 +02:00
Henrik Rydberg f89bd95c5c Input: bcm5974 - add driver for Macbook Air and Pro Penryn touchpads
This driver adds support for the multitouch trackpad on the new
Apple Macbook Air and Macbook Pro Penryn laptops. It replaces the
appletouch driver on those computers, and integrates well with the
synaptics driver of the Xorg system.

[dtor@mail.ru: various cleanups]
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-08-08 16:23:01 -04:00
Jiri Kosina b22d837006 Merge branches 'upstream' and 'upstream-fixes' into for-linus 2008-07-23 15:26:10 +02:00
Jiri Kosina acc0b7c409 HID: remove quirk lookup from usbkbd/usbmouse
This patch completely removes the dependency of usbkbd and usbmouse drivers
on usbhid code.

usbkbd/usbmouse drivers are not needed in the vast majority of cases anyway,
and they shouldn't be loaded in standard configurations at all. They are supposed
to be as trivial as possible, and searching for HID_QUIRK_IGNORE can even be
bad in some cases.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:25:22 +02:00
Jiri Kosina 2c3e3bfbb6 HID: add quirk for Logitech DiNovo desktop
Logitech DiNovo desktop needs the same quirk as other DiNovo
devices.

Reported-by: Farid Benamrouche <farid.benamrouche@free.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:25:21 +02:00
Jiri Slaby dc25b78f21 HID: fix quirk handling in usbmouse/kbd
When usbmouse/kbd is set to build, USB_HID is never defined due to
the USB_HID!=y Kconfig rule. Test CONFIG_USB_HID_MODULE in both
drivers instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:25:21 +02:00
Dan Nicholson 740f370dc6 HID: Invert HWHEEL mappings for some Logitech mice
Some Logitech mice have a tilt wheel which register as HWHEEL buttons.
The events are positive for a click to the right and negative for a
click to the left. Applications expect the opposite, though.

I suspect this affects a lot more Logitech mice, but these are the only
two I have. I tested this using evtest and a GTK application. A similar
Microsoft Intellimouse I have works correctly.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:25:21 +02:00
Ming Lei a44ebccea8 HID:usbkbd:mark usb_kbd_keycode array as const
mark it as const because it is read only

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:25:21 +02:00
Alexandre Karpenko 37cdffdadf HID: add fn key support on Macbook Pro 4,1 and Macbook Air
Added device ids to hid-quriks for detection of keyboards on 4th
generation Macbook Pro and Macbook Air

The naming scheme is consistent with past Apple keyboards in hid-quirks;
as defined by Apple (including device ids) in:
/System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/Co
ntents/Info.plist
Patch was originally posted and tested at:
https://bugs.launchpad.net/mactel-support/+bug/207127

Signed-off-by: Alexandre Karpenko <alexander@comm.utoronto.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:25:20 +02:00
Jiri Kosina 00b33277fa HID: remove unused variable from hiddev compat ioctl
Remove unused inode variable from hiddev compat ioctl handler.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:21:55 +02:00
Jiri Kosina 88af45bafd HID: fix compile issue in hiddev ioctl
Fix build failure introduced by Alan's ioctl -> unlocked_ioctl
(pushing BKL down to the driver) conversion patch for hiddev.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:21:55 +02:00
Alan Cox 7961df1681 HID: Switch hiddev to unlocked_ioctl
Push down the BKL. In some cases compat_ioctl already doesn't take the
BKL so we don't either. Some of the locking here seems already dubious
and object lifetimes want documenting

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-23 15:21:54 +02:00
Jiri Kosina 9063974cdb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-23 15:19:00 +02:00
Ming Lei 742120c631 USB: fix usb_reset_device and usb_reset_composite_device(take 3)
This patch renames the existing usb_reset_device in hub.c to
usb_reset_and_verify_device and renames the existing
usb_reset_composite_device to usb_reset_device. Also the new
usb_reset_and_verify_device does't need to be EXPORTED .

The idea of the patch is that external interface driver
should warn the other interfaces' driver of the same
device before and after reseting the usb device. One interface
driver shoud call _old_ usb_reset_composite_device instead of
_old_ usb_reset_device since it can't assume the device contains
only one interface. The _old_ usb_reset_composite_device
is safe for single interface device also. we rename the two
functions to make the change easily.

This patch is under guideline from Alan Stern.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
2008-07-21 15:16:33 -07:00
Ming Lei 625f694936 USB: remove interface parameter of usb_reset_composite_device
From the current implementation of usb_reset_composite_device
function, the iface parameter is no longer useful. This function
doesn't do something special for the iface usb_interface,compared
with other interfaces in the usb_device. So remove the parameter
and fix the related caller.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:32 -07:00
Jiri Kosina f38bb7de28 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-06-04 10:26:59 +02:00
Adrian Bunk f8dea7a3d4 HID: remove CVS keywords
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-20 16:44:43 +02:00
Dylan R Semler 0952c9e8ed HID: Add iMON LCDs to blacklist
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-20 16:44:43 +02:00
Xiaofan Chen f4971031f4 HID: add Microchip PICKit 1 and PICkit 2 to blacklist
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-20 16:44:43 +02:00
Diego 'Flameeyes' Petteno 6e7045990f HID: split Numlock emulation quirk from HID_QUIRK_APPLE_HAS_FN.
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-05-20 16:44:43 +02:00
Jiri Kosina 7022b15e2a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-05-06 16:57:55 +02:00
Al Viro 01d7b36988 usbhid endianness annotations and fixes
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-28 10:03:31 -07:00
Linus Torvalds ce1d5b23a8 Merge branch 'for-linus' of 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-25 12:38:14 -07:00
Jiri Kosina aaad2b0c75 HID: fix report descriptor handling for MS Wireless model 1028
Fix a typo in report descriptor fixup, which results in improper
substitution and leaving old value in place.

Reported-by: Juha Motorsportcom <juha_motorsportcom@luukku.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-23 16:39:43 +02:00
Robert Schedel efa0f16b0d HID: Suppress hidinput for Samsung IR control
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-22 11:34:59 +02:00
Jiri Kosina 42098a551c HID: remove 60x GTCO devices from blacklist
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-22 11:34:59 +02:00
Jiri Kosina 3e52a05f0a HID: WiseGroup 866 Dual Joypad needs output reports quirk
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-22 11:34:58 +02:00
Jiri Kosina f5c669fc76 HID: ThrustMaster FF driver is no longer experimental
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-22 11:34:58 +02:00
Jiri Kosina c8f0f02f3c HID: Logitech diNovo Mini pad support
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-22 11:34:58 +02:00
Oliver Neukum 69626f23bc HID: fix race between open() and disconnect() in usbhid
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-22 11:34:58 +02:00
Adrian Bunk abdff0f774 HID: make hid_input_field and usbhid_modify_dquirk static
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-22 11:34:58 +02:00
Jiri Kosina 671d994cfb HID: fix misplaced rdesc quirk
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-22 11:34:57 +02:00
Anssi Hannula c17f9c901c HID: force feedback driver for Logitech Rumblepad 2
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-22 11:34:57 +02:00
Jiri Slaby 1d1bdd2000 HID: move wait from hid to usbhid
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-22 11:34:57 +02:00
Jiri Slaby 282bfd4cbc HID: fix sparse warnings
Fix these sparse warnings:
.../hid/hid-core.c💯15: warning: incorrect type in assignment (different signedness)
.../hid/hid-core.c💯15:    expected signed int [usertype] *value
.../hid/hid-core.c💯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-22 11:34:57 +02:00
Pete Zaitcev 02008faa03 HID: patch to add NOGET for DMI/Acomdata
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-22 11:34:57 +02:00
Jiri Kosina 5f1ab74f65 HID: Sunplus Wireless Desktop needs report descriptor fixup
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-22 11:34:57 +02:00
Jim Duchek 974faac464 HID: quirk for MS Wireless Desktop Receiver (model 1028)
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-22 11:34:57 +02:00
Pekka Sarnila f345c37c37 HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd
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-22 11:34:56 +02:00
Jean Delvare cf2a299e48 HID: fix build failure in hiddev_ioctl with gcc 3.2
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-22 11:34:56 +02:00
Guryanov Dmitry a32bcc45b9 Input: aiptek - add support for Genius G-PEN 560 tablet
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-04-15 13:13:10 -04:00
Andrew Burton c9bde7ad39 HID: BADPAD entry for NATSU Playstation USB adapter
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-18 11:20:31 +01:00
Julia Lawall 92c4a1b9f2 HID: Use DIV_ROUND_UP
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-18 11:20:30 +01:00
Tobias Mueller 790c9d8d87 HID: remove HID_QUIRK_APPLE_ISO_KEYBOARD for 4th generation macbook
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-03-18 11:20:30 +01:00
Tobias Mueller 5906a04482 HID: add USB IDs for MacBook 3rd generation
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-13 17:08:04 +01:00
Jiri Kosina be541ed159 HID: add LCSPEC from VERNIER to quirk list
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-11 13:04:26 +01:00
Jeremy Roberson dda3fd3535 HID: Blacklist new GTCO CalComp USB device PIDs
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-02-11 13:01:50 +01:00
Tobias Lorenz 3bce6f981a HID: ADS/Tech Radio si470x needs blacklist entry
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-28 14:51:23 +01:00
Jiri Kosina 7cea465f9b HID: Logitech Extreme 3D needs NOGET quirk
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-28 14:51:23 +01:00
Robert Schedel fe56caa97e HID: Support Samsung IR remote
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-28 14:51:22 +01:00
Jiri Kosina b0e6682409 HID: fix compilation of hidbp drivers without usbhid
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-28 14:51:22 +01:00
Nicolas Mailhot 15b55fb879 HID: Blacklist the Gretag-Macbeth Huey display colorimeter
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-28 14:51:22 +01:00
Bastien Nocera 0887b4cb21 HID: force hiddev creation for SONY PS3 controller
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-28 14:51:21 +01:00
Pascal Terjan 9f6b37275a HID: Use hid blacklist in usbmouse/usbkbd
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-28 14:51:21 +01:00
Jiri Kosina 628edcde87 HID: proper handling of MS 4k and 6k devices
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-28 14:51:21 +01:00
Jiri Kosina 36ccaad640 HID: hid-input quirk for BTC 8193
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-28 14:51:21 +01:00
Drew Fisher 8dcd5afabf HID: Microsoft Wireless Optical Desktop 3.0 quirk
Make the Microsoft Wireless Optical Desktop 3.0 work as a mouse.

Microsoft Wireless Optical Desktop 3.0 doesn't properly describe its interface
class.  Specifically, since it doesn't mark the second interface as a mouse
(bInterfaceSubclass = 0), it doesn't get HID_QUIRK_NOGET applied to the
interface, and then acts broken when polled.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28 14:51:20 +01:00
Carlos Corbacho bc3707335c HID: Add support for Logitech Elite keyboards
Reuse the quirks from the Cordless Desktop LX500 - stops some of the extra
keys being reported as mouse buttons.

Signed-off-by: Carlos Corbacho <cathectic@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28 14:51:20 +01:00
Jiri Kosina af9e0eacdc HID: add full support for Genius KB-29E
Genius KB-29E has broken report descriptor, which causes some of the
Consumer usages to appear incorrectly as Button usages. We fix it by
fixing the report descriptor before it is being parsed.

Also a few of the keys violate the HUT standard, so they need a special
handling. They currently fall into "Reserved" range as per HUT 1.12.

Reported-by: Szekeres Istvan <szekeres@iii.hu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28 14:51:20 +01:00
Li Zefan 3ba5619f06 HID: fix a potential bug in pointer casting
Don't directly cast list_head * to foo *, this works only when list
is the first member of struct foo, and we should not make the assumption
how members are ordered in the structure.

i.e. struct *f = (struct *f)pos will work if:
	struct foo {
		struct list_head list;
		int i;
	};

but will fail if:
	struct foo {
		int i;
		struct list_head list;
	}

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28 14:51:19 +01:00
Pavel Troller c80e5ffac0 HID: Implement horizontal wheel handling for A4 Tech X5-005D
This mouse distinguishes horizontal wheel from vertical by a special "pseudo
event" GenericDesktop.00b8, with values of 0 for vertical and 8 for horizontal
wheel. Because this event is supplied by the parser too late, we need to delay
a wheel event, wait for this one and send either REL_WHEEL or REL_HWHEEL to
input depending on the event value.

Signed-off-by: Pavel Troller <patrol@sinus.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28 14:51:19 +01:00
Michel Daenzer a45d82d19a HID: Add support for Apple aluminum USB keyboards.
Reuse the existing quirks for Apple laptop USB keyboards.

Signed-off-by: Michel Daenzer <michel@tungstengraphics.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28 14:51:19 +01:00
Michel Daenzer 81e1a87550 HID: Rename some code identifiers from PowerBook specific to Apple generic
Preserve identifiers exposed in build and run time configuration though in
order not to break existing configurations.

This is in preparation for adding support for Apple aluminum USB keyboards.

Signed-off-by: Michel Daenzer <michel@tungstengraphics.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-01-28 14:51:19 +01:00
Jiri Kosina d624284b06 HID: hiddev - fix compiler warning
drivers/hid/usbhid/hiddev.c: In function 'hiddev_compat_ioctl':
drivers/hid/usbhid/hiddev.c:746: warning: passing argument 4 of 'hiddev_ioctl' makes
integer from pointer without a cast

Add cast to hiddev_compat_ioctl()

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-31 13:30:34 +01:00
Jerrold Jones df7bded75e HID: Add GoTop tablets to blacklist
GoTop devices are handled by usbtouchscreen driver, make sure HID
ignores them.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-31 13:30:33 +01:00
Johann Deneux 118e78d1cd changed email
Changed email address of Johann Deneux (myself)
Also removed CVS tags in comments (no longer using cvs)

Signed-off-by: Johann Deneux <johann.deneux@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20 00:47:32 +02:00
Jiri Slaby 7b19ada2ed get rid of input BIT* duplicate defines
get rid of input BIT* duplicate defines

use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<<x)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <dtor@mail.ru>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <lenb@kernel.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: <perex@suse.cz>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <vernux@us.ibm.com>
Cc: <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:42 -07:00
Jiri Kosina d057fd4cb8 Merge branch 'hidraw' into for-linus 2007-10-14 14:47:56 +02:00
Jiri Kosina 86166b7bcd HID: add hidraw interface
hidraw is an interface that is going to obsolete hiddev one
day.

Many userland applications are using libusb instead of using
kernel-provided hiddev interface. This is caused by various
reasons - the HID parser in kernel doesn't handle all the
HID hardware on the planet properly, some devices might require
its own specific quirks/drivers, etc.

hiddev interface tries to do its best to parse all the received
reports properly, and presents only parsed usages into userspace.
This is however often not enough, and that's the reason why
many userland applications just don't use hiddev at all, and
rather use libusb to read raw USB events and process them on
their own.

Another drawback of hiddev is that it is USB-specific.

hidraw interface provides userspace readers with really raw HID
reports, no matter what the low-level transport layer is (USB/BT),
and gives the userland applications all the freedom to process
the HID reports in a way they wish to.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 14:47:26 +02:00
Jiri Kosina efc493f9d5 USB HID: provide hook for hidraw write()
Add hook in usbhid for write() callback from hidraw. Sends the
report to the device through control pipe.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 14:47:26 +02:00
Philip Langdale bb6c8d8fa9 HID: hiddev: Add 32bit ioctl compatibilty
The hiddev driver currently lacks 32bit ioctl compatibility, so
if you're running with a 64bit kernel and 32bit userspace, it won't
work.

I'm pretty sure that the only thing missing is a compat_ioctl
implementation as all structs have fixed size fields.

With this change I can use revoco to configure my MX Revolution mouse.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:02 +02:00
Ilya Frolov 446943593e HID: Add GeneralTouch touchscreen to the blacklist
GeneralTouch touchscreens are handled by usbtouchscreen driver,
make sure HID ignores them.

Signed-off-by: Ilya Frolov <zeylie@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:02 +02:00
Tomoya Adachi 08f06177f4 USBHID: report descriptor fix for MacBook JIS keyboard
This patch fixes the problem, that Japanese MacBook doesn't recognize some keys
like '\'(yen, or backslash), '|'(pipe), and '_'(underscore).

It is due to that MacBook JIS keyboard (jp106) sends wrong report descriptor.
It saids "logical maximum = 0x65", so Keyboard.0089 is mapped to Key.Unknown,
while it should be accepted as Key.Yen.

Signed-off-by: Tomoya Adachi <adachi@il.is.s.u-tokyo.ac.jp>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:01 +02:00
Anssi Hannula 5edc41ee87 HID: use hid-plff driver for GreenAsia 0e8f:0003 devices
Add 0e8f:0003 into the list of devices supported by the hid-plff
force feedback driver. These devices identify themselves as
"GreenAsia Inc.    USB Joystick     " and can be either adapters or
actual game controllers. The testing was done with a Köng Gaming
gamepad.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:01 +02:00
Mike Crowe d500d11615 USBHID: Add HID_QUIRK_NOGET for ELO Touch Screen 2700 display
Use HID_QUIRK_NOGET for the ELO TS2700 touch screen USB HID device in
order to avoid a timeout during initialisation.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:01 +02:00
Stelian Pop 0ce91cf9ce HID: enable hiddev for the SantaRosa MacBookPro IR receiver
The infrared remote receiver found in the SantaRosa MacBookPro
laptops (MacBookPro3,1) need to be forced to expose a HIDDEV
interface (instead of HIDINPUT) so that lirc can access it using
the 'macmini' driver.

The patch below adds the required quirk for forcing the HIDDEV
interface to be activated (HID_QUIRK_HIDDEV) and introduces a new
quirk which forces the HIDINPUT interface to be ignored
(HID_QUIRK_IGNORE_HIDINPUT).

Note that Apple calls this receiver 'IRController4' (info taken
from Apple's driver Info.plist). Older Mac{Book,Mini,Pro}s seem
to all use the 'IRController1' device (USB id 05ac:8240) which
doesn't need those quirks.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:01 +02:00
Alfred E. Heggestad c4025aded3 USBHID: add CM109 device to blacklist
There is a separate driver cm109 for handling this device.

Signed-off-by: Alfred E. Heggestad <aeh@db.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:01 +02:00
Dmitry Torokhov b27c9590ca HID: add support for Thrustmaster FGT Force Feedback wheel
Rework thrustmaster force-feedback module to support devices having
different types of force feedback effects. Add signatures of
Thrustmaster FGT Rumble Force and Thrustmaster FGT Force Feedback
wheels to the list of devices dupported by the module.

Parts of the patch were lifted off a simalar patch by
Anssi Hannula <anssi.hannula@gmail.com>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:00 +02:00
Oliver Neukum 933e3187d0 HID: minimal autosuspend support for USB HID devices
Autosuspend for USB HID devices remains problematic as far as mice
and keyboards are concerned. While I am working on a grand solution,
here's a minimalist patch that works for those devices not continously
in use.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14 13:40:00 +02:00
Jiri Kosina 22f675f320 HID: Never call hid_free_buffers() when usbhid_device has been freed
We can't call hid_free_buffers() when the underlying usbhid_device
has already been freed.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02 13:48:04 +02:00
Jiri Kosina cda5ecf80b USB HID: fix memory leak of usbhid_device
Add forgotten freeing of usbhid_device structure.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02 13:48:03 +02:00
Jesper Juhl de1a7b0328 USB HID: fix a possible NULL pointer dereference when we fail to allocate memory
If, in usb_hid_configure(), we fail to allocate storage for 'usbhid',
 "if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL)))",
then we'll jump to the 'fail:' label where we have this code:
        usb_free_urb(usbhid->urbin);
        usb_free_urb(usbhid->urbout);
        usb_free_urb(usbhid->urbctrl);
Since we got here because we couldn't allocate storage for 'usbhid',
what we have here is a NULL pointer dereference - ouch...

This patch solves that little problem by adding a new
'fail_no_usbhid:' label after the problematic calls to
usb_free_urb() and jumps to that one instead, in the problem case.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02 13:48:03 +02:00
Christian Lamparter 04a9b7ffce USB HID: add ASUS LCM to the blacklist
Some of ASUS' notebooks (e.g G Series) include a tiny oled display, which is
attached to an internal USB bus. Unfortunatly the device reports a wrong
DeviceDescriptor and is therefore identified as a HID device...

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02 13:48:03 +02:00
Phil Dibowitz 9fdcfed8eb USB HID: Add all Logitech Harmonies to blacklist
This patch adds the entire range of Logitech's ProductIDs that are reserved
for their Harmony remotes. The in-kernel HID driver can't do anything with
these, and now there is a GPL user-space application that can handle them:
  http://www.sf.net/projects/harmonycontrol

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02 13:48:03 +02:00
Tino Keitel 3e1928e879 HID: remove the Applie IR sensor from the hid_blacklist
The IR sensor in some newer Apple computers has no other
driver in the kernel, yet. However, the macmini driver in lirc
requires a HID device for the IR sensor.

Cc: Soeren Sonnenburg <kernel@nn7.de>
Signed-off-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02 13:48:03 +02:00
Alan Stern f07600cf9e USB: add reset_resume method
This patch (as918) introduces a new USB driver method: reset_resume.
It is called when a device needs to be reset as part of a resume
procedure (whether because of a device quirk or because of the
USB-Persist facility), thereby taking over a role formerly assigned to
the post_reset method.  As a consequence, post_reset no longer needs
an argument indicating whether it is being called as part of a
reset-resume.  This separation of functions makes the code clearer.

In addition, the pre_reset and post_reset method return types are
changed; they now must return an error code.  The return value is
unused at present, but at some later time we may unbind drivers and
re-probe if they encounter an error during reset handling.

The existing pre_reset and post_reset methods in the usbhid,
usb-storage, and hub drivers are updated to match the new
requirements.  For usbhid the post_reset routine is also used for
reset_resume (duplicate method pointers); for the other drivers a new
reset_resume routine is added.  The change to hub.c looks bigger than
it really is, because mark_children_for_reset_resume() gets moved down
next to the new hub_reset_resume() routine.

A minor change to usb-storage makes the usb_stor_report_bus_reset()
routine acquire the host lock instead of requiring the caller to hold
it already.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:30 -07:00
Alan Stern 0458d5b4c9 USB: add USB-Persist facility
This patch (as886) adds the controversial USB-persist facility,
allowing USB devices to persist across a power loss during system
suspend.

The facility is controlled by a new Kconfig option (with appropriate
warnings about the potential dangers); when the option is off the
behavior will remain the same as it is now.  But when the option is
on, people will be able to use suspend-to-disk and keep their USB
filesystems intact -- something particularly valuable for small
machines where the root filesystem is on a USB device!

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:47 -07:00
Jiri Kosina feb485d401 Merge branches 'debug-module-param' and 'upstream' into for-linus 2007-07-09 14:23:37 +02:00
Jiri Kosina 3c5f4b25f3 HID: Logitech keyboard 0xc311 needs reset leds quirk
The keyboard 0x046d/0xc311 needs reset leds quirk

Tested-by: Antonino Ingargiola <tritemio@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:36 +02:00
Ryo Dairiki 5f9c464aaa HID: support for logitech cordless desktop LX500 special mapping
This keyboard has wireless mouse which has left, middle, right buttons and
2-dimensional scrolling wheel.  Unfornetuly, this wheel reports side scrolling
events and 11 or 12 button events at the same time.

I've wrote a patch to fix this mapping.  I'm not sure if this mapping is proper
for buttons, because , for example, there is no entry for "burn cd" in input.h.

The patch also supress 11 and 12 button events from mouse when you scroll the
wheel left and right.  With this patch, only side scrolling events are
reported.  (This mouse has only 4 buttons and 2D wheel. There is no such
buttons like 11 and 12.)

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:36 +02:00
Diogo Kastrup 816cbfda8b HID: fix autocentering of PID devices
When setting the autocentering of PID devices, PID_DIRECTION_ENABLE is not
being explicitely set to 1. This results in autocentering working only on the
vertical axis when this field is preset to 0.

Fix that by setting it explicitely to 1 when preparing the set_effect report
for autocentering spring effect.

Signed-off-by: Diogo Kastrup <dk@bighost.com.br>
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:35 +02:00
Jiri Kosina ea9a4a8b0e HID: separate quirks for report descriptor fixup
Lately there have been quite a lot of bug reports against broken devices
which require us to fix their report descriptor in the runtime, before it
is passed to the HID parser. Those devices have eaten quite an amount of
our quirks space, which isn't particularly necessary - the quirks are not
needed after the report descriptor is parsed, and they just consume bits.

Therefore this patch separates the quirks for report descriptor fixup, and
moves their handling into separate code. The quirks are then forgotten as
soon as the report descriptor has been parsed.

Module parameter 'rdesc_quirks' is introduced to be able to modify these
quirks in runtime in a similar way to 'quirks' parameter for ordinary HID
quirks.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:34 +02:00
Jiri Kosina b8e98f1c47 HID: Add NOGET quirk for all NCR devices
Devices manufactured by NCR have userspace hiddev-based drivers,
which do all the necessary device querying by themselves. The devices
must not be queried directly by the generic HID driver, as reported by
NCR engineers.

Cc: Petr Ostadal <postadal@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:33 +02:00
Jiri Kosina 92d9e6e607 HID: support for Petalynx Maxter remote control
Petalynx Maxter remote control [1] 0x18b1/0x0037 emits 0xfa and 0xfc from
consumer page (reserved in HUT 1.12) for back and more keys. It also emits
a few usages from LOGIVENDOR page, which need adding.

Also, this device has broken report descriptor - the reported maximum is too
low - it doesn't contain the range for 'back' and 'more' keys, so we need to
bump it up before the report descriptor is being parsed.

Besides all this, it also requires NOGET quirk.

This patch does so.

[1] http://www.elmak.pl/index.php?option=com_phpshop&page=shop.browse&category_id=14&ext=opis&lang=en

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:33 +02:00
Julien Eyries 1b3ebe9311 HID: support for Gameron dual psx adaptor
This patch provides support for the Gameron dual psx adaptor.  The
modification  is to add the quirk HID_QUIRK_MULTI_INPUT for this
specific USB device.

Signed-off-by: Julien Eyries <jeyries@yahoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:31 +02:00
Alan Stern 2fa45a4cff USB HID: avoid flush_scheduled_work()
This patch (as914) replaces a call to flush_scheduled_work() with
cancel_work_sync(), in order to help avoid potential deadlocks.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:30 +02:00
Jiri Kosina defd208681 HID: force hid-input for Microsoft SideWinder GameVoice device
Microsoft SideWinder GameVoice driver is a trivial device with a few buttons
(0x09 HID usage) and an audio connector, which just forwards the audio input
into oridinary sound card present in the computer.

Despite this fact, the only interface of this device reports itself as a
Telephony/Headset type of HID device. This is apparently incorrect - the device
itself doesn't provide any audio/telephony functionality. This is achieved in
userland application which only needs to receive the button events from the HID
driver.

This patch establishes a new quirk which forces hid-input to claim a device it
will otherwise leave untouched.

Reported-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:29 +02:00
Jiri Kosina 58037eb961 HID: make debugging output runtime-configurable
There have been many reports recently about broken HID devices, the
diagnosis of which required users to recompile their kernels in order
to be able to provide debugging output needed for coding a quirk for
a particular device.

This patch makes CONFIG_HID_DEBUG default y if !EMBEDDED and makes it
possible to control debugging output produced by HID code by supplying
'debug=1' module parameter.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:03:35 +02:00
Jiri Kosina cdcb44e87b USB HID: hiddev - fix race between hiddev_send_event() and hiddev_release()
There is a small race window in which hiddev_release() could corrupt the
list that is being processed for new event in hiddev_send_event().
Synchronize the operations over this list.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-10 08:45:56 +02:00
Dmitry Torokhov e071298589 HID: switch to using input_dev->dev.parent
In preparation for struct class_device -> struct device input
core conversion switch to using input_dev->dev.parent when
specifying device position in sysfs tree.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09 10:17:31 +02:00
Jan Kratochvil fed76ab3b2 USB HID: Logitech wheel 0x046d/0xc294 needs HID_QUIRK_NOGET quirk
Logitech wheel (product id 0xc294) doesn't like to be polled for reports,
otherwise it slows down initialization of this device to ten seconds.

This patch adds HID_QUIRK_NOGET flag for this wheel.

Signed-off-by: Jan Kratochvil <honza@jikos.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09 02:52:51 +02:00
Dmitry Torokhov 6675c5bd2a USB HID: usb_buffer_free() cleanup
usb_buffer_free() now handles NULLs so remove unneeded checks
form callers.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09 02:52:51 +02:00
Jiri Kosina 66da876962 USB HID: report descriptor of Cypress USB barcode readers needs fixup
Certain versions of Cypress USB barcode readers (this problem is known to
happen at least with PIDs 0xde61 and 0xde64) have report descriptor which
has swapped usage min and usage max tag. This results in HID parser failing
for report descriptor of these devices, as it (wrongly) requires allocating
more usages than HID_MAX_USAGES.

Solve this by walking through the report descriptor for such devices, and swap
the usage min and usage max items (and their values) to be in proper order.

Reported-by: Bret Towe <magnade@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09 02:52:51 +02:00
Noel Kothe 59e7e36c32 USB HID: update CONFIG_USB_HIDINPUT_POWERBOOK description
This option is needed on the Apple Intel Laptops too.

Signed-off-by: Noel Kothe <noel@debian.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09 02:52:51 +02:00
Jiri Kosina f61c9127b9 USB HID: don't warn on idVendor == 0
It turns out that there are broken devices out there that incorrectly
report VID/PID as 0x000, see http://lkml.org/lkml/2007/4/27/496

Therefore we should not confuse users by dumping warnings and stacktraces
in such situation. It is not possible to add quirks for such horribly
broken devices, but currently that's not needed.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-29 13:14:56 +02:00
Paul Walmsley 876b9276b9 USB HID: add 'quirks' module parameter
Add a 'quirks' module parameter for the usbhid module, so users can
add or modify quirks at module load time.

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-19 14:56:12 +02:00
Paul Walmsley 8cef908235 USB HID: add support for dynamically-created quirks
Add internal support for dynamically-allocated HID quirks, "dquirks"
(for "dynamic quirks").  Includes several functions to add/modify quirks
from the list.  This code is used by the next patch to implement quirk
modification upon module load.

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-19 14:37:44 +02:00
Paul Walmsley 8222fbe67c USB HID: clarify static quirk handling as squirks
Rename existing quirks handling code that operates over a static array
to "squirks" (short for static quirks) to differentiate it from the
dynamically-allocated quirks that will be introduced in the
next patch.  Add an accessor function specifically for static quirks,
usbhid_exists_squirk().

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-19 13:45:57 +02:00
Paul Walmsley 2eb5dc30eb USB HID: encapsulate quirk handling into hid-quirks.c
Move the USB_VENDOR* and USB_DEVICE* defines and the hid_blacklist[]
array there from hid-core.c.  Add
hid-quirks.c:usbhid_lookup_any_quirks() to return quirk information to
hid-core.c.  Convert __u32, __u16 types to u32, u16.

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-19 13:27:04 +02:00
Paul Zaremba 4d5a1be98d USB HID: EMS USBII device needs HID_QUIRK_MULTI_INPUT
Add HID_QUIRK_MULTI_INPUT to the EMS USBII (0x0b43/0003) so the kernel detects both joystick
ports properly. Without it you end up with a single joystick node (js0) that combines the
two physical port signals.

Signed-off-by: Paul Zaremba <pez-gpg@treeofice.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-18 15:29:47 +02:00
Jiri Kosina f142b3a4f6 HID: update copyright and authorship macro
Updates Copyright and DRIVER_AUTHOR in HID and USB HID sources.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-16 11:29:28 +02:00
Sam Liddicott 42cfb632f0 USB HID: add support for WiseGroup MP-8800 Quad Joypad
This adds support for WiseGroup Quad Joypad (0x0925/0x8800). The
same quirks as for Dual Joypad (0x0925/0x8866) are needed.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:04 +02:00
Jiri Kosina 320c01500c USB HID: add FF support for Logitech Force 3D Pro Joystick
This patch adds support for Logitech Force 3D Pro Joystick (0x046d/0xc286)
to hid-lgff driver.

Device ID reported by Richard Bolkey <rbolkey@cs.utexas.edu>

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:03 +02:00
Pete Zaitcev 713c8aad6b USB HID: numlock quirk for dell W7658 keyboard
On Dell W7658 keyboard, when BIOS sets NumLock LED on, it survives the
takeover by kernel and thus confuses users.

Eating of an increasibly scarce quirk bit is unfortunate. We do it for safety,
given the history of nervous input devices which crash if anything unusual
happens.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:03 +02:00
Jiri Kosina 85cbea3952 USB HID: Logitech MX3000 keyboard needs report descriptor quirk
Logitech MX3000 contains report descriptor which doesn't cover usages
above 0x28c, but emits such usages. Report descriptor needs fixing
in the very same way as with receivers shipped with S510 keyboards.

This patch also adds a few mappings for multimedia keys that S510 didn't
emit.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:03 +02:00
Jiri Kosina bf892e60d0 USB HID: extend quirk for Logitech S510 keyboard
Logitech S510 keyboard is shipped with USB receivers with various product
ids, all need their report descriptor to be fixed. This adds PID 0xc50c.

Reported by Christophe Colombier in kernel.org bugzilla #7352

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:03 +02:00
Dmitry Torokhov 5d6341c606 USB HID: usbkbd/usbmouse - handle errors when registering devices
Handle errors when registering input devices in usbkbd/usbmouse.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:03 +02:00
Daniel P. Engel 66df514b1d USB HID: add QUIRK_HIDDEV for Belkin Flip KVM
Add HID_QUIRK_HIDDEV for the Belkin Flip USB KVM, which provides for software
control of switching via a HID class interface. It overloads three HID LED
usages, two of which aren't mapped in the ev_dev input subsection, and which it
doesn't make sense to map. In order to force the creation of a hiddev device
for controlling the Flip, this quirk flag is needed.

Signed-off-by: Daniel P. Engel <dengel@sourceharvest.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:03 +02:00
Ronny Peine 38d4b89e27 USB HID: Thustmaster firestorm dual power v1 support
This patch adds support for version 1 of Thustmaster firestorm dual power
(0x44f/0xb300).

Signed-off-by: Ronny Peine <RonnyPeine@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:02 +02:00
Paul Walmsley 4cbe7d28f2 USB HID: specify explicit size for hid_blacklist.quirks
Explicitly specify the size of the hid_blacklist quirks member, to guard
against surprises on architectures where unsigned ints aren't 32 bits long.

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:02 +02:00
Alan Stern 5e2a55f25d USB HID: fix retry & reset logic
The USB HID driver fails to reset its error-retry timeout when there
has been a long time interval between I/O errors with no successful URB
completions in the meantime.  As a result, the very next error would
trigger an immediate reset, even if it was a chance event occurring
long after the previous error.

More USB keyboards and mice than one might expect end up getting I/O
errors. Almost always this results from hardware problems of one sort of
another. For example, people attach the device to a USB extension cable,
which degrades the signal.  Or they simply have poor quality cables to
begin with. Or they use a KVM switch which doesn't handle USB messages
correctly. Etc...

There have been reports from several users in which these I/O
errors would occur more or less randomly, at intervals ranging from
seconds to minutes.  The error-handling code in hid-core.c was originally
meant for situations where a single outage would persist for a few hundred
ms (electromagnetic interference, for example).  It didn't work right when
these more sporadic errors occurred, because of a flaw in the logic
which this patch fixes.

This patch (as873) fixes that oversight.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:02 +02:00
Jiri Kosina 48b4554aca USB HID: consolidate vendor/product ids
The vendor/product IDs for the purposes of hid_blacklist got
scathered around the hid-core.c in a rather random way over the
time.

Move all the related definitions at the beginning of the file,
and make them sorted again. Sort also hid_blacklist properly.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:02 +02:00
Jiri Kosina 6db3dfefa2 USB HID: move usbhid code from drivers/usb/input to drivers/hid/usbhid
Separate usbhid code into dedicated drivers/hid/usbhid directory as
discussed previously with Greg, so that it eases maintaineance process.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-11 10:36:02 +02:00