History log of /drivers/hid/hid-core.c
Revision Date Author Comments
4d5df5d11e8027c11c1079205757527cbaade62d 19-Mar-2012 Andreas Nielsen <eas@svep.se> HID: multitouch: add PID for Fructel product

Adds multitouch support for the Gametel Android game controller.

The multitouch events are emulated by the Gametel device. Each physical button
is configured to generate a MT event on a specific coordinate. This seems to be
the only way for us to support Android games that doesn't support HID gamepads.
It is possible to inject MT events at Android level, but this requires root on
the phone.

Signed-off-by: Andreas Nielsen <eas@svep.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
740363fb75f421f9a00a183f673b477c3029b572 13-Mar-2012 Jiri Kosina <jkosina@suse.cz> HID: tivo: add support for BT-version (0x1200)

Add support for BT-driven configuration of the TiVo remote.

Reported-by: Joshua Dillon <jvdillon@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8d179a9ef25a64b451e2bbd46f6a6c16c6a72eb1 06-Mar-2012 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: handle all multitouch devices through hid-multitouch

When the quirk HID_QUIRK_MULTITOUCH is present and when hid-multitouch
is loaded, let's pass the device to hid-multitouch even if it has
not been registered in hid-multitouch.

If any other driver wants to take precedence over hid-multitouch,
the usual way of adding it to hid_have_special_driver will work as
the quirk HID_QUIRK_MULTITOUCH won't be set by the generic hid layer.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6b1968d5b6e223237bca98879f31c5616b3b325f 09-Mar-2012 Jiri Kosina <jkosina@suse.cz> HID: make it possible to force hid-core claim the device

Introduce 'hid_ignore_special_drivers' module parameter that makes hid-core
claim the device even if it's listed in hid_have_special_driver[]. This
is useful mostly for debugging purposes and specialized initrds, where
all the hid drivers are not avaiable.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fd1d152583e6ce02b47cb7315295ab58014aa26d 06-Mar-2012 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: multitouch: add more eGalax devices

This is a list of devices that should be handled by hid-multitouch. They all
present the HID usage "Contact ID" and won't be handled by hid-input. Some of
them have _not_ been tested (though I have their report descriptors), but I've
been guaranted by eeti that they follow the same protocol. The tested ones are
also blacklisted in hid-core.c.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a786e83cb088f1afcd1d55e44efd4b89d78c32d1 06-Mar-2012 Nikolai Kondrashov <spbnick@gmail.com> HID: waltop: Add support for tablet with PID 0038

Add support for unknown Waltop tablet with product ID 0x0038.
This tablet is sold as Genius G-Pen F509.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
22ca20b250f5c9672a53b34f032f43dd2c4a4aaf 28-Feb-2012 Nikolai Kondrashov <spbnick@gmail.com> HID: kye: Add support for 3 tablets

Add support for three KYE tablets: EasyPen i405X, MousePen i608X, EasyPen M610X.
Update Kconfig entry accordingly, remove EXPERT dependency.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1e93674a8ea169320950c5e6d1fa29a20b534e60 22-Feb-2012 Andreas Hübner <andreas@k4n.de> HID: add new driver for non-compliant Saitek devices

The driver currently only supports the PS1000 controller.
It fixes the report descriptor by removing a non-existing axis and
clearing the constant bit on the d-pad and button input reports.

Signed-off-by: Andreas Hübner <andreas@k4n.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
0944e964b23baee17d40abbd314695289380c2fd 13-Feb-2012 Konstantin Khlebnikov <khlebnikov@openvz.org> HID: use generic driver for Logitech Unifying receivers if !CONFIG_HID_LOGITECH_DJ

