summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-core.c
AgeCommit message (Collapse)Author
2010-03-13HID: Add RGT Clutch Wheel clutch device idMarkus Rathgeb
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>
2010-02-25Merge branches 'upstream', 'raw_report_modifications' and ↵Jiri Kosina
'apple_magic_mouse' into for-linus Conflicts: drivers/hid/Kconfig
2010-02-10HID: add a device driver for the Apple Magic Mouse.Michael Poole
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>
2010-02-10HID: Export hid_register_reportMichael Poole
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>
2010-02-10HID: Support for MosArt multitouch panelStephane Chatty
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>
2010-02-03HID: Enable Sixaxis controller over BluetoothBastien Nocera
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>
2010-02-03HID: add support for Pixart Imaging Optical Touch ScreenAlex Neblett
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>
2010-02-02Merge branch 'master' into upstreamJiri Kosina
Conflicts: drivers/hid/hid-ids.h
2010-02-02HID: update copyrightJiri Kosina
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-01-26HID: add support for Ortek WKB-2000Johnathon Harris
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>
2010-01-13HID: remove TENX iBuddy from blacklistJiri Kosina
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>
2010-01-13HID: add device IDs for new model of Apple Wireless KeyboardChristian Schuerer-Waldheim
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>
2010-01-12HID: add support for Acer T230H multitouchStephane Chatty
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>
2010-01-12HID: add driver for the Logitech Flight System G940Gary Stein
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>
2010-01-05HID: fix parsing of local delimiter with size 0Jiri Kosina
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>
2010-01-04HID: add support for Stantum multitouch panelStephane Chatty
Added support for the Stantum multitouch panel. Signed-off-by: Stephane Chatty <chatty@enac.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-23HID: Support for 3M multitouch panelStephane Chatty
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>
2009-12-10HID: blacklist ET&T TC5UH touchscreen controllerPetr Štetiar
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>
2009-12-07Merge branches 'bkl-removal', 'upstream' and 'upstream-fixes' into for-linusJiri Kosina
2009-12-02HID: add support for Acan FG-8100 barcode readerJiri Kosina
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>
2009-11-13HID: support Logitech/3DConnexion SpaceTraveler and SpaceNavigatorJiri Kosina
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>
2009-10-13HID: remove useless DRIVER_VERSION macroJiri Kosina
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>
2009-10-13HID: fix MODULE_AUTHOR usage in HID modulesJiri Kosina
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>
2009-10-13HID: blacklist Acer Ferrari 4005 optical mouseLamarque Vieira Souza
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>
2009-10-01HID: fix kerneldoc comment for hid_input_report()Jiri Kosina
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>
2009-09-17HID: consolidate connect and disconnect into core codeJiri Kosina
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>
2009-09-15HID: fix non-atomic allocation in hid_input_reportJiri Kosina
'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>
2009-09-13Merge branches 'upstream', 'upstream-fixes' and 'debugfs' into for-linusJiri Kosina
2009-08-26HID: completely remove apple mightymouse from blacklistJan Scholz
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>
2009-08-08HID: ignore Philips IEEE802.15.4 RF DongleHenning Glawe
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>
2009-08-08HID: ignore all recent SoundGraph iMON devicesJarod Wilson
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>
2009-07-22HID: driver for Twinhan USB 6253:0100 remote controlBruno Premont
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>
2009-07-22HID: add rumble support for Thrustmaster Dual Trigger 3-in-1Ruben Aos Garralda
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>
2009-07-22HID: add force feedback support for Logitech WingMan Formula Force GPJiri Kosina
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>
2009-07-19HID: Move dereferences below a NULL testJulia Lawall
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>
2009-06-26HID: fix memory leak on error path in debug codeJiri Kosina
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>
2009-06-12HID: use debugfs for events/reports dumpingJiri Kosina
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>
2009-06-12HID: use debugfs for report dumping descriptorJiri Kosina
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>
2009-05-15HID: force feedback support for SmartJoy PLUS PS2/USB adapterJussi Kivilinna
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>
2009-05-13HID: Wacom Graphire Bluetooth driverBastien Nocera
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>
2009-05-01HID: fix oops in hid_check_keys_pressed()Jiri Kosina
If the device is not claimed by hid-input (i.e devices driver by userspace hiddev/hidraw-based drivers, or completely detached from HID and driver by libusb), we must not check the hid->inptus, as it is not guaranteed to be initialized, as this is performed only for devices handled by hid-input. Reported-by: Guillaume Chazarain <guichaz@gmail.com> Tested-by: Guillaume Chazarain <guichaz@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-17HID: Add support for the G25 force feedback wheel in native modeChristophe Borivant
Add Product Id 0xc299 for the Logitech G25 force feedback wheel The Logitech G25 force feedback wheel, is first recognize by the kernel with the product id "0xc294". In this mode, we can't use all the axes and buttons of the wheel. Using a userland utility, it is possible to make the wheel switch to native mode -- http://svn.vdrift.net/viewvc.cgi/trunk/tools/G25manage/?root=VDrift In native mode, the wheel change its id number to "0xc299". The packet that needs to be sent to the wheel to swtich to native mode and change its PID is { 0xf8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 } Signed-off-by: Christophe Borivant <christophe.borivant@wanadoo.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30Merge branch 'autosuspend' into for-nextJiri Kosina
Conflicts: drivers/hid/hid-core.c
2009-03-30HID: remove compat stuffJiri Slaby
This removal was scheduled and there is no problem with later distros to adapt for the new bus, thanks to aliases. module-init-tools map files are deprecated nowadays, so that the patch which introduced hid ones into the m-i-t won't be accepted and hence there is no reason for leaving compat stuff in. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30HID: add support for Kye/Genius Ergo 525VJiri Kosina
This device sends several buttons in a separate field, which is wrongly described in the report descriptor. Fix it in the following way: - change led usage page to button - report size 8 count 1 becomes report size 1 count 8 - the button usage range changed to 4-7 (the mouse has three buttons in a different field already). Reported-by: Tomas Hanak <tomas.hanak@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30HID: Support Apple mini aluminum keyboardRyan Finnie
New USB device ids and quirks for the "mini" Apple USB aluminum keyboards released Tuesday, model A1242. Note that while I own the ANSI (0x021d) version and cannot verify that the ISO (0x021e) and JIS (0x021f) versions exist, previous releases have followed the triple id convention for awhile now, and the device ids fit perfectly between USB_DEVICE_ID_APPLE_GEYSER4_* and USB_DEVICE_ID_APPLE_ALU_*. Signed-off-by: Ryan Finnie <ryan@finnie.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30HID: support for Kensington slimblade deviceJiri Kosina
0x47d/0x2041 device sends two extra buttons in 0xff00 usage page and therefore requires special handling. Reported-by: Jason Noble <nobleja@polezero.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30HID: DragonRise game controller force feedback driverRichard Walmsley
Adds force feedback support for USB DragonRise Inc. game controllers. These devices are mass produced in China and distributed under several vendors. Signed-off-by: Richard Walmsley <richwalm@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-25HID: autosuspend support for USB HIDOliver Neukum
This uses the USB busy mechanism for aggessive autosuspend of USB HID devices. It autosuspends all opened devices supporting remote wakeup after a timeout unless - output is being done to the device - a key is being held down (remote wakeup isn't triggered upon key release) - LED(s) are lit - hiddev is opened As in the current driver closed devices will be autosuspended even if they don't support remote wakeup. The patch is quite large because output to devices is done in hard interrupt context meaning a lot a queuing and locking had to be touched. The LED stuff has been solved by means of a simple counter. Additions to the generic HID code could be avoided. In addition it now covers hidraw. It contains an embryonic version of an API to let the generic HID code tell the lower levels which capabilities with respect to power management are needed. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-02-17HID: move tmff and zpff devices from ignore_list to blacklistAnssi Hannula
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>