Before commit 534a7b8e1 ("HID: Add full support for Logitech Unifying
receivers") Logitech Unifying receiver can work as generic device
without special driver, after that commit these devices does not works
without special driver.

After this patch they will use generic driver if special driver is disabled.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
42fc04e5f8190a6cae7aa5bf5b64fb5bc32a034f 18-Feb-2012 Sean Young <sean@mess.org> HID: sjoy: Add device ID for Super Joy Box 3

Also correct the quirks for the Super Joy Box 3 Pro and Super Dual Box.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2258e863b451be319d374f89688000ab858b13c3 14-Feb-2012 Denis Kovalev <Denis.Kovalev@dataart.com> HID: multitouch: add support of Panasonic multitouch panels

While at it, also fix some minor codingstyle issues.

Signed-off-by: Denis Kovalev <Denis.Kovalev@dataart.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
65dd3b699f38b9252e5e1aa2ad7fb37ef9c61f37 13-Jan-2012 Hans Verkuil <hans.verkuil@cisco.com> [media] hid-core: ignore the Keene FM transmitter

The Keene FM transmitter USB device has the same USB ID as
the Logitech AudioHub Speaker, but it should ignore the hid.
Check if the name is that of the Keene device.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
4fdc18d15151f3e7cc43070ec8d13570431b5abc 06-Feb-2012 Nikolai Kondrashov <spbnick@gmail.com> HID: waltop: Add support for Waltop Q Pad

Add support for Waltop Q Pad by fixing its report descriptor.

This tablet is also sold as Aiptek HyperPen Mini. Other possible names
include: NGS Flexi Style, VisTablet PenPad, iVistaTablet Q Flex Pad, Bravod
Q-PD65-S.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
44ea35c138d400b3aeeb2a5317edd4634e6823e3 14-Oct-2011 Jarod Wilson <jarod@redhat.com> HID: add support for tivo slide remote

This patch finishes off adding full support for the TiVo Slide remote,
which is a mostly pure HID device from the perspective of the kernel.
There are a few mappings that use a vendor-specific usage page, and a
few keys in the consumer usage page that I think make sense to remap
slightly, to better fit their key labels' intended use. Doing this in a
stand-alone hid-tivo.c makes the modifications only matter for this
specific device.

What's actually connected to the computer is a Broadcom-made usb dongle,
which has an embedded hub, bluetooth adapter, mouse and keyboard
devices. You pair with the dongle, then the remote sends data that its
converted into HID on the keyboard interface (the mouse interface
doesn't do anything interesting, so far as I can tell).

lsusb for this device:
Bus 004 Device 005: ID 0a5c:2190 Broadcom Corp.
Bus 004 Device 004: ID 0a5c:4503 Broadcom Corp.
Bus 004 Device 003: ID 150a:1201
Bus 004 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)

Speaking of the keyboard interface, the remote actually does contain a
keyboard as well. The top slides away, revealing a reasonably functional
qwerty keyboard (not unlike many slide cell phones), thus the product
name.

CC: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8491ee1093c476ea3a9a19ab8593d8531cab40f7 03-Feb-2012 Jan Steinhoff <mail@jan-steinhoff.de> Input: add Synaptics USB device driver

This patch adds a driver for Synaptics USB touchpad or pointing stick
devices. These USB devices emulate an USB mouse by default, so one can
also use the usbhid driver. However, in combination with special user
space drivers this kernel driver allows one to customize the behaviour
of the device.

An extended version of this driver with support for the cPad background
display can be found at
<http://jan-steinhoff.de/linux/synaptics-usb.html>.

Signed-off-by: Jan Steinhoff <mail@jan-steinhoff.de>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
3596bb929f2abd3433c2eaa5755fad48ac207af1 02-Feb-2012 Keng-Yu Lin <kengyu@canonical.com> HID: add extra hotkeys in Asus AIO keyboards

The Asus All-In-One PC has a wireless keyboard with wifi toggle,
brightness up, brightness down and display off hotkeys.

This patch adds suppoort for these hotkeys.

Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
cef9bc56e1e944afd11f96de569657117a138c6d 24-Jan-2012 Alan Stern <stern@rowland.harvard.edu> Dynamic ID addition doesn't need get_driver()

As part of the removal of get_driver()/put_driver(), this patch
(as1511) changes all the places that add dynamic IDs for drivers.
Since these additions are done by writing to the drivers' sysfs
attribute files, and the attributes are removed when the drivers are
unregistered, there is no reason to take an extra reference to the
drivers.

The one exception is the pci-stub driver, which calls pci_add_dynid()
as part of its registration. But again, there's no reason to take an
extra reference here, because the driver can't be unloaded while it is
being registered.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jiri Kosina <jkosina@suse.cz>
CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bbc21cfd55858d7c3e55bfaa91fa934b0b13ad4d 02-Dec-2011 Jeremy Fitzhardinge <jeremy@goop.org> hid-input/battery: add quirks for battery

Some devices always report percentage, despite having 0/255 as their
min/max, so add a quirk for them.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
11576c6114c3b6505aea2e0c988bedb856a0e20c 05-Jan-2012 Masatoshi Hoshikawa <hoshikawa@xiroku.com> HID: hid-multitouch: add support 9 new Xiroku devices

This patch adds support for the Xiroku Inc. panels (SPX/MPX/CSR/etc.).

Signed-off-by: Masatoshi Hoshikawa <hoshikawa@xiroku.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b7ea95ff9baab144dacdc30d752307938c5ab6bf 15-Dec-2011 Aaron Tian <aaron_tian@pixart.com.tw> HID: multitouch: support PixArt optical touch screen

This patch modifies hid-multitouch driver for supporting PixArt optical touch
screen. Because of the device does not have to set initial report, we apply
"HID_QUIRK_NO_INIT_REPORTS" quirk and add the device into hid_blacklist[]

Signed-off-by: Aaron Tian <aaron_tian@pixart.com.tw>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8c3d52fc393b5be8b14dad67053ed83195f0d002 15-Dec-2011 Jiri Kosina <jkosina@suse.cz> HID: make parser more verbose about parsing errors by default

Most of the parsing errors (typically resulting in device not being claimed
by HID subsystem at all) are reported only in debugging mode, which makes
root-causing problems with buggy devices unnecessarily more difficult.

Convert reporting of important HID report descriptor parsing errors to
be reported through hid_err() / hid_warn() instead of dbg_hid().

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d41c2a7011dffc60571eab8dc4e2a297ef106f44 24-Nov-2011 Stefan Achatz <erazor_de@users.sourceforge.net> HID: roccat: Add support for Isku keyboard

This patch adds support for Roccat Isku keyboard.
Userland tools can be found at http://sourceforge.net/projects/roccat

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
545803651da8dde248eeb8ce3ed1e547e9e4ac0a 29-Nov-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for new Hanvon panels

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b1807719f6acdf18cc4bde3b5400d05d77801494 16-Nov-2011 Benjamin Tissoires <benjamin.tissoires@gmail.com> HID: Correct General touch PID

Genera Touch told us that 0001 is their single point device
and 0003 is the multitouch one. Apparently, we made the tests
someone having a prototype, and not the final product.
They said it should be safe to do the switch.

This partially reverts 5572da0 ("HID: hid-mulitouch: add support
for the 'Sensing Win7-TwoFinger'").

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
bb9ff21072043634f147c05ac65dbf8185d4af6d 23-Nov-2011 Marek Vasut <marek.vasut@gmail.com> HID: multitouch: Add egalax ID for Acer Iconia W500

This patch adds USB ID for the touchpanel in Acer Iconia W500. The panel
supports up to five fingers, therefore the need for a new addition of panel
types.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e36f690b37945e0a9bb1554e1546eeec93f7d1f6 23-Nov-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: multitouch: cleanup with eGalax PID definitions

This is just a renaming of USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH{N}
to USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_{PID} to handle more eGalax
devices.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1fd8f047490dd0ec4e4db710fcbc1bd4798d944c 23-Nov-2011 Chris Bagwell <chris@cnpbagwell.com> HID: hid-multitouch - add another eGalax id

This allows ASUS Eee Slate touchscreens to work.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
789aaa2ee0af1a0fba4c73f1874ad524d7be0771 20-Nov-2011 Dan Delaney <drdelaney@loclhst.com> HID/usbled: add support for Dream Cheeky DL100B Mailbox Friends Alert

Adding support for Dream Cheeky DL1800B Friend Alert device.

Signed-off-by: Dan Delaney <drdelaney@loclhst.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e46e927b9b7e8d95526e69322855243882b7e1a3 07-Nov-2011 Chase Douglas <chase.douglas@canonical.com> HID: bump maximum global item tag report size to 96 bytes

This allows the latest N-Trig devices to function properly.

BugLink: https://bugs.launchpad.net/bugs/724831

Cc: stable@vger.kernel.org
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
78761ff9bc4e944e0b4e5df1e7eedcfdbb1a9a1a 05-Nov-2011 Przemo Firszt <przemo@firszt.eu> HID: wacom: Initial driver for Wacom Intuos4 Wireless (Bluetooth)

This is very basic driver for Wacom Intuos4 Wireless tablet. It supports only
position, pressure and pen buttons. More features will be added in the future.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ad734bc1565364f9e4b70888d3ce5743b3c1030a 28-Oct-2011 Andreas Krist <andreas.krist@gmail.com> HID: hid-apple: add device ID of another wireless aluminium

I've recently bought a Apple wireless aluminum keyboard (model 2011) which is
not yet supported by the kernel - it seems they just changed the device id.
After applying the attached patch, the device is fully functional.

Signed-off-by: Andreas Krist <andreas.krist@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
213f9da80533940560bef8fa43b10c590895459c 22-Oct-2011 Gökçen Eraslan <gokcen@pardus.org.tr> HID: Add device IDs for Macbook Pro 8 keyboards

This patch adds keyboard support for Macbook Pro 8 models which has
WELLSPRING5A model name and 0x0252, 0x0253 and 0x0254 USB IDs. Trackpad
support for those models are added to bcm5974 in
c331eb580a0a7906c0cdb8dbae3cfe99e3c0e555 ("Input: bcm5974 - Add
support for newer MacBookPro8,2).

Signed-off-by: Gökçen Eraslan <gokcen@pardus.org.tr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1bcc20675a1ac1ba47eaa201e02a89b0508e17b2 20-Oct-2011 Sean Young <sean@mess.org> HID: Add device IDs for more SJOY adapters

Support the following models: Super Joy Box 3 Pro, Super Dual Box Pro
and Super Joy Box 5 Pro. These models have support for pressure
sensitive buttons and they can force the controller to either digital
or analog mode, both of which are not supported yet.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f6a04605f303852963f3f357d19b967aa83c172f 15-Oct-2011 Terry Lambert <tlambert@chromium.org> HID: support primax keyboards violating USB HID spec

Primax keyboards with the issue this driver addresses report modifier
keys as in band key events instead of as out of band modifier bits,
resulting in the modifier keys generating key up events immediately
before the keys they are intended to modify. This driver rewrites
the raw report data from such keyboards into USB HID 1.11 compliant
report data. It only matches the USB vendor and product IDs for the
keyboard it has been tested on. Since there are several keyboards,
notably a number of laptops and folding USB keyboards known to have
similar unresolved problem reports, the list is expected to grow.

Signed-off-by: Terry Lambert <tlambert@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4b086910ad1b889ddf3ef5598caec03178cf2bb4 04-Oct-2011 Jiri Kosina <jkosina@suse.cz> HID: MacbookAir4,1 and MacbookAir4,2 need entry in hid_mouse_ignore_list[]

The respective mouse devices are already supported by bcm5974. Now that
Nobuhiro Iwamatsu added support for keyboard to hid-apple driver, we need
to ignore the mouse interfaces of these so that they can still be properly
claimed by bcm5974 driver.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d762cc290b9f17e346f4297fd5984b70ce71ef66 01-Oct-2011 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> HID: Add support MacbookAir 4,1 keyboard

Added USB device IDs and keyboard map for MacBookAir 4,1 keyboard.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b77c3920e90e96103e4f41442999402925fe5f73 21-Sep-2011 Benjamin Tissoires <benjamin.tissoires@gmail.com> HID: add autodetection of multitouch devices

As mentioned by http://www.microsoft.com/whdc/device/input/DigitizerDrvs_touch.mspx
multitouch devices are those that have the input report HID_CONTACTID.

This patch detects this and unloads the generic-usb driver.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e00ddc9b8f978ffbc6c212f780a2bb83aafe2fbd 10-Sep-2011 Michal Malý <madcatxster@gmail.com> HID: "hid-logitech" driver with Logitech Driving Force GT

There's been a small oversight when adding support for Logitech Driving Force
GT. Entry in hid-core was missing so the generic driver instead of hid-logitech
was being used.

Signed-off-by: Michal Malý <madcatxster@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a062cc5a76fa1d12f0821e56e3746cad2dc2fc65 17-Sep-2011 Stephane Chatty <chatty@lii-enac.fr> HID: hid-multitouch: add support for the IDEACOM 6650 chip

The IDEACOM 6650 multitouch chip, present in various all-in-one computers,
uses the serial version of the HID multitouch protocol. No existing class
supports this.

In principle, the new MT_CLS_SERIAL should work for other
serial panels as well, perhaps including some eGalax panels.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
534a7b8e10ec55d9f521e68c20dbb3634c25b98a 15-Sep-2011 Nestor Lopez Casado <nlopezcasad@logitech.com> HID: Add full support for Logitech Unifying receivers

With this driver, all the devices paired to a single Unifying
receiver are exposed to user processes in separated /input/dev
nodes.

Keyboards with different layouts can be treated differently,
Multiplayer games on single PC (like home theater PC) can
differentiate input coming from different kbds paired to the
same receiver.

Up to now, when Logitech Unifying receivers are connected to a
Linux based system, a single keyboard and a single mouse are
presented to the HID Layer, even if the Unifying receiver can
pair up to six compatible devices. The Unifying receiver by default
multiplexes all incoming events (from multiple keyboards/mice)
into these two.

Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ba623a774f5b529f89b3d63e0837df52e16ffb3b 24-Aug-2011 Dan Carpenter <error27@gmail.com> HID: unlock on error path in hid_device_probe()

We recently introduced locking into this function, but we missed an
error path which needs an unlock.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c50bb1a4005630f47b5da26336f74a485033a515 16-Aug-2011 Jeff Brown <jeffbrown@android.com> HID: hid-multitouch: Add LG Display Multitouch device.

This panel is also known as the Dell ST2220Tc.

Signed-off-by: jeffbrown@android.com
Reviewed-By: Benjamin Tissoires <Benjamin_Tissoires@logitech.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ad395ccadb6b2f0a4f9e004c9e6f2a8c22091ed0 14-Aug-2011 Sean Young <sean@mess.org> IHD: Support force feedback on MP-8866

Support force feedback on the Dual USB Force Feedback Joypad (MP-8866).

Signed-off-by: Sean Young <sean@mess.org>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f6f554f09c5b831efdaf67c449e18ca06ee648fe 10-Aug-2011 Jiri Kosina <jkosina@suse.cz> HID: add MacBookAir4,2 to hid_have_special_driver[]

Otherwise the generic driver wouldn't unbind from it and wouldn't
let hid-apple to automatically take over.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
45dc1ac73d28b3adb5819818785e758b1f369b74 10-Aug-2011 Jiri Kosina <jkosina@suse.cz> HID: propagate return value correctly in hid_input_report()

Fix a return value propagation that was omitted in David Herrmann's
locking fix around hid_input_report().

Reported-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4ea5454203d991ec85264f64f89ca8855fce69b0 10-Aug-2011 David Herrmann <dh.herrmann@googlemail.com> HID: Fix race condition between driver core and ll-driver

HID low level drivers register new devices with the HID core which then
adds the devices to the HID bus. The HID bus normally immediately probes
an appropriate driver which then handles HID input for this device.
The ll driver now uses the hid_input_report() function to report input
events for a specific device. However, if the HID bus unloads the driver
at the same time (for instance via a call to
/sys/bus/hid/devices/<dev>/unbind) then the hdev->driver pointer may be
used by hid_input_report() and hid_device_remove() at the same time
which may cause hdev->driver to point to invalid memory.

This fix adds a semaphore to every hid device which protects
hdev->driver from asynchronous access. This semaphore is locked during
driver *_probe and *_remove and also inside hid_input_report(). The
*_probe and *_remove functions may sleep so the semaphore is good here,
however, hid_input_report() is in atomic context and hence only uses
down_trylock(). If it cannot acquire the lock it simply drops the input
package.

The low-level drivers report input events synchronously so
hid_input_report() should never be entered twice at the same time on the
same device. Hence, the lock should always be available. But if the
driver is currently probed/removed then the lock is not available and
dropping the package should be safe because this is what would have
happened if the package arrived some milliseconds earlier/later.

This also fixes another race condition while probing drivers:
First the *_probe function of the driver is called and only if that
succeeds, the related input device of hidinput is registered. If the low
level driver reports input events after the *_probe function returned
but before the input device is registered, then a NULL pointer
dereference will occur. (Equivalently on driver remove function).
This is not possible anymore, since the semaphore lock drops all
incoming packages until the driver/device is fully initialized.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4a4c879904aa0cc64629e14a49b64fb3d149bf1a 31-Jul-2011 Dan Bastone <dan@pwienterprises.com> HID: add support for new revision of Apple aluminum keyboard

Add USB device ids for the new revision (MB110LL/B) of Apple's wired aluminum
keyboard. I have only confirmed that the ANSI version is correct - it is
assumed that the ISO and JIS versions follow the standard numbering convention.

Signed-off-by: Dan Bastone <dan@pwienterprises.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b580169affd7ccc9347cbf4d5f4db1480ee7ee06 22-Jul-2011 Jiri Kosina <jkosina@suse.cz> HID: fix support for Microsoft comfort mouse 4500

Add forgotten entry into the global blacklist.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
bc8a2a9b4e5c418bebaa6bb812982b7ecd298821 15-Jul-2011 ice chien <ice.chien@accupoint.com.tw> HID: hid-multitouch: add one new multitouch device's VID/PID

This patch adds support for the CSR panel built by XAT.

Signed-off-by: Ice Chien <ice.chien@accupoint.com.tw>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6be914f11db8e88d11b08d6c496624dbbd642d80 06-Jul-2011 Nikolai Kondrashov <spbnick@gmail.com> HID: uclogic: Add support for UC-Logic WP1062

Add support for UC-Logic Tablet WP1062 by fixing its report descriptor.

This tablet is sold as Monoprice 10X6.25 Inches Graphic Drawing Tablet.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
02fb72a06ae1ed55b4373a4c678f25d70fd65902 05-Jul-2011 David Herrmann <dh.herrmann@googlemail.com> HID: wiimote: Register wiimote hid driver stub

The wiimote uses a fake HID protocol. Hence, we need to prevent
HIDINPUT and HIDDEV from parsing wiimote data and instead parse
raw hid events.
Add VID/PID to hid-core so the special driver is loaded on new
wiimotes.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d946e65e2ab885c05b8cacf292be65fa292d08f6 26-Jun-2011 Anssi Hannula <anssi.hannula@iki.fi> HID: add FF support for Holtek On Line Grip based gamepads

Add force feedback support for Holtek On Line Grip based HID devices.

The protocol is more complex than that of most other rumblepads, but the
device still needs to be handled as a memoryless one.

Tested by Cleber de Mattos Casali with a 1241:5015 "Clone Joypad Super
Power Fire" gamepad, with help from Hendrik Iben <hendrik_iben@web.de>.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: Cleber de Mattos Casali <clebercasali@yahoo.com.br>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c3ead6de4f6bd1c08a81f84e629e3dbf4a9078f0 21-Jun-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for a new Lumio dual-touch panel

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f3b83d71a1b1a1569dba774c3a4f6e2a3b9fef99 13-Jun-2011 Jiri Kosina <jkosina@suse.cz> HID: add support for MS Digital Media 3000

The Digital Media 3000 keyboard (USB id: 0x0730) features the same 1-5
Application Launch keys that the Natural Ergonomic 4000 has. Add its
usb id to the list of quirks.

Reported-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
74bc6953135ae1478acc18046321bfca05b0e823 27-May-2011 Stefan Kriwanek <mail@stefankriwanek.de> HID: Add driver to fix Speedlink VAD Cezanne support

Speedlink VAD Cezanne have a hardware bug that makes the cursor "jump" from one
place to another every now and then. The issue are relative motion events
erroneously reported by the device, each having a distance value of +256. This
256 can in fact never occur due to real motion, therefore those events can
safely be ignored. The driver also drops useless EV_REL events with a value of
0, that the device sends every time it sends an "real" EV_REL or EV_KEY event.

Signed-off-by: Stefan Kriwanek <mail@stefankriwanek.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
942fd4225f72826b31d893582b6ae7e172bb3202 27-May-2011 Austin Zhang <zhang.austin@gmail.com> HID: hid-multitouch: add support for Chunghwa multi-touch panel

Added Chunghwa hid multitouch panel support into hid-multitouch.

Signed-off-by: Austin Zhang <zhang.austin@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6dc1418e13144162e8bc4858789010d8f0e1e65c 24-May-2011 Tomoki Sekiyama <tomoki.sekiyama@gmail.com> HID: yurex: recognize GeneralKeys wireless presenter as generic HID

Unfortunately, the device seems to have the same Vendor ID and Product ID
as YUREX leg-shakes sensors, and the commit 6bc235a2e2 ("USB: add driver
for Meywa-Denki & Kayac YUREX") added the ID to hid_ignore_list.

I believe that we can distinguish YUREX and the Wireless Presenter by
device type. The patch below makes the driver ignore only YUREX
(bInterfaceProtocol==0), and recognize Wireless Presenter
(bInterfaceProtocol is keyboard or mouse) as generic HID. (I don't have
the Wireless Presenter, so not yet ested.)

** YUREX lsusb information:
Bus 002 Device 007: ID 0c45:1010 Microdia
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0c45 Microdia
idProduct 0x1010
bcdDevice 0.03
iManufacturer 1 JESS
iProduct 2 YUREX
iSerial 3 10000269
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 31
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Status: 0x0002
(Bus Powered)
Remote Wakeup Enabled

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=26922

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Cc: Greg KH <gregkh@suse.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Maciej Rutecki <maciej.rutecki@gmail.com>
Reported-by: Thomas B?chler <thomas@archlinux.org>
Tested-by: Thomas B?chler <thomas@archlinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
617b64f97708be26a061e6c8178ad46b4c49d031 19-May-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for Unitec panels

This patch introduce support for Unitec panels.
This device has not been optimized in term of kernel processing
operations (default class), but it will work.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5e74e56da03f581482c104628951eeb1455848ea 19-May-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for Touch International panels

This patch introduce support for Touch International panels.
This device has not been optimized in term of kernel processing
operations (default class), but it will work.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ee0fbd149182d91e3b9df7b306eb03cd1f1dd4a1 19-May-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for GoodTouch panels

This patch introduce support for GoodTouch panels.
This device has not been optimized in term of kernel processing
operations (default class), but it will work.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
79603dc9a8223856cf3194dcabad32b9828c7be9 19-May-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for CVTouch panels

This patch introduce support for CVTouch panels.
This device has not been optimized in term of kernel processing
operations (default class), but it will work.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e6aac3427ef03f61e7478514d0648b58359d05d1 19-May-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for ActionStar panels

This patch introduce support for ActionStar panels.
This device has not been optimized in term of kernel processing
operations (default class), but it will work.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
966922f26c7fb5eddbe3c506b66bb5659f57b76f 19-May-2011 Armando Visconti <armando.visconti@st.com> HID: fix a crash in hid_report_raw_event() function.

I'm using a Data Modul EasyTouch USB multitouch controller,
which is issuing a hid report with a size equals to 0. The rsize
value gets set to 536870912 and Linux is crashing in the memset
because the value is too big.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c04abeeff9d76a703cac1e6d312853b0fc8136f5 19-May-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for Elo TouchSystems 2515 IntelliTouch Plus

This patch adds support for Elo TouchSystems 2515 IntelliTouch Plus
that can be found in Lenovo A700 all-in-one.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
df167c4a0d68a9dbde044a39a77f255ac666f93e 18-May-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: Add support for Lumio panels

This patch enables support for Lumio optical devices.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4e61f0d75aa86c9e59451f6bcffcdceb355b4fc4 09-May-2011 Austin Zhang <zhang.austin@gmail.com> HID: hid-multitouch: add support for Ilitek dual-touch panel

Added ILITEK hid dual touch panel support into hid-multitouch.

Signed-off-by: Austin Zhang <zhang.austin@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ce97cac813340eb8ecb1c5410041c9eade58f870 03-May-2011 Michael Hund <mhund@ld-didactic.de> USB: ldusb: add several new devices

Added several new devices to ldusb and excluded them from the HID driver.

Signed-off-by: Michael Hund <mhund@ld-didactic.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fdc6807fcd09416c5537f479e1dcd624118e234c 03-May-2011 Peter Gundermann <slim-one@users.sourceforge.net> HID: add support for Logitech G27 wheel

Gere's a small patch to add support for the Logitech G27 wheel, since
the prior patch only added FF support for the Driving Force Pro and G25.
The patch contains the changes from the G25 and DFP, too.

I tested the changes with wine/LFS and got full support for all axes and
buttons.

Signed-off: Peter Gundermann <slim-one@users.sourceforge.net>

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
35dca5b4a67a93bbb75c2753d6dc432dc8f82e5d 28-Apr-2011 Jiri Kosina <jkosina@suse.cz> HID: add support for Sony Navigation Controller

Sony Navigation Controller needs a special report to be sent to it
before it is able to operate, the same way as other Sony controllers
do.

Tested-by: Jacek Lukas Wotka <jlw@team-fatal.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6ab3a9a63fc16b04f7de48eb0190d516dd7574df 21-Apr-2011 John Sung <penmount.touch@gmail.com> HID: hid-multitouch: add support for PenMount dual-touch panel

This patch adds PenMount support to hid-multitouch. A new class
MT_CLS_CONFIDENCE is defined for PenMount, since it uses HID_DG_CONFIDENCE as
the valid flag.

Signed-off-by: John Sung <penmount.touch@gmail.com>
[benjamin.tissoires@enac.fr: rebased on top of last_index_field changes]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
3fce224608f38eac6d6b032b0619c1655acaf61d 23-Mar-2011 Stefan Achatz <erazor_de@users.sourceforge.net> HID: roccat: Add support for wireless variant of Pyra

Wireless variant of Roccat Pyra finally has been tested with
existing driver.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d586dca06adddc6cee7177b013ee93eaffc9fe0e 21-Mar-2011 Jiri Kosina <jkosina@suse.cz> HID: add support for Skycable 0x3f07 wireless presenter

This device contains the very same bug in report descriptor as the
Ortek ones do (i.e. LogicalMinimum == 1, which is wrong for the key
array).

As we have more reports for the Ortek devices, we are keeping the driver
name for now. Apparently there is a chip producer which sells chip with
this buggy descriptor to multiple vendors. Thus if such reports start
to come at highger frequency, we'll either have to rename the driver
accordingly, or come up with more generic workaround.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5623a24a80814fe471e777f12b9dbbb0f77e002e 17-Mar-2011 Jiri Kosina <jkosina@suse.cz> HID: add support for Logitech Driving Force Pro wheel

Add force feedback support for Logitech Driving Force Pro wheel.

Device IDs reported by Michal Malý.

Reported-by: Michal Malý <madcatxster@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
270fdc0748bd3f7b625caff985f2fcf8e2185ec7 16-Mar-2011 Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> HID: add support for Ortek PKB-1700

As reported on http://ubuntuforums.org/showthread.php?t=1594007 the
PKB-1700 needs same special handling as WKB-2000. This change is
originally based on patch posted by user asmoore82 on the Ubuntu
forums.

Cc: stable@kernel.org
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
47340bd9fefb571888836da942b5aee0e85e959c 13-Mar-2011 Andy Botting <andy@andybotting.com> Input: bcm5974 - add support for MacBookPro8

This patch add multitouch support for the MacBookPro8,1 and
MacBookPro8,2 models.

Cc: stable@kernel.org
Signed-off-by: Andy Botting <andy@andybotting.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
0ae43810976bc969ee158510c4acbe70ed136e61 11-Mar-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com> HID: ACRUX - activate the device immediately after binding

This device does not tolerate delayed opening and goes into a coma if
we try to that. Ubuntu even has a crutch for udev that opened the device
upon seeing it for the first time, but it did not work if we happened to
boot with the device attached, since by the time userspace got around
opening the device it was too late. Let's start the device immediately
to deal with this issue.

Reported-by: Sergei Kolzun <x0r@dv-life.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
177900e8c9ab28cdf097314fe7dd3877774df97d 17-Feb-2011 Jiri Kosina <jkosina@suse.cz> HID: add support for Keytouch IEC 60945

The keyboard has several bugs in its report descriptor, most
importantly the Logical Min/Max are completely off.

Replace it with simplified descriptor which describes it properly.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6d3bfb74341c2c1454fcf5ec9c4dd707011f78e5 24-Jan-2011 Alan Ott <alan@signal11.us> HID: Add HID Report Descriptor to sysfs

Add a new binary sysfs entry called report_descriptor which contains
the HID report descriptor.

Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b2e7617e09a8e774d7819c629a0989cbddb5d1ab 15-Feb-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: add IRTOUCH infrared USB to hid_have_special_driver

Without this patch, the device is handled by hidinput and does
not have the right behavior.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
75b07022462fc33d6be15669ad604118653210a9 03-Feb-2011 Chris Schlund <chrisschlund@gmx.de> HID: add support for wireless remote LC Power model RC1000MCE

Signed-off-by: Chris Schlund <chrisschlund@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
0e70f97f257edcef4daa92ab9371a9aac0c851ed 30-Jan-2011 Stefan Achatz <erazor_de@users.sourceforge.net> HID: roccat: Add support for Kova[+] mouse

This patch adds support for Roccat Kova[+] mouse.
Userland tools can soon be found at http://sourceforge.net/projects/roccat

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e05eefb9be109e6cbbfd362b49ee83397130a7e4 28-Jan-2011 Nikolai Kondrashov <spbnick@gmail.com> HID: add support for DragonRise PID 0011 gamepad

Add support for DragonRise Inc. gamepad with USB PID 0x0011 by fixing its report
descriptor. This mainly removes spurious axis.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e68cc603b063416c85f3e408184219fb71d4a9ff 06-Jan-2011 Stefan Achatz <erazor_de@users.sourceforge.net> HID: roccat: Add support for Roccat Arvo keyboard

This patch add support for Roccat Arvo keyboard. Arvo has 5 additional
configurable buttons and the ability to deactivate certain keys.
Userland tools can soon be found at http://sourceforge.net/projects/roccat

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c64f6f934c7490faff76faf96217066a1b3570a0 08-Jan-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: Switch turbox/mosart touchscreen to hid-mosart

This device used the MULTI_INPUT quirk whereas it could be used
with hid-mosart instead to support the multitouch part.

Reference: https://bugs.launchpad.net/ubuntu/+bug/620609/

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
bc5ab083a68bfec212780281f8e57d871d8882a0 08-Jan-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: add Add Cando touch screen 10.1-inch product id

This device has been reported to be an hid-cando one.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5572da08a784621f2ab4fdc8dc65471261871795 07-Jan-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-mulitouch: add support for the 'Sensing Win7-TwoFinger'

Added support for the 'Sensing Win7-TwoFinger' panel by GeneralTouch found on some tablets.

Because of conflicting VID/PID, this conflicts with previous support for some
single-touch panels by GeneralTouch

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a3b5e577d96bfccbc41ebf4df784e3a153072273 07-Jan-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: add support for Cypress TrueTouch panels

Added support for Cypress TrueTouch panels, which detect up to 10 fingers

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5519cab477b61326963c8d523520db0342862b63 07-Jan-2011 Benjamin Tissoires <benjamin.tissoires@enac.fr> HID: hid-multitouch: support for PixCir-based panels

Created a driver for PixCir based dual-touch panels, including the one
in the Hanvon tablet. This is done in a code structure aimed at unifying
support for several existing HID multitouch panels.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
47dbdbffe15b9582a41727766d43f1d4208e977e 26-Nov-2010 Stefan Achatz <erazor_de@users.sourceforge.net> HID: roccat: Add support for Roccat Kone[+] v2

This patch adds support for Roccat Kone[+] gaming mouse. Kone[+] is an enhanced version
of the old Kone with more memory for macros, a better sensor and more functionality.
This driver is conceptual similar to the existing Kone and Pyra drivers.
Userland tools can soon be found at http://sourceforge.net/projects/roccat

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
73bc7d315f56e260071bdb5f15e25b53bddc1402 22-Dec-2010 Melchior FRANZ <mfranz@aon.at> USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004)

So far the USBLED driver only supports Delcom's "USB Visual Signal
Indicator" (http://www.delcomproducts.com/products_USBLMP.asp). The
driver generates virtual files "red", "green", and "blue" under the
device's /sys/ directory, where color values can be read from and
written to.

This patch adds support for Dream Cheeky's "DL100B Webmail Notifier"
(http://www.dreamcheeky.com/webmail-notifier -- available from several
shops, such as http://www.conrad.at/ce/de/product/777048/USB-WEBMAIL).
This device isn't as pretty as Delcom's, but it's *far* cheaper, and
its 3 LEDs can be set in 32 brightness steps each. The grey envelope
contour can easily be removed, leaving a rather neutral white box (with
a few small holes), which is useful for generic signalling purposes.
Of course, the small circuit board can easily be put into a prettier
case.

The DL100B device pretends to be a HID, but the HID descriptor shows
that it's not overly useful as such (see below). The patch therefore
removes the "HID-ness" (hid-core.c, hid-ids.h), and adds the necessary
commands to usbled.c. The protocol info comes from the developer's
manual that Dream Cheeky kindly provided (815DeveloperManual.pdf).

HID descriptor:

0: 05 01 Usage Page 'Generic Desktop Controls'
2: 09 10 Usage 'Reserved'
4: a1 01 Collection 'Application (mouse, keyboard)'
6: 05 00 Usage Page 'Undefined'
8: 19 10 Usage Minimum = 16
10: 29 11 Usage Maximum = 17
12: 15 00 Logical Minimum = 0
14: 25 0f Logical Maximum = 15
16: 75 08 Report Size = 8
18: 95 08 Report Count = 8
20: 91 02 Output data *var abs lin pref-state null-pos non-vol bit-field
22: 19 10 Usage Minimum = 16
24: 29 11 Usage Maximum = 17
26: 15 00 Logical Minimum = 0
28: 25 0f Logical Maximum = 15
30: 75 08 Report Size = 8
32: 95 08 Report Count = 8
34: 81 00 Input data array abs lin pref-state null-pos non-vol bit-field
36: c0 End Collection

Signed-off-by: Melchior FRANZ <mfranz@aon.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
4dd295a73e80b55c3fec25555bf0a5d253023740 17-Dec-2010 Andy Ross <andy@plausible.org> hid: egalax: Add support for Wetab (726b)

This patch adds support for another Wetab device (726b), and grabs it
accordingly in hid-core.

[rydberg@euromail.se: rename and log message changes]
Signed-off-by: Andy Ross <andy@plausible.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
28906ad6d7c8a8090f720cf7c39461df0b1460f6 14-Dec-2010 Richard Nauber <richard.nauber@googlemail.com> hid: egalax: Add support for Samsung NB30 netbook

The Samsung NB30 touch has a DWAV dual-touch device. This patch adds
the NB30 to the list of supported devices, and grabs it accordingly in
hid-core.

[rydberg@euromail.se: rename and log message changes]
Signed-off-by: Richard Nauber <Richard.Nauber@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4e93db23bf95cd763c9182b5d6187412fe6ce747 29-Nov-2010 Henrik Rydberg <rydberg@euromail.se> hid: egalax: Add support for Wetab

The Wetab tablet dual-touch controller works the same way as the one
in the Joojoo tablet. This patch adds the Wetab to the list of
supported devices, and grabs it accordingly in hid-core.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
504499f22c08a03e2e19dc88d31aa0ecd2ac815e 10-Dec-2010 Joe Perches <joe@perches.com> HID: simplify an index check in hid_lookup_collection

Save the struct hid_collection * in a temporary to shorten
the generated code a bit and perhaps improve readability.

$ size drivers/hid/hid-core.o*
text data bss dec hex filename
16460 78 8 16546 40a2 drivers/hid/hid-core.o.new
16469 78 8 16555 40ab drivers/hid/hid-core.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a3789a1783d37f2772ba5046b26416c98dfe1bfa 10-Dec-2010 Joe Perches <joe@perches.com> HID: Hoist assigns from ifs

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16ee4cc82b5dbb81a5dbfedcdb268b9467fe4605 10-Dec-2010 Joe Perches <joe@perches.com> HID: Remove superfluous __inline__

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fe2580204d8bbcd18540736a283ed0b784c6a024 10-Dec-2010 Joe Perches <joe@perches.com> HID: Use vzalloc for vmalloc/memset(,0...)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4291ee305e9bb0699504a66f0e2b7aefcf0512a5 10-Dec-2010 Joe Perches <joe@perches.com> HID: Add and use hid_<level>: dev_<level> equivalents

Neaten current uses of dev_<level> by adding and using
hid specific hid_<level> macros.

Convert existing uses of dev_<level> uses to hid_<level>.
Convert hid-pidff printk uses to hid_<level>.

Remove err_hid and use hid_err instead.

Add missing newlines to logging messages where necessary.
Coalesce format strings.

Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Other miscellaneous changes:

Add const struct hid_device * argument to hid-core functions
extract() and implement() so hid_<level> can be used by them.
Fix bad indentation in hid-core hid_input_field function
that calls extract() function above.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d65c3768afb47fb93c43fbfcafef53502edaaa85 29-Nov-2010 Simon Wood <simon@mungewell.org> HID: add support for F430 Force Feedback Wheel

This patch adds USB IDs to enable force feedback on the Thrustmaster
F430 wheel.

Antonio did the work, I just converted to git patch to include in Kernel.

Reported-by: Antonio Orefice <aorefice77@gmail.com>
Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ce06b9d6d33fd2ed799b6e825d68fe95077da354 28-Nov-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com> HID: hid-core - rename hid_blacklist to hid_have_special_driver

To avoid confusion with hid_blacklist describing various quirks in
usbhid code, let's rename this one.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b9e4b1e0cd401e915e3ba97afc152946f78f9f0b 23-Nov-2010 Dennis Kügler <dennis.kuegler@gmx.de> HID: Add support for Perixx PERIBOARD-707 (Plus)

This patch adds support for the media keys of the Perixx PERIBOARD-707 (Plus)
keyboard / remote control.

Signed-off-by: Dennis Kügler <dennis.kuegler@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
99b9f758bbc904f22faffcf4d83205f4a5e7bc0c 03-Nov-2010 Edgar (gimli) Hucek <gimli@dark-green.com> HID: add MacBookAir 3,1 and 3,2 support

This patch add support for the MacBookAir3,1 and MacBookAir3,2 to the hid
driver.

Signed-off-by: Edgar (gimli) Hucek <gimli@dark-green.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
04561c5aa243c98cae93cde27e05740df787e692 01-Nov-2010 Ignaz Forster <ignaz.forster@gmx.de> HID: Add Force Feedback support for EMS Trio Linker Plus II

The device has connections for GameCube, PlayStation 2 and Dreamcast
controllers, however Force Feedback is only supported for PS2 and GC
controllers.

When using a PS2 controller it may be necessary to press the "Analog" button to
enable support for both motors (this behavior is identical to the Windows
driver, I have found no way to avoid that).

Signed-off-by: Ignaz Forster <ignaz.forster@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6bc235a2e24a5ef677daee3fd4f74f6cd643e23c 28-Sep-2010 Tomoki Sekiyama <tomoki.sekiyama@gmail.com> USB: add driver for Meywa-Denki & Kayac YUREX

Meywa-Denki/Kayac YUREX is a leg-shakes sensor device.
See http://bbu.kayac.com/en/about/ for further information.
This driver support read/write the leg-shakes counter in the device
via a device file /dev/yurex[0-9]*.

[minor coding style cleanups fixed by gregkh]

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
272036edb77e5967c175ac48b8c88e9b3358285f 13-Oct-2010 François Jaouen <francois.jaouen@laposte.net> HID: Add Cando touch screen 15.6-inch product id

This add the product id of the touch screen found on ACER Aspire 5738PZ. Works
with hid-cando driver.

Signed-off-by: Francois Jaouen<francois.jaouen@laposte.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2c6118e43040034d80894daeba41960bf0035b31 04-Oct-2010 Hendrik Iben <Hendrik_Iben@web.de> HID: force feedback support for Logitech RumblePad gamepad

This patch adds force feedback support for Logitech WingMan RumblePad
gamepads by extending the Logitech Rumblepad 2 force feedback code.

Signed-off-by: Hendrik Iben <Hendrik_Iben@web.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b6dc79929fa18a97bbc08400db72405ad835622f 01-Oct-2010 Pascal Auriel - Stantum <P.Auriel@stantum.com> HID: support STmicroelectronics and Sitronix with hid-stantuml driver

New VendorsIds/ProductIds using hid-stantum driver.

Signed-off-by: Stantum <software@stantum.com>
Acked-by: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
00e7f9649b3061281fe4b463263da26155dc9be4 25-Sep-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: waltop: add support for Waltop Slim Tablet 12.1 inch

Add support for Waltop Slim Tablet 12.1 inch by fixing its report descriptor.
This mainly fixes button reporting.

This tablet is also sold as Genius G-Pen F610.
Other possible names of this tablet: VisTablet Original 12", Adesso CyberTablet
Z12, Adesso CT-Z12A, PenPower Tooya Pro, Aiptek Slim 12.1 Inch

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
32c88cbc3080f43c429f6456aa9cd845e37f3778 22-Sep-2010 Simon Wood <simon@mungewell.org> HID: Add support for Logitech Speed Force Wireless gaming wheel

The following patch adds support for the Logitech Speed Force Wireless gaming
wheel. Originally designed for the WII console. Details on the protocol:

http://wiibrew.org/wiki/Logitech_USB_steering_wheel

This patch relies on previous patch:
"Don't Send Feature Reports on Interrupt Endpoint"

Logitech as produce a very similar wheel for the PS2/PS3, it is expected that
this patch could also support the PS2/PS3 wheel if the USB ID's are added and
(if required) the HID descriptor is modified.

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b7e1b2039de3a028fba46fbaca58a45c23a417ec 16-Sep-2010 Lech Perczak <lech.perczak@multivision.pl> HID: fix A4Tech RP-649 horizontal scrollwheel

Enable fix for their horizontal scroll wheel behaviour, associate
it with B8 hack.

Signed-off-by: Lech Perczak <lech.perczak@multivision.pl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
eaca1386207a9e0314647d3a88967acb17cc30e3 08-Sep-2010 Jiri Kosina <jkosina@suse.cz> HID: fixup blacklist entry for Asus T91MT

The device is handled by hid-mosart driver, and therefore should
be present in hid_blacklist[], not hid_ignore_list[].

Cc: Stephane Chatty <chatty@lii-enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
cec15a0ece19116b6c2c53fedf9696c20124d491 08-Sep-2010 Roland Baum <rba@tr33.de> HID: add device ID for new Asus Multitouch Controller

The following patch instructs usbhid/hid-mosart to handle a new multitouch
controller, built-in by some Asus EeePC T101MT models.

Signed-off-by: Roland Baum <rba@tr33.de>
Tested-by: Roland Baum <rba@tr33.de>
Acked-by: Stéphane Chatty <chatty@enac.fr>
CC: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a462230e16acc8664145216da3c928d03556691a 01-Sep-2010 Chase Douglas <chase.douglas@canonical.com> HID: magicmouse: enable Magic Trackpad support

The trackpad speaks a similar, but different, protocol from the magic
mouse. However, only small code tweaks here and there are needed to make
basic multitouch work.

Extra logic is required for single-touch emulation of the touchpad. The
changes made here take the approach that only one finger may emulate the
single pointer when multiple fingers have touched the screen. Once that
finger is raised, all touches must be raised before any further single
touch events can be sent.

Sometimes the magic trackpad sends two distinct touch reports as one big
report. Simply splitting the packet in two and resending them through
magicmouse_raw_event ensures they are handled properly.

I also added myself to the copyright statement.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
67168fd7d4044f21c542128529216cfaad23c03e 22-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: rdesc parser: remove local item size limit

The HID report descriptor parser requires local items, except "delimiters",
to have data. I.e. to have non-zero size. This removes the restriction.

The HID specification doesn't seem to have such restriction and, for
example, a "usage" item could have zero size if the usage ID is zero.
At least one usage page - Keyboard/Keypad lists zero ID as valid.

This doesn't seem to happen in the wild, probably because the official tool
for authoring report descriptors always puts data even for zero values for
some items, including "usage" items.

However, this makes little sense and at least one open source tool for
descriptor authoring generates zero data size "usage" items, which saves
some space, especially if many such items are used in a descriptor.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
bba5394ad3bd23fff6987fc8bc3aaf9d12433c63 02-Sep-2010 Xing Wei <weixing@hanwang.com.cn> Input: add support for Hanwang tablets

Add support for Art Master III tablet of BeiJing HanwangTechnology Co, Ltd.

Signed-off-by: Xing Wei <weixing@hanwang.com.cn>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
cb7cf3da0daa9830e00640da8f7d2380f4b4de42 29-Aug-2010 Stefan Achatz <erazor_de@users.sourceforge.net> HID: roccat: add driver for Roccat Pyra mouse

This patch add support for Pyra mobile gaming mouse from Roccat.
It provides access to profiles, settings, actual settings etc.
through sysfs attributes.
This driver is conceptual similar to the existing Kone driver.
Userland tools can soon be found at http://sourceforge.net/projects/roccat

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8f1acc32bbdb1784bcb0be98fb02f4b20e6f328f 30-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: waltop: add Media Tablet 14.1 inch support

Add support for Waltop Media Tablet 14.1 inch by fixing report descriptor.

This tablet is also sold as Genius G-Pen M712 (older version) and M712X
(newer version). Both are supported.

Trust Wide Screen Design Tablet (TB-7300, item no 15358) seems to be the
older version of this tablet (similar to Genius G-Pen M712), and could be
supported as well.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c3dc66de59531c921c4638b1285075ea1c831186 30-Aug-2010 Jiri Kosina <jkosina@suse.cz> HID: add support for another BTC Emprex remote control

Add device ID for another variant of this remote control.

Reported-by: Gregor Fuis <gujs.lists@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
41fa92302be7fa37c5c38e17e2097d3e5e9da13a 23-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: uclogic: add proper support for PF1209

This removes extra event device and fixes reported button codes of UC-Logic
Tablet PF1209.

This tablet is also sold as Genius PenSketch 12x9 (or 9x12) and possibly
under other names.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
72a46344867111c3e019b169ddfa9e1a1f55c759 20-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: add support for two Waltop tablets

Add support for Waltop Slim Tablet 5.8 inch and Media Tablet 10.6 inch.

These (and other Waltop) tablets are usually sold by different companies
(such as Genius and Trust) and with different names, but with the same USB
vendor/product IDs.

Slim Tablet 5.8 inch is known to also be sold as Genius G-Pen F350 and Trust
Widescreen Mini Tablet (item no 16485).

Media Tablet 10.6 inch is known to also be sold as Genius G-Pen M609 and
M609X. Of these only the latter is known to be supported.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
83e4491818040ae6b2d9fc60434616304a101d39 16-Aug-2010 Chris Ball <cjb@laptop.org> USB HID: Add ID for eGalax Multitouch used in JooJoo tablet

The JooJoo tablet (http://thejoojoo.com/) contains an "eGalax Inc. USB
TouchController", and this patch hooks it up to the egalax-touch driver.
Without the patch we don't get any cursor motion, since it comes through
Z/RX rather than X/Y.

(The egalax-touch driver does not yet generate a correct event sequence
for the "serial" protocol used by this device, though -- see the note
added to the code, which comes from research by Stéphane Chatty.)

Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f8a489cc5f7adafa9f1420279be793de0fba481c 09-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: Add support for UC-Logic WP????U tablets

Add support for UC-Logic WP4030U, WP5540U and WP8060U tablets.
These tablets are usually sold by Genius, Trust and possibly others under
different names and in different cases, but with the original USB
vendor/product IDs.

Currently, these tablets are supported by standalone X.org driver WizardPen.
This patch aims to fix them in the kernel and make them supported by the
generic evdev X.org driver. Still, some minor fixes in the X.org driver are
to be made for the full stack support.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
73e4008ddddc84d5f2499c17012b340a0dae153e 06-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: allow resizing and replacing report descriptors

Update hid_driver's report_fixup prototype to allow changing report
descriptor size and/or returning completely different report descriptor.
Update existing usage accordingly.

This is to give more freedom in descriptor fixup and to allow having a whole
fixed descriptor in the code for the sake of readability.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d5e0a06f17a0ffb0eb08a5bd7b18f00af70d9a12 20-Jul-2010 Jiri Kosina <jkosina@suse.cz> Revert "HID: add support for the Wacom Intuos 4 wireless"

This reverts commit ed9eac5b493c679ef5fc52273758fe334de82714. As
reported by Bastien Nocera, the device actually uses a completely
different protocol, so simply adding VID/PID doesn't work and
completely new driver will need to be written.

Reported-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c0dbcc33c652a0646542560de29a1c3f1ab7169f 19-Jul-2010 Sergei Kolzun <x0r@dv-life.ru> HID: add ACRUX game controller force feedback support

Adds force feedback support for ACRUX USB game controllers.
These devices are mass produced in China by several vendors.

Signed-off-by: Sergei Kolzun <x0r@dv-life.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3a343ee4509c982552b35fbc99d3213f3bb1acde 12-Jul-2010 Daniel Mack <daniel@caiaq.de> HID: add HID_QUIRK_HIDINPUT_FORCE

For devices with exotic HID report descriptors, it might be necessary to
make the HID core force the registration of an input device. Make that
possible by introducing a new quirk type.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
540010812179a16d3d00fb8363bb06ee83af25b8 13-Jul-2010 Kees Bakker <kees.bakker@xs4all.nl> HID: Add support for Conceptronic CLLRCMCE

There is only one extra button for Conceptronic that wasn't yet present.
The button has code 0xffbc0027 and the description is "Toggle between
display ratios". So I picked KEY_MODE for this button.

Signed-off-by: Kees Bakker <kees.bakker@xs4all.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
64b386ea16112564e0b93473e2c347125effb6b2 28-Jun-2010 Richard Nauber <richard.nauber@googlemail.com> HID: add proper support for Elecom BM084 bluetooth mouse

This patch removes the annoying feature of Elecoms BM084 to constantly scroll to the right.
The device can be found at:
http://www.dealextreme.com/details.dx/sku.15402

Signed-off-by: Richard Nauber <Richard.Nauber@gmail.com>
[jkosina@suse.cz: fix build error]
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
df506f2c0023380ffa67a946fa36eee4150773a3 28-Jun-2010 Petr Štetiar <ynezz@true.cz> HID - blacklist ET&T TC4UH touchscreen controller

The device is handled by usbtouchscreen driver.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
6e32819e12ffbd507eced11a1871700a387d5407 19-Jun-2010 micki <micki@micki-laptop.(none)> HID: ntrig: add support for new firwmare versions

Signed-off-by: Micki Balanga <micki@n-trig.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e5a2a04c264e693eafcc78fec5add34c9e15e471 03-Jun-2010 Jindrich Makovicka <makovick@gmail.com> HID: check for HID_QUIRK_IGNORE during probing

While the hardcoded ignore list is checked in hid_add_device(), the
user supplied ignore flags are not. Thus, the IGNORE quirk (0x0004)
cannot be used to stop usbhid from binding devices like iBuddy, which
has been recently removed from the ignore list due to product ID
conflict.

This patch adds the user quirk check to hid_add_device(), and makes
hid_add_device() return -ENODEV when HID_QUIRK_IGNORE bit is set.

HID_QUIRK_NO_IGNORE still takes precedence over HID_QUIRK_IGNORE.

With the patch, iBuddy works properly using libusb when the following
option is added to modprobe.d:

options usbhid quirks=0x1130:0x0002:0x0004

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c2fd1a4ebf9127c280d227acb635eb1df213439c 22-May-2010 Cory Maccarrone <darkstar6262@gmail.com> HID: Add the GYR4101US USB ID to hid-gyration

This change adds in the USB product ID for the Gyration
GYR4101US USB media center remote control. This remote
is similar enough to the other two devices that this driver
can be used without any other changes to get full support
for the remote.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b355850ba383232d4e0e357c1cda8cb7bfcc60bc 17-May-2010 Don Prince <dhprince.devel@yahoo.co.uk> HID: hid-samsung: add support for Creative Desktop Wireless 6000

Add support for the multimedia buttons of the Creative Desktop Wireless 6000
keyboard/mouse combo which are not currently handled by the default/samsung HID
driver.

Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a9885c8f7bf62e251fc178f838b9f0ee897c158a 14-May-2010 Don Prince <dhprince.devel@yahoo.co.uk> HID: Zydacron Remote Control driver

A specialised HID driver for the Zydacron Remote Control (usb id: 13ec:0006).

The specialised HID driver adds support for the buttons which are not

currently handled by the default HID driver.

Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1721a238ba5df9e870ed952464d38714261f5be9 15-May-2010 Julia Lawall <julia@diku.dk> HID: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

- to = \(kmalloc\|kzalloc\)(size,flag);
+ to = kmemdup(from,size,flag);
if (to==NULL || ...) S
- memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3a370ca1dcf8c80aff7a0a21d6b0f50ca2a151e9 12-May-2010 Don Prince <dhprince-devel@yahoo.co.uk> HID: Prodikeys PC-MIDI HID Driver

A specialised HID driver for the Creative Prodikeys PC-MIDI USB Keyboard.

The Prodikeys PC-MIDI is a multifunction keyboard comprising a qwerty keyboard,
multimedia keys and a touch sensitive musical keyboard.

The specialised HID driver adds full support for the musical keyboard and extra
multimedia keys which are not currently handled by the default HID driver.

The specialised HID driver interfaces with ALSA, and presents the midi keyboard
as a rawmidi device. Sustain duration, octave shifting and the midi output
channel can be read/written form userspace via sysfs.

Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk>
ALSA parts:
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
bf280628fca93c4c341587ec914863dcc395af72 29-Apr-2010 Wayne Thomas <waynethomas69@gmail.com> HID: add support for BTC Emprex 3009URF III Vista MCE Remote

The Behavior Tech. Computer Corp. (BTC) remote branded as "Emprex 3009URF III
Vista Remote Controller" uses non-standard mappings for all of its 'special
purpose' keys (0xffbc usage page). This patch modifies the existing
hid-topseed quirky driver to support both remotes in order to prevent
proliferation of in-kernel quirky drivers until such a time that udev remapping
works with these devices. Tested successfully with both the "Emprex" remote
and the "CyberLink" remote originally supported by the hid-topseed driver.

Signed-off-by: Wayne Thomas <waynethomas69@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5a38f2c7c4dd53d5be097930902c108e362584a3 27-Apr-2010 Alan Ott <alan@signal11.us> HID: hidraw: fix numbered reports

Make hidraw not stick an extra byte on the beginning of an IN transfer
when a HID device contains multiple reports.

Signed-off-by: Alan Ott <alan@signal11.us>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
96a7813736a6aa1e2561ecc0d499817daecb4860 23-Apr-2010 Jiri Kosina <jkosina@suse.cz> HID: fix build failure

Fix build failure introduced by 4afb032068f ("HID: fix
support for Wacom Intuos 4 wireless") due to missing coma.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ba4d8abb31def963f49b7c239a8acce57fe1d1cc 22-Apr-2010 Stephane Chatty <chatty@lii-enac.fr> HID: Support for the 11.6" Cando panel

Added support for the 11.6" Cando panel found on the Acer Timeline 1825PTZ.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Tested-by: Johannes Klug <johannesklug@room2web.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4afb032068ff78b4fef5bb2dc33e8ac7d1079e98 21-Apr-2010 Jiri Kosina <jkosina@suse.cz> HID: fix support for Wacom Intuos 4 wireless

Commit ed9eac5b493c679 ("HID: add support for the Wacom Intuos 4 wireles")
forgot to add VID/PID to hid_blacklist[]. Fix that up.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b5e5a37e36cd4d355b875665312d7aaae4e5833c 16-Apr-2010 Bastien Nocera <hadess@hadess.net> HID: add HID_QUIRK_HIDDEV_FORCE and HID_QUIRK_NO_IGNORE

Add two quirks to make it possible for usbhid module options to
override whether a device is ignored (HID_QUIRK_NO_IGNORE) and
whether to connect a hiddev device (HID_QUIRK_HIDDEV_FORCE).

Passing HID_QUIRK_NO_IGNORE for your device means that it will
not be ignored by the HID layer, even if present in a blacklist.

HID_QUIRK_HIDDEV_FORCE will force the creation of a hiddev for that
device, making it accessible from user-space.

Tested with an Apple IR Receiver, switching it from using appleir
to using lirc's macmini driver.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
36213e1e40fb863e2e8ef607b2958504b48f6b8e 15-Apr-2010 Stephane Chatty <chatty@lii-enac.fr> HID: added support for the Cando dual touch panel

Added support for the Cando dual touch panels, found in the Lenovo S10-3t.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Tested-by: Priya Vijayan <priya.vijayan@intel.com>
Tested-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
75c28df87eb6d8e1389af67f26fbe2394e28385e 12-Apr-2010 Pete Zaitcev <zaitcev@redhat.com> HID: non-overlapping zeroing of extra bits

From my review of the way the unused bits of report are being zeroed,
it seems like there must be a bug. Currently, the zeroing is done
in hid_output_field and it covers any bits between the last used bit
and the end of the byte. But in case of, say, my keyboard, NumLock is
mask 0x01 and CapsLock is 0x02. Invoking hid_output_field for NumLock
definitely zeroes across CapsLock. The only reason this works is that
the fields are sorted by the offset.

It would be more correct and simpler to zero-fill the buffer into
which the fields are set.

The patch is tested with an IBM keyboard that is improperly sensitive
to out-of-report pad bits, the extra bits are still zeroed and the
fields continue to work as expected. It is also tested with good
keyboards.

In case, a related bug in RHEL 5 is tracked with Red Hat bug 513934.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6dec143a50c01ca0cc0afcbf5ea4bb8e87981edf 11-Apr-2010 Stephane Chatty <chatty@lii-enac.fr> HID: add support for 3M multitouch 22" display

Now support the 22" display and its updated firmware, including touch
width and height.

The number of touches can now go up to 60, and our single touch emulation
will fail when there are more than 6-7 touches; further work is needed on
this.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
0c3910c255d3f9caeef4ebad5d5a1156a2d33f69 10-Apr-2010 Stephane Chatty <chatty@lii-enac.fr> HID: add support for the eGalax dual-touch panel

Added support for the eGalax dual-touch panel, found on the Asus EeePC T101MT

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Tested-by: Philipp Merkel <linux@philmerk.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1ce31b255cf8b06470dfbd469055b6fd8d2274bc 08-Apr-2010 Raphaël Doursenaud <rdoursenaud@free.fr> HID: add support for cymotion master solar keyboard

Support the solar version of the Cherry's cymotion keyboard line using
existing cherry driver.

Signed-off-by: Raphaël Doursenaud <rdoursenaud@free.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
236db47c2b3b69464d50c695ab2ddd516cf64520 30-Mar-2010 Bruno Prémont <bonbons@linux-vserver.org> HID: new driver for PicoLCD device

Add basic driver for PicoLCD graphics device.
Initially support keypad with input device and provide support
for debugging communication via events file from debugfs.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14bf62cde79423a02a590e02664ed29a36facec1 18-Mar-2010 Stefan Achatz <erazor_de@users.sourceforge.net> HID: add driver for Roccat Kone gaming mouse

This Patch adds support for Kone gaming mouse from Roccat.
It provides access to profiles, settings, firmware, weight,
actual settings etc. through sysfs attributes.
Event handling of this mouse differs from standard hid behaviour
in that tilt button press is reported in each move event which
results in strange behaviour if not handled by the driver.

This is a heavily reworked version of the previously introduced driver.
The changes include most of the previously raised concerns,
memory leak and other fixes, code cleanups, adoption of additional
achieved knowlege about the hardware and is (IMHO) a much better version
than before even when I exchanged reduced USB-IO with a bigger memory
consumption.

I refused to implement one mentioned point:
Removing the 'just-because-we-can' attributes. Motivation:
Reading the clipped in weight: I'm no gamer and can't determine the
usefulness of this feature but if the manufacturer implements such a
feature it might make sense to someone and I would unwillingly limit the
functionality besides its such a small feature.
Reading the actual profile and dpi settings: Here I can testify that one
can get lost of the actual settings when switching back and forth.
The manufacturers windows driver has the ability for on-screen-display
of the values and there is a mouse in the market that has an lcd on the
underside of it to show these values. So I think this feature makes sense
not only for me and shouldn't be removed.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f77e347bd44e3640bdc56003b7402c63ddb1241d 18-Mar-2010 Jiri Kosina <jkosina@suse.cz> HID: simplify error handling in hid_input_report()

The handling of failed debugging buffer allocation got overly
complicated. We simply want to skip the debugging code if allocation
fails and go on with event processing.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1caea61eda5c4d446147aa0e712ba395bb6b81c3 18-Mar-2010 Jiri Kosina <jkosina@suse.cz> HID: output event in debugfs even if hid_get_report() fails

if hid_get_report() fails for whatever reason, the raw output of
the report doesn't make it into 'events' file in debugfs at all, because
we leave hid_input_report() too soon.

We want the report to be always present for debugging reasons. Move the
code around, so that the event makes it to 'events' file all the time,
even if we are going to discard the report.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4da361b69102cdffe73006771eae7504d2cb8736 15-Mar-2010 Bruno Prémont <bonbons@linux-vserver.org> HID: register debugfs entries before adding device

Register debugfs entries before calling device_add() so debugfs entries are
already present when HID driver's probe function gets called on device hotplug.

Also undo debugfs entry registration if device_add() fails so status
HID_STAT_ADDED and debugfs registration status remain consistent and we don't
leak the debugfs entries.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3ee8f0a2b1c81f0472b25d40aa5c1c7c6a0edc2a 13-Mar-2010 Markus Rathgeb <rathgeb.markus@googlemail.com> HID: Add RGT Clutch Wheel clutch device id

This patch enables force feedback for the "RGT Force Feedback CLUTCH Racing Wheel".
It only modifies hid-core.c (hid_blacklist) and hid-tmff.c to add the new USB IDs.

Signed-off-by: Markus Rathgeb <rathgeb.markus@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
128537cea464d919febeaea2000e256749f317eb 06-Feb-2010 Michael Poole <mdpoole@troilus.org> HID: add a device driver for the Apple Magic Mouse.

The Magic Mouse requires that a driver send an unlock Report(Feature) command,
similar to the Wacom wireless tablet and Sixaxis controller quirks. This turns
on an Input Report that isn't published in the input Report descriptor that
contains touch data (and usually overrides the normal motion and click Report).

Because the mouse has only one switch and no scroll wheel, the driver
(under control of parameters) emulates a middle button and scroll wheel.
User space could also ignore and/or re-synthesize those events based on
the reported events.

Some user-space tools to talk to the mouse directly (that is, when it is not
associated with the host's HIDP stack) are at
http://github.com/entrope/linux-magicmouse

Signed-off-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
90a006abf8015c8cab893555244d8fc673b24839 25-Jan-2010 Michael Poole <mdpoole@troilus.org> HID: Export hid_register_report

The Apple Magic Mouse (and probably other devices) publish reports that are not
called out in their HID report descriptors -- they only send them when enabled
through other writes to the device. This allows a driver to handle these
unlisted reports.

Signed-off-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
77f720b71d88a3cbf574c113566a31c93099f97d 06-Feb-2010 Stephane Chatty <chatty@lii-enac.fr> HID: Support for MosArt multitouch panel

Added support for MosArt dual-touch panels, present in the Asus T91MT notebook.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f9ce7c283c16538955d5d094101889792bcde109 20-Jan-2010 Bastien Nocera <hadess@hadess.net> HID: Enable Sixaxis controller over Bluetooth

Now that hid_output_raw_report works, port the PS3 Sixaxis
Bluetooth quirk from user-space, into kernel-space.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f54405db66fbec11679241daefd16fd8291a5762 03-Feb-2010 Alex Neblett <alexneblett01@yahoo.com> HID: add support for Pixart Imaging Optical Touch Screen

Added support for the Pixart Imaging Inc. Optical Touch Screen found in the MSI
AE2220 and other new all in one computers to the Quanta Optical Touch
dual-touch panel driver found in the latest git clone
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git.

Signed-off-by: Alex Neblett <alexneblett01@yahoo.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
7d39e849912f0c3c8c6fc94be7bf7d120b1ee0ba 02-Feb-2010 Jiri Kosina <jkosina@suse.cz> HID: update copyright

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
cd9ec30da58bcd8ab154eba9eb54d16c67e7ef3b 21-Jan-2010 Johnathon Harris <jmharris@gmail.com> HID: add support for Ortek WKB-2000

This patch adds a new USB HID driver for the Ortek WKB-2000, working around an
incorrect LogicalMaximum value in the USB resource descriptor.

Tracked by http://bugzilla.kernel.org/show_bug.cgi?id=14787
Bug originally reported by Ubuntu users: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/405390

Signed-off-by: Johnathon Harris <jmharris@gmail.com>
Tested-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4bb9508bbbb06f10bc3e249dd34375b4a4d6bfc0 23-Dec-2009 Jiri Kosina <jkosina@suse.cz> HID: remove TENX iBuddy from blacklist

There were multiple reports which indicate that vendor messed up horribly
and the same VID/PID combination is used for completely different devices,
some of them requiring the blacklist entry and other not.

Remove the blacklist entry for this combination of VID/PID completely, and let
the user decide and unbind the driver via sysfs eventually, if needed. Proper
fix would be fixing the vendor.

References:

http://lkml.org/lkml/2009/2/10/434
http://bugzilla.kernel.org/show_bug.cgi?id=13411

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
23aeb61e7e1f02fb0f3b8f9e798e75537ca1731d 06-Jan-2010 Christian Schuerer-Waldheim <csw@xray.at> HID: add device IDs for new model of Apple Wireless Keyboard

Added device IDs for the new model of the Apple Wireless Keyboard
(November 2009).

Signed-off-by: Christian Schuerer-Waldheim <csw@xray.at>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
49e4739a0cf681cbfe08c72232c1dcc130b66dde 13-Jan-2010 Stephane Chatty <chatty@lii-enac.fr> HID: add support for Acer T230H multitouch

Add support for the Quanta Optical Touch dual-touch panel, present in the Acer
T230H monitor, HP L2105tm, and Packard-Bell Video 200t.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Tested-by: Jerome Vidal <jerom3@free.fr>
Tested-by: Cedric Berthier <berthiec@gmail.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
74f292ca8c7a2b9370f80d97a49e48174f4c7635 13-Jan-2010 Gary Stein <LordCnidarian@gmail.com> HID: add driver for the Logitech Flight System G940

Implements a new USB-HID for Force Feedback based on the normal
Logitech Force Feedback code and FF-Memless.

Currently only supports the FF_CONSTANT effect although the joystick
appears to support additional non-standard ones.

Signed-off-by: Gary Stein <LordCnidarian@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
722612cd51cf1b574c89dff57cc5dbedf1f645bb 05-Jan-2010 Jiri Kosina <jkosina@suse.cz> HID: fix parsing of local delimiter with size 0

Acording to HID standard 1.11, value 0 allows for size being 0.
Local delimiter tag has has 0 one of the possible values.

Therefore we need to handle this case properly, to be fully compliant
with the specification.

Reported-by: Marcin Tolysz <tolysz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d3fb5454a8474d5d22c8f8fe4d043b05732d91d5 04-Jan-2010 Stephane Chatty <chatty@lii-enac.fr> HID: add support for Stantum multitouch panel

Added support for the Stantum multitouch panel.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b6353f4f36f03a12edaf3fa5365b475a28106035 22-Dec-2009 Stephane Chatty <chatty@lii-enac.fr> HID: Support for 3M multitouch panel

Add support for 3M multitouch panels.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
[jkosina@suse.cz: fix build failure because of inconsistent 3M/MMM defines]
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
70c66567d1e41d8b2186a2d198997a1c8d79c0c4 09-Dec-2009 Petr Štetiar <ynezz@true.cz> HID: blacklist ET&T TC5UH touchscreen controller

This patch adds ET&T TC5UH touchscreen controller to HID blacklist,
because this device is handled by input/usbtouchscreen driver.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e8d0eab4d9eda9f5e97852f780f020bfb134f9f0 02-Dec-2009 Jiri Kosina <jkosina@suse.cz> HID: add support for Acan FG-8100 barcode reader

Acan FG-8100 barcode reader (0x04b4/0xbca1) has vendor ID of
cypress and requires the same MIN/MAX swap descriptor quirk
as other barcode readers from cypress.

Reported-by: Stijn Ghesquiere <stijn@applesnail.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
24985cf68612a5617d396b0b188cec807641cde1 13-Nov-2009 Jiri Kosina <jkosina@suse.cz> HID: support Logitech/3DConnexion SpaceTraveler and SpaceNavigator

These devices wrongly report their axes as relative instead of absolute.

Fix this in up report descriptor of the device before it enters the parser.

Reported-by: simon.windows@gmail.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ccabcd2dbe08c3b44ebae18e43ba212dfcb706d1 02-Oct-2009 Jiri Kosina <jkosina@suse.cz> HID: remove useless DRIVER_VERSION macro

DRIVER_VERSION has no use whatosoever, it has been set to "2.6"
for ages. Remove it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
88adb72bcf3b1cc6b440fda9fa97bc2151245fc5 02-Oct-2009 Jiri Kosina <jkosina@suse.cz> HID: fix MODULE_AUTHOR usage in HID modules

Remove unused (in usbhid module) DRIVER_AUTHOR macrco and properly
use multiple MODULE_AUTHOR() instances in both modules.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
eb8141ccd32d422fa11c6e2108cae4c40456d811 02-Oct-2009 Lamarque Vieira Souza <lamarque@gmail.com> HID: blacklist Acer Ferrari 4005 optical mouse

Marks Acer Bluetooth Optical Rechargeable Mouse from Ferrari 4005 notebook to
be ignored by hid core. This change makes hid core to use input session instead
of hid session with that mouse. With hid session the mouse cursor moves too
laggy, using input session corrects this problem.

Signed-off-by: Lamarque V. Souza <lamarque@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ff9b00a226ccea66e6ce70e9083c42f5b6001f73 01-Oct-2009 Jiri Kosina <jkosina@suse.cz> HID: fix kerneldoc comment for hid_input_report()

The kerneldoc comment for 'interrupt' has already confused a lot
of people, as it is simply wrong. It doesn't carry the information
about the context, but is used to distinguish between two fundamental
types of low-level transport transfers -- interrupt vs. control.

Make this clear in the comment.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c4c259bcc27c4242b012106afdba183622b1735f 15-Sep-2009 Jiri Kosina <jkosina@suse.cz> HID: consolidate connect and disconnect into core code

HID core registers input, hidraw and hiddev devices, but leaves
unregistering it up to the individual driver, which is not really nice.
Let's move all the logic to the core.

Reported-by: Marcel Holtmann <marcel@holtmann.org>
Reported-by: Brian Rogers <brian@xyzw.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d1ff65226c5afe55f9af38a439058f41b71e114f 15-Sep-2009 Jiri Kosina <jkosina@suse.cz> HID: fix non-atomic allocation in hid_input_report

'interrupt' variable can't be used to safely determine whether
we are running in atomic context or not, as we might be called from
during control transfer completion through hid_ctrl() in atomic
context with interrupt == 0.

Reported-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
42960a13001aa6df52ca9952ce996f94a744ea65 26-Aug-2009 Jan Scholz <Scholz@fias.uni-frankfurt.de> HID: completely remove apple mightymouse from blacklist

Commit fa047e4f6fa63a6e9d0ae4d7749538830d14a343 "HID: fix inverted
wheel for bluetooth version of apple mighty mouse" is incomplete. If
we remove Apple MightyMouse (bluetooth version) from the list of
apple_devices in drivers/hid/hid-apple.c we have to remove it from
hid_blacklist in drivers/hid/hid-core.c as well.

Signed-off-by: Jan Scholz <Scholz@fias.uni-frankfurt.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4cfae3e80431fd113f0f4a8e1d4fff84aafe045c 02-Aug-2009 Henning Glawe <glaweh@debian.org> HID: ignore Philips IEEE802.15.4 RF Dongle

This usb device claims to be of HID class, but is in fact a 802.15.4
lowpan transceiver, therefore the generic HID driver cannot operate this
device. A separate driver for this device will be written for this using
the new 802.15.4 stack.

Signed-off-by: Henning Glawe <glaweh@debian.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
31f7fd795d17b264c3c05e4a976f963012c17c68 31-Jul-2009 Jarod Wilson <jarod@redhat.com> HID: ignore all recent SoundGraph iMON devices

After some inspection of the Windows iMON driver, several additional
device IDs were added to the lirc_imon driver. At least a few of these
have been seen in the wild, and require manual quirking to keep the
usbhid driver from binding to them. Rather than list out every single
device, ignore the entire device ID range, 0x0034 - 0x0046. Some of
these may not advertise themselves as HID devices, but no harm done to
such devices anyway. Does the right thing in brief testing w/my 0x0045
device.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
711a680e35059bc5c7c28d3c4bd0bebd3b7bb6ee 13-Jul-2009 Bruno Premont <bonbons@linux-vserver.org> HID: driver for Twinhan USB 6253:0100 remote control

Add explicit key mappings for TwinHan USB HID remote control.

All dummy Ctrl, Alt, Meta, ... key press/release events generated
by the remote are silenced by "unmapping" them. This makes Power and
Volume keys single-key and strips the regular (even while idle) key
release events for Ctrl, Alt, Meta, ...

Signed-off-by: Bruno Premont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
7a84b1336a145d683fb8cdfd6c2c67545a58b126 29-Jun-2009 Ruben Aos Garralda <rubenatch@gmail.com> HID: add rumble support for Thrustmaster Dual Trigger 3-in-1

This patch enables rumble in Thrustmaster Dual 3-in-1 trigger gamepads (in both
PC and PS3 modes). It uses the same code as Thrustmaster FireStorm Dual Power 2,
so it only adds new USB IDs to hid-core.c and hid-tmff.c

Signed-off-by: Ruben Aos Garralda <rubenatch@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fd30ea8c871552ddd6a5e1c0886de8fef4df53bc 23-Jun-2009 Jiri Kosina <jkosina@suse.cz> HID: add force feedback support for Logitech WingMan Formula Force GP

Add force feedback support for Logitech WingMan Formula Force GP
(0x046d/0xc293).

Reported-by: wylda@volny.cz
Tested-by: wylda@volny.cz
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
76c317d6e5cb7f58541879006d39774596962715 19-Jul-2009 Julia Lawall <julia@diku.dk> HID: Move dereferences below a NULL test

If the NULL test is necessary, then the dereferences should be moved below
the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E,E1;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
... when != E=E1
when != i
if (E == NULL||...) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
55dba52458a11126ff4445b5b94ebde03afcf47a 26-Jun-2009 Jiri Kosina <jkosina@suse.cz> HID: fix memory leak on error path in debug code

If hid_get_report() fails, we forgot to free the already allocated buffer
for debugging messages on error path. Fix that up.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
cd667ce24796700e1a0e6e7528efc61c96ff832e 12-Jun-2009 Jiri Kosina <jkosina@suse.cz> HID: use debugfs for events/reports dumping

This is a followup patch to the one implemeting rdesc representation in debugfs
rather than being dependent on compile-time CONFIG_HID_DEBUG setting.

The API of the appropriate formatting functions is slightly modified -- if
they are passed seq_file pointer, the one-shot output for 'rdesc' file mode
is used, and therefore the message is formatted into the corresponding seq_file
immediately.

Otherwise the called function allocated a new buffer, formats the text into the
buffer and returns the pointer to it, so that it can be queued into the ring-buffer
of the processess blocked waiting on input on 'events' file in debugfs.

'debug' parameter to the 'hid' module is now used solely for the prupose of inetrnal
driver state debugging (parser, transport, etc).

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a635f9dd83f3382577f4544a96df12356e951a40 12-Jun-2009 Jiri Kosina <jkosina@suse.cz> HID: use debugfs for report dumping descriptor

It is a little bit inconvenient for people who have some non-standard
HID hardware (usually violating the HID specification) to have to
recompile kernel with CONFIG_HID_DEBUG to be able to see kernel's perspective
of the HID report descriptor and observe the parsed events. Plus the messages
are then mixed up inconveniently with the rest of the dmesg stuff.

This patch implements /sys/kernel/debug/hid/<device>/rdesc file, which
represents the kernel's view of report descriptor (both the raw report
descriptor data and parsed contents).

With all the device-specific debug data being available through debugfs, there
is no need for keeping CONFIG_HID_DEBUG, as the 'debug' parameter to the
hid module will now only output only driver-specific debugging options, which has
absolutely minimal memory footprint, just a few error messages and one global
flag (hid_debug).

We use the current set of output formatting functions. The ones that need to be
used both for one-shot rdesc seq_file and also for continuous flow of data
(individual reports, as being sent by the device) distinguish according to the
passed seq_file parameter, and if it is NULL, it still output to kernel ringbuffer,
otherwise the corresponding seq_file is used for output.

The format of the output is preserved.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fac733f029251a393c42a8313432f2d9fe43bb83 13-May-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> HID: force feedback support for SmartJoy PLUS PS2/USB adapter

This driver adds force feedback support for SmartJoy PLUS PS2/USB adapter. I
made this driver one device spesific instead of making generic 'wisegroup-ff'
because I have another Wisegroup PS2/USB adapter that doesn't work same way as
SmartJoy PLUS. If another device that is compatible pops up, this driver could
be then renamed to something more generic.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ca2dcd40f54c8928b3994712a6cadd2078a087fa 11-May-2009 Bastien Nocera <hadess@hadess.net> HID: Wacom Graphire Bluetooth driver

Based on the work by Andrew Zabolotny, an HID driver for the Bluetooth
Wacom tablet. This is required as it uses a slightly different
protocols from what's currently support by the drivers/input/wacom*
driver, and those only support USB.

A user-space patch is required to activate mode 2 of the Wacom tablet,
as hidp does not support hid_output_raw_report.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e5288eb5ea89bd82d897cb687348bc608278f920 02-May-2009 Jiri Kosina <jkosina@suse.cz> HID: fix oops in hid_check_keys_pressed()

If the device is not claimed by hid-input (i.e devices driver by userspace
hiddev/hidraw-based drivers, or completely detached from HID
and driver by libusb), we must not check the hid->inptus, as it
is not guaranteed to be initialized, as this is performed only for devices
handled by hid-input.

Reported-by: Guillaume Chazarain <guichaz@gmail.com>
Tested-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
243b706d8a71364ad6080328d45b73516c8af5f3 17-Apr-2009 Christophe Borivant <christophe.borivant@wanadoo.fr> HID: Add support for the G25 force feedback wheel in native mode

Add Product Id 0xc299 for the Logitech G25 force feedback wheel
The Logitech G25 force feedback wheel, is first recognize by the kernel
with the product id "0xc294". In this mode, we can't use all the axes
and buttons of the wheel.

Using a userland utility, it is possible to make the wheel switch to native
mode -- http://svn.vdrift.net/viewvc.cgi/trunk/tools/G25manage/?root=VDrift
In native mode, the wheel change its id number to "0xc299".

The packet that needs to be sent to the wheel to swtich to native mode and
change its PID is

{ 0xf8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 }

Signed-off-by: Christophe Borivant <christophe.borivant@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
afa5eb7c68689ced4284f01c96feed44a2d0a127 18-Mar-2009 Jiri Slaby <jirislaby@gmail.com> HID: remove compat stuff

This removal was scheduled and there is no problem with later
distros to adapt for the new bus, thanks to aliases.

module-init-tools map files are deprecated nowadays, so that
the patch which introduced hid ones into the m-i-t won't be
accepted and hence there is no reason for leaving compat stuff in.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
794227415f8f5f395a9ed4269a4ee7a3c34f66a5 11-Mar-2009 Jiri Kosina <jkosina@suse.cz> HID: add support for Kye/Genius Ergo 525V

This device sends several buttons in a separate field, which is
wrongly described in the report descriptor. Fix it in the following
way:

- change led usage page to button
- report size 8 count 1 becomes report size 1 count 8
- the button usage range changed to 4-7 (the mouse has three buttons in
a different field already).

Reported-by: Tomas Hanak <tomas.hanak@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fef3f571ecc2a82395c531d97b3f71a59e04e946 05-Mar-2009 Ryan Finnie <ryan@finnie.org> HID: Support Apple mini aluminum keyboard

New USB device ids and quirks for the "mini" Apple USB aluminum
keyboards released Tuesday, model A1242. Note that while I own the ANSI
(0x021d) version and cannot verify that the ISO (0x021e) and JIS
(0x021f) versions exist, previous releases have followed the triple id
convention for awhile now, and the device ids fit perfectly between
USB_DEVICE_ID_APPLE_GEYSER4_* and USB_DEVICE_ID_APPLE_ALU_*.

Signed-off-by: Ryan Finnie <ryan@finnie.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fdf93aa33268889e126aa677f2072238bd76adb0 04-Mar-2009 Jiri Kosina <jkosina@suse.cz> HID: support for Kensington slimblade device

0x47d/0x2041 device sends two extra buttons in 0xff00 usage
page and therefore requires special handling.

Reported-by: Jason Noble <nobleja@polezero.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3f866fbd52d1863db5c07700e560aef22c4fdc01 04-Mar-2009 Richard Walmsley <richwalm@gmail.com> HID: DragonRise game controller force feedback driver

Adds force feedback support for USB DragonRise Inc. game controllers.
These devices are mass produced in China and distributed under several vendors.

Signed-off-by: Richard Walmsley <richwalm@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
0361a28d3f9a4315a100c7b37ba0b55cfe15fe07 17-Dec-2008 Oliver Neukum <oliver@neukum.org> HID: autosuspend support for USB HID

This uses the USB busy mechanism for aggessive autosuspend of USB
HID devices. It autosuspends all opened devices supporting remote wakeup
after a timeout unless

- output is being done to the device
- a key is being held down (remote wakeup isn't triggered upon key release)
- LED(s) are lit
- hiddev is opened

As in the current driver closed devices will be autosuspended even if they
don't support remote wakeup.

The patch is quite large because output to devices is done in hard interrupt
context meaning a lot a queuing and locking had to be touched. The LED stuff
has been solved by means of a simple counter. Additions to the generic HID code
could be avoided. In addition it now covers hidraw. It contains an embryonic
version of an API to let the generic HID code tell the lower levels which
capabilities with respect to power management are needed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
daedb3d6a91f9626ab4c921378ac52e44de833d5 14-Feb-2009 Anssi Hannula <anssi.hannula@gmail.com> HID: move tmff and zpff devices from ignore_list to blacklist

The devices handled by hid-tmff and hid-zpff were added in the
hid_ignore_list[] instead of hid_blacklist[] in hid-core.c, thus
disabling them completely.

hid_ignore_list[] causes hid layer to skip the device, while
hid_blacklist[] indicates there is a specific driver in hid bus.

Re-enable the devices by moving them to the correct list.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
35cfd1d964f3c2420862f2167a0eb85ff1208999 01-Feb-2009 Michael Tokarev <mjt@tls.msk.ru> HID: blacklist Powercom USB UPS

For quite some time users with various UPSes from Powercom were forced to play
magic with bind/unbind in /sys in order to be able to see the UPSes. The
beasts does not work as HID devices, even if claims to do so. cypress_m8
driver works with the devices instead, creating a normal serial port with which
normal UPS controlling software works.

The manufacturer confirmed the upcoming models with proper HID support will
have different device IDs. In any way, it's wrong to have two completely
different modules for one device in kernel.

Blacklist the device in HID (add it to hid_ignore_list) to stop this mess,
finally.

Signed-off-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
bae7eb33b25387fdc7ccae08768bef1f9484a5b0 28-Jan-2009 Jiri Kosina <jkosina@suse.cz> HID: document difference between hid_blacklist and hid_ignore_list

Many people get it wrong and add device IDs into hid_blacklist instead
of hid_ignore_list. Let's put a little comment in place.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
656f1fb90aa2261daa316c0dd8f75e3420f81e9e 28-Jan-2009 Jarod Wilson <jarod@redhat.com> HID: add antec-branded soundgraph imon devices to blacklist

hid_ignore_list additions for the Antec-branded SoundGraph iMon VFD and LCD
devices (0x15c2:0x0044 and 0x0045).

These devices are driven by lirc.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5f6108cf9be4a77d6bee96750aa4fe18b6b97dee 08-Dec-2008 Alexey Klimov <klimov.linux@gmail.com> HID: don't allow DealExtreme usb-radio be handled by usb hid driver

This device is already handled by radio-si470x driver, and we therefore
want usbhid to ignore it. Patch places usb ids of that device in
ignore section of hid-core.c

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f14f526d02b14fd0b8c1ac4ec413e4577ad5f62e 04-Jan-2009 Lev Babiev <harley@hosers.org> HID: driver for TopSeed Cyberlink quirky remote

I recently picked up a Cyberlink branded remote control produced
by TopSeed Tech Corp. Alas, it appears that this device is using
non-standard mappings for some of it's keys (Usage page 0xffbc).

Signed-off-by: Lev Babiev <harley@hosers.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
42859e0bd21daba9974757fcfe4a4dde265fe28d 11-Dec-2008 Lukasz Lubojanski <lukasz@lubojanski.info> HID: force feedback driver for GreenAsia 0x12 PID

I have implemented Force Feedback driver for another "GreeAsia" based device
(0e8f:0012 "GreenAsia Inc. USB Joystick"). The functionality was tested with
MANTA Warior MM816 and SpeedLink Strike2 SL-6635 and fftest software -
everything seems to work right.

Signed-off-by: Lukasz Lubojanski <lukasz@lubojanski.info>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3a6f82f7a22cf19687f556997c6978b31c109360 24-Nov-2008 Jiri Slaby <jirislaby@gmail.com> HID: add dynids facility

Allow adding new devices to the hid drivers on the fly without
a need of kernel recompilation.

Now, one can test a driver e.g. by:
echo 0003:045E:00F0.0003 > ../generic-usb/unbind
echo 0003 045E 00F0 > new_id
from some driver subdir.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
94011f93f2cd7410401e22390cf7a14fe5495a22 19-Nov-2008 Rafi Rubin <rafi@seas.upenn.edu> HID: add n-trig digitizer support

Added quirks for the N-Trig digitizer.

Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6bbe586fd4d94439f3960e200056ff057f7db5c6 31-Oct-2008 Kay Sievers <kay.sievers@vrfy.org> HID: struct device - replace bus_id with dev_name(), dev_set_name()

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>
08ef08ee8c5a8d538ca9a3c433d4213c128af863 30-Oct-2008 Alan Stern <stern@rowland.harvard.edu> HID: automatically call usbhid_set_leds in usbhid driver

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>
ac26fca3e14c8882e382daa7e96ab73e0186cf03 20-Nov-2008 Jiri Kosina <jkosina@suse.cz> HID: ignore mouse interface for unibody macbooks

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>
ee8a1a0a1a5817accd03ced7e7ffde3a4430f485 26-Nov-2008 Jan Scholz <Scholz@fias.uni-frankfurt.de> HID: Apple ALU wireless keyboards are bluetooth devices

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>
578f3a35fecabff49bad808c5301313f785b5462 20-Nov-2008 Jiri Kosina <jkosina@suse.cz> HID: add USB ID for another dual gameron adapter

0x0810/0x0002 needs the very same handling as 0x0001.

Reported-by: Steve Conklin <sconklin@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
06d2148ed3b3fa997fa5a848f6405709c464b3ba 20-Nov-2008 Jiri Kosina <jkosina@suse.cz> HID: unignore mouse on unibody macbooks

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>
5181e594512faeac7d7fd9620ce91105f45bf643 17-Nov-2008 Jiri Kosina <jkosina@suse.cz> HID: fix blacklist entries for greenasia/pantherlord

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>
62a56582e01b1c5139b235004548e233201df9aa 13-Nov-2008 Alexey Klimov <klimov.linux@gmail.com> HID: fix radio-mr800 hidquirks

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>
c91c21c5a6facddce936d82e5bc0c655d04288aa 13-Nov-2008 Alexey Klimov <klimov.linux@gmail.com> HID: fix kworld fm700 radio hidquirks

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>
43ff3a48c13f3ddc085271c2eea2985d28c8aa08 10-Nov-2008 Andi Kleen <andi@firstfloor.org> HID: use single threaded work queue for hid_compat

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>
a96d6ef34751093797c3a6c6080733dd7af23d35 04-Nov-2008 Henrik Rydberg <rydberg@euromail.se> HID: support for new unibody macbooks

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>
6a13378a56ce06afca9db75f3d4e663fba5f0992 20-Oct-2008 Alexey Klimov <klimov.linux@gmail.com> V4L/DVB (9337a): HID: Don't allow KWorld radio fm700 be handled by usb hid 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>
fa157bdfe87c5ea98a80b96cb08f1ab509e21a52 30-Oct-2008 Alan Stern <stern@rowland.harvard.edu> HID: add quirk entry for no-name keyboard (0x13ba/0x0017)

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>
cc6e0bbb47f02fd36cd55b3189c0c79079096ab8 23-Oct-2008 Jiri Kosina <jkosina@suse.cz> HID: Add support for Sony Vaio VGX-TP1E

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>
b4d8e4736c94e78fd846dca0c95a3a0710582584 22-Oct-2008 Jiri Slaby <jirislaby@gmail.com> HID: fix hidbus/appletouch device binding regression

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>
ac2d98998c32fcdc8d8919b7a4536a7945fd0422 20-Oct-2008 Jiri Kosina <jkosina@suse.cz> HID: quirk for OLED devices present in ASUS G50/G70/G71

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>
1e093206734568e780c2717da1c89b97e9471954 17-Oct-2008 Jiri Kosina <jkosina@suse.cz> HID: add support for another Gyration remote control

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>
022b7024d4bb1f9a2f30021a2672a0f940ebfa7a 17-Oct-2008 Dan Nicholson <dbn.lists@gmail.com> Revert "HID: Invert HWHEEL mappings for some Logitech mice"

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>
24c88eb671b437d700fbfa7aa79adeb9690db1eb 16-Oct-2008 Jarod Wilson <jarod@redhat.com> HID: blacklist additional SoundGraph iMon LCD models

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>
df9bcace7b1c29e9be1c13b034ff04f4f4c90ede 14-Oct-2008 Jiri Kosina <jkosina@suse.cz> HID: add missing blacklist entry for Apple ATV ircontrol

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>
a48c65b35a6f993aec13d18a37f6ea71fbcb0c06 14-Oct-2008 Mauro Carvalho Chehab <mchehab@redhat.com> HID: add support for Bright ABNT2 brazilian device

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>
ffcf70fb0693f1ab0133f973b5b9c552be766b16 14-Oct-2008 Mauro Carvalho Chehab <mchehab@redhat.com> HID: Don't let Avermedia Radio FM800 be handled by usb hid drivers

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>
0dc491682f6e673a14c643d9a3e7305ce4616b96 14-Oct-2008 Mauro Carvalho Chehab <mchehab@redhat.com> HID: fix numlock led on Dell device 0x413c/0x2105

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>
987fbc1f7d446f4bf7063d3b756ae29db80be75e 18-Sep-2008 Jiri Slaby <jirislaby@gmail.com> HID: move zeroplus FF processing

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10e41a711e55f485709b4ca157e587cf36ef5a69 18-Sep-2008 Jiri Slaby <jirislaby@gmail.com> HID: move thrustmaster FF processing

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5f022298aab58ddff9bccdb28b82a59109789da9 18-Sep-2008 Jiri Slaby <jirislaby@gmail.com> 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>
d92870ddd248e8c2562a8c4047885d3ad221ece7 09-Sep-2008 Jiri Slaby <jirislaby@gmail.com> HID: fix tty<->hid deadlock

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>
d1d3a5f6eaee337d793ab9ac28e696f0262c3c8a 09-Sep-2008 Remi Cattiau <remi@cattiau.com> HID: ignore iBuddy devices

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>
c0bd6a429819f794f626f9e73be4564e18e132db 27-Aug-2008 Richard Hughes <rhughes@redhat.com> HID: remove ignore quirk for MGE UPS devices

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>
0f37cd0306463ad35f958d8f74a2b00e5b190b4b 20-Aug-2008 Jiri Kosina <jkosina@suse.cz> HID: introduce list for hiddev creation forcing

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>
606bd0a8616a0e59021cb2997e942513f24f641d 04-Jul-2008 Jiri Slaby <jirislaby@gmail.com> 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>
93c10132a7ac160df3175b53f7ee857625412165 27-Jun-2008 Jiri Slaby <jirislaby@gmail.com> 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>
fea6f1833b5bbff7066bcde1fa1141c9717bbad2 26-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move dell quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
bd28ce008bdc68ef5902f68d2d62cbb7fa78c415 25-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move sony quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
980a3da6acdd577ee3ae192e868dc52fe4b7f2e5 25-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move samsung quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
949f8fef77186c7361d22e1ea6f42c76ceda42b0 24-Jul-2008 Jiri Slaby <jirislaby@gmail.com> HID: move gyration quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3b8006e51038ef263a0404756d9e190c9a9f74d5 25-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move monterey quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1e76253220dbe66e048e55680266dd1f4af0be85 24-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move petalynx quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b5635b129b3ca3a9c879a36f58f5b8c4903d267a 24-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move belkin quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fcfacfd3594d5d2fa99fb5e7d33dee3904b1a156 24-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move chicony quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1f243e302cea1561ac881eb5d27041c5342beba4 24-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move ezkey quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3b239cd739a9499da08326356add3d9d992c7911 24-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move cherry quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14a21cd459f97e3b3cc4fcde48fc5bcdb81d097e 23-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move a4tech quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
0f2213208f8da51bcb665309e3468f000489c04f 23-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move cypress quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
90231e7eaf752856a2c13f786f36ec7f641bad28 23-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move sunplus quirks

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
78a849a682a1d5ee7b7187b08abdc48656326a4e 20-Jun-2008 Jiri Slaby <jirislaby@gmail.com> 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>
880d29f109428be1d027adf919a7457d8fe41fd3 18-Jun-2008 Jiri Slaby <jirislaby@gmail.com> 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>
02ae9a1a8bc1d08a8fd5f6a0b8bde400b0f891b9 16-May-2008 Jiri Slaby <jirislaby@gmail.com> HID: add compat support

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>
8c19a51591d06f5226499972567f528cf6066bb7 18-Jun-2008 Jiri Slaby <jirislaby@gmail.com> 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>
d458a9dfc4de24870b8c747484b1988726534bee 16-May-2008 Jiri Slaby <jirislaby@gmail.com> 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>
5f22a7992349c5ca3842190be52d5e9a1dd7adf4 16-May-2008 Jiri Slaby <jirislaby@gmail.com> 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>
c500c9714011edab021591340042787722db9cf0 16-May-2008 Jiri Slaby <jirislaby@gmail.com> 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>
85cdaf524b7ddab627e7d15405693f2511ef7505 16-May-2008 Jiri Slaby <jirislaby@gmail.com> 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>
6f0168d2dacd7972d887e1ca27943ef8af7512a5 16-May-2008 Harvey Harrison <harvey.harrison@gmail.com> HID: use get/put_unaligned_* helpers

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>
c105068f2b35343eecf2bf16ee29a362b6121fa3 29-Apr-2008 Harvey Harrison <harvey.harrison@gmail.com> hid-core: use get_unaligned_* helpers

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>
abdff0f7749a6696ba2a4238b675cbc55abcdb7a 31-Mar-2008 Adrian Bunk <bunk@kernel.org> 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>
b54ec3c13cf77d21bab25d8bb117f642561fdf4f 28-Mar-2008 Jiri Kosina <jkosina@suse.cz> HID: pass numbered reports properly to hidraw

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>
282bfd4cbcc2bbeb1a2cad1f42debd378e0b5ac9 28-Mar-2008 Jiri Slaby <jirislaby@gmail.com> HID: fix sparse warnings

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>
377e10fbb4ef219f540d06796e9fb0d3ec35a58f 22-Mar-2008 Anssi Hannula <anssi.hannula@gmail.com> HID: only dump report traffic with debug level 2

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>
dfd347f09c66beed2ae621aad5fd75535b1838d4 04-Mar-2008 Jiri Kosina <jkosina@suse.cz> HID: fix comment in hid_input_report()

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>
c4124c9b68bf8ecf1e8afedad3a22e18666cb6f3 30-Nov-2007 Jiri Kosina <jkosina@suse.cz> HID: remove redundant WARN_ON()s in order not to scare users

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>
86166b7bcda0bcb53525114fa1c87ac432be478e 14-May-2007 Jiri Kosina <jkosina@suse.cz> 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>
58037eb961f859607b161c50d9d4ecb374de1e8f 30-May-2007 Jiri Kosina <jkosina@suse.cz> 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>
e63340ae6b6205fef26b40a75673d1c9c0c8bb90 08-May-2007 Randy Dunlap <randy.dunlap@oracle.com> header cleaning: don't include smp_lock.h when not used

Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
f142b3a4f64eca235f5890d9cecb68482f62ed26 16-Apr-2007 Jiri Kosina <jkosina@suse.cz> 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>
46386b587086c8d2698222a031bf749688464032 12-Mar-2007 Simon Budig <simon@budig.de> HID: introduce proper zeroing of unused bits in output reports

Some HID devices are looking on the unused bits in the HID reports they
receive. This is violating the specification, but we want to make those
devices work. Well-behaving devices are unaffected, as they don't care
about the unused bits.

If bitsused % 8 is 0 all bits in data[] get used and we don't need to
clear anything. Otherwise (bitsused % 8) bits of the last byte get used.
By shifting 1 for (bitsused % 8) bits and subtracting 1 we create a mask
consisting of (bitsused % 8) ones and remaining zeroes. By ANDing we
clear the upper unused bits.

Signed-off-by: Simon Budig <simon@budig.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8da7d1bae512aee155ef02f7ab1266358842e1fd 05-Apr-2007 Adam Kropelin <akropel1@rochester.rr.com> HID: Do not discard truncated input reports

Truncated reports should not be discarded since it prevents buggy
devices from communicating with userspace.

Prior to the regession introduced in 2.6.20, a shorter-than-expected
report in hid_input_report() was passed thru after having the missing
bytes cleared. This behavior was established over a few patches in the
2.6.early-teens days, including commit
cd6104572bca9e4afe0dcdb8ecd65ef90b01297b.

This patch restores the previous behavior and fixes the regression.

Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b87496aa493a540b9c084b16b73f915705ebdbcc 14-Mar-2007 Al Viro <viro@ftp.linux.org.uk> [PATCH] hid-core endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
d108d4fe34730135647fe32a4f8091491d3542ea 10-Mar-2007 Jiri Kosina <jkosina@suse.cz> HID: zeroing of bytes in output fields is bogus

This patch removes bogus zeroing of unused bits in output reports,
introduced in Simon's patch in commit d4ae650a.
According to the specification, any sane device should not care
about values of unused bits.

What is worse, the zeroing is done in a way which is broken and
might clear certain bits in output reports which are actually
_used_ - a device that has multiple fields with one value of
the size 1 bit each might serve as an example of why this is
bogus - the second call of hid_output_report() would clear the
first bit of report, which has already been set up previously.

This patch will break LEDs on SpaceNavigator, because this device
is broken and takes into account the bits which it shouldn't touch.
The quirk for this particular device will be provided in a separate
patch.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
47a80edb1d80ae644ea374a016c8e68d43d2671f 12-Mar-2007 Jiri Kosina <jkosina@suse.cz> HID: allocate hid_parser in a proper way

hid_parser is non-trivially large structure, so it should be allocated
using vmalloc() to avoid unsuccessful allocations when memory fragmentation
is too high.
This structue has a very short life, it's destroyed as soon as the report
descriptor has been completely parsed.

This should be considered a temporary solution, until the hid_parser is
rewritten to consume less memory during report descriptor parsing.

Acked-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
776c0e96edecf77f827a62d2a1641cc2ca479043 21-Feb-2007 Jiri Kosina <jkosina@suse.cz> HID: fix possible double-free on error path in hid parser

Freeing of device->collection is properly done in hid_free_device() (as
this function is supposed to free all the device resources and could be
called from transport specific code, e.g. usb_hid_configure()).

Remove all kfree() calls preceeding the hid_free_device() call.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4237081e573b99a48991aa71364b0682c444651c 20-Feb-2007 Jiri Kosina <jkosina@suse.cz> HID: fix bug in zeroing the last field byte in output reports

d4ae650a904612ffb7edd3f28b69b022988d2466 introduced zeroing of the
last field byte in output reports in order to make sure the unused
bits are set to 0. This is done in a wrong way, resulting in a
wrong bits being zeroed out (not properly shifted by the field offset
in the report). Fix this.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
cd354f1ae75e6466a7e31b727faede57a1f89ca5 14-Feb-2007 Tim Schmielau <tim@physik3.uni-rostock.de> [PATCH] remove many unneeded #includes of sched.h

After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dd64c151b978dc78ed535433d930c75b5c15deeb 30-Jan-2007 Jiri Kosina <jkosina@suse.cz> HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG

CONFIG_INPUT_DEBUG is non-existent option, so remove anything depending
on it.

Also, as we have new CONFIG_HID_DEBUG, this should be used on places
where ifdef DEBUG was used before.

Suggested by Adrian Bunk.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c080d89ad91e98fec0e8fc5f448a1ad899bd85c7 25-Jan-2007 Jiri Kosina <jkosina@suse.cz> HID: hid debug from hid-debug.h to hid layer

hid-debug.h contains a lot of code, and should not therefore
be a header.

This patch moves the code to generic hid layer as .c source, and
introduces CONFIG_HID_DEBUG to conditionally compile it, instead
of playing with #define DEBUG and including hid-debug.h.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
767fe7877c2928b5633992ee60a49ad4516dc2af 24-Jan-2007 Jiri Kosina <jkosina@suse.cz> HID: fix memleaking of collection

hid_free_device() doesn't free device->collection (but it does
free device->rdesc and device itself). This imposes memory leak.
Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
e54dea69bac12dae2ff27c1c7a472d4eee70638d 15-Jan-2007 Jiri Kosina <jkosina@suse.cz> HID: compilation fix when DEBUG_DATA is defined

hid/hid-core.c references 'len' variable when DEBUG_DATA is defined,
but the actual name of the variable is 'size'. Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d4ae650a904612ffb7edd3f28b69b022988d2466 15-Jan-2007 Simon Budig <simon@budig.de> HID: proper LED-mapping for SpaceNavigator

This change introduces a mapping for LED indicators between the HID
specification and the Linux input subsystem. The previous code properly
mapped the LEDs relevant for Keyboards, but garbeled the remaining ones.
With this change all LED enums from the input system get mapped to more
or less equivalent LED numbers from the HID specification.

This patch also ensures that the unused bits in a HID report to the
device are zeroed out. This makes the 3Dconnexion SpaceNavigator fully
usable with the linux input system.

Signed-off-by: Simon Budig <simon@budig.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
531498013163c72cee8540e98e12c0c430c7fe87 09-Jan-2007 Jiri Kosina <jkosina@suse.cz> HID: Fix DRIVER_DESC macro

DRIVER_DESC macro is wrong in drivers/hid/hid-core.c. Its value
is legacy from original usb+hid code and clashes with current
usbhid implementation. Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4d503ecc86a14b86ab7bcdfa8b755994143eba19 08-Jan-2007 Jiri Kosina <jkosina@suse.cz> HID: mousepoll parameter makes no sense for generic HID

mousepoll parameter makes no sense for generic HID code. It
belongs to (and is implemented by) usbhid. This is also where
all users are expecting it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
d6509c36ba333282362e5f9769869f8a8d790aaf 06-Jan-2007 Ahmed S. Darwish <darwish.07@gmail.com> HID: tiny patch to remove a kmalloc cast

Remove unnecessary cast.

Signed-off-by: Ahmed Darwish <darwish.07@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
aa8de2f038baec993f07ef66fb3e94481d1ec22b 08-Dec-2006 Jiri Kosina <jkosina@suse.cz> [PATCH] Generic HID layer - input and event reporting

hid_input_report() was needlessly USB-specific in USB HID. This patch
makes the function independent of HID implementation and fixes all
the current users. Bluetooth patches comply with this prototype.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
aa938f7974b82cfd9ee955031987344f332b7c77 08-Dec-2006 Jiri Kosina <jkosina@suse.cz> [PATCH] Generic HID layer - hiddev

- hiddev is USB-only (agreed with Marcel Holtmann that Bluetooth currently
doesn't need it, and future planned interface (rawhid) will be more flexible
and usable)
- both HID and USB-hid can be now compiled as modules (wasn't possible before
hiddev was fully separated from generic HID layer)

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
229695e51efc4ed5e04ab471c82591d0f432909d 08-Dec-2006 Jiri Kosina <jkosina@suse.cz> [PATCH] Generic HID layer - API

- fixed generic API (added neccessary EXPORT_SYMBOL, fixed hid.h to provide correct
prototypes)
- extended hid_device with open/close/event function pointers to driver-specific
functions
- added driver specific driver_data to hid_device

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dde5845a529ff753364a6d1aea61180946270bfa 08-Dec-2006 Jiri Kosina <jkosina@suse.cz> [PATCH] Generic HID layer - code split

The "big main" split of USB HID code into generic HID code and
USB-transport specific HID handling.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>