aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-31HID: hiddev - fix compiler warningJiri Kosina1-1/+1
drivers/hid/usbhid/hiddev.c: In function 'hiddev_compat_ioctl': drivers/hid/usbhid/hiddev.c:746: warning: passing argument 4 of 'hiddev_ioctl' makes integer from pointer without a cast Add cast to hiddev_compat_ioctl() Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-31HID: Add GoTop tablets to blacklistJerrold Jones1-0/+8
GoTop devices are handled by usbtouchscreen driver, make sure HID ignores them. Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-20changed emailJohann Deneux1-2/+0
Changed email address of Johann Deneux (myself) Also removed CVS tags in comments (no longer using cvs) Signed-off-by: Johann Deneux <johann.deneux@gmail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19get rid of input BIT* duplicate definesJiri Slaby2-7/+12
get rid of input BIT* duplicate defines use newly global defined macros for input layer. Also remove includes of input.h from non-input sources only for BIT macro definiton. Define the macro temporarily in local manner, all those local definitons will be removed further in this patchset (to not break bisecting). BIT macro will be globally defined (1<<x) Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <dtor@mail.ru> Acked-by: Jiri Kosina <jkosina@suse.cz> Cc: <lenb@kernel.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Cc: <perex@suse.cz> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: <vernux@us.ibm.com> Cc: <malattia@linux.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-14Merge branch 'hidraw' into for-linusJiri Kosina1-2/+36
2007-10-14HID: add hidraw interfaceJiri Kosina1-2/+13
hidraw is an interface that is going to obsolete hiddev one day. Many userland applications are using libusb instead of using kernel-provided hiddev interface. This is caused by various reasons - the HID parser in kernel doesn't handle all the HID hardware on the planet properly, some devices might require its own specific quirks/drivers, etc. hiddev interface tries to do its best to parse all the received reports properly, and presents only parsed usages into userspace. This is however often not enough, and that's the reason why many userland applications just don't use hiddev at all, and rather use libusb to read raw USB events and process them on their own. Another drawback of hiddev is that it is USB-specific. hidraw interface provides userspace readers with really raw HID reports, no matter what the low-level transport layer is (USB/BT), and gives the userland applications all the freedom to process the HID reports in a way they wish to. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14USB HID: provide hook for hidraw write()Jiri Kosina1-0/+23
Add hook in usbhid for write() callback from hidraw. Sends the report to the device through control pipe. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14HID: hiddev: Add 32bit ioctl compatibiltyPhilip Langdale1-0/+12
The hiddev driver currently lacks 32bit ioctl compatibility, so if you're running with a 64bit kernel and 32bit userspace, it won't work. I'm pretty sure that the only thing missing is a compat_ioctl implementation as all structs have fixed size fields. With this change I can use revoco to configure my MX Revolution mouse. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14HID: Add GeneralTouch touchscreen to the blacklistIlya Frolov1-0/+6
GeneralTouch touchscreens are handled by usbtouchscreen driver, make sure HID ignores them. Signed-off-by: Ilya Frolov <zeylie@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14USBHID: report descriptor fix for MacBook JIS keyboardTomoya Adachi1-0/+17
This patch fixes the problem, that Japanese MacBook doesn't recognize some keys like '\'(yen, or backslash), '|'(pipe), and '_'(underscore). It is due to that MacBook JIS keyboard (jp106) sends wrong report descriptor. It saids "logical maximum = 0x65", so Keyboard.0089 is mapped to Key.Unknown, while it should be accepted as Key.Yen. Signed-off-by: Tomoya Adachi <adachi@il.is.s.u-tokyo.ac.jp> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14HID: use hid-plff driver for GreenAsia 0e8f:0003 devicesAnssi Hannula3-11/+22
Add 0e8f:0003 into the list of devices supported by the hid-plff force feedback driver. These devices identify themselves as "GreenAsia Inc. USB Joystick " and can be either adapters or actual game controllers. The testing was done with a Köng Gaming gamepad. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14USBHID: Add HID_QUIRK_NOGET for ELO Touch Screen 2700 displayMike Crowe1-0/+4
Use HID_QUIRK_NOGET for the ELO TS2700 touch screen USB HID device in order to avoid a timeout during initialisation. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14HID: enable hiddev for the SantaRosa MacBookPro IR receiverStelian Pop1-0/+2
The infrared remote receiver found in the SantaRosa MacBookPro laptops (MacBookPro3,1) need to be forced to expose a HIDDEV interface (instead of HIDINPUT) so that lirc can access it using the 'macmini' driver. The patch below adds the required quirk for forcing the HIDDEV interface to be activated (HID_QUIRK_HIDDEV) and introduces a new quirk which forces the HIDINPUT interface to be ignored (HID_QUIRK_IGNORE_HIDINPUT). Note that Apple calls this receiver 'IRController4' (info taken from Apple's driver Info.plist). Older Mac{Book,Mini,Pro}s seem to all use the 'IRController1' device (USB id 05ac:8240) which doesn't need those quirks. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14USBHID: add CM109 device to blacklistAlfred E. Heggestad1-0/+4
There is a separate driver cm109 for handling this device. Signed-off-by: Alfred E. Heggestad <aeh@db.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14HID: add support for Thrustmaster FGT Force Feedback wheelDmitry Torokhov3-44/+124
Rework thrustmaster force-feedback module to support devices having different types of force feedback effects. Add signatures of Thrustmaster FGT Rumble Force and Thrustmaster FGT Force Feedback wheels to the list of devices dupported by the module. Parts of the patch were lifted off a simalar patch by Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-14HID: minimal autosuspend support for USB HID devicesOliver Neukum1-2/+14
Autosuspend for USB HID devices remains problematic as far as mice and keyboards are concerned. While I am working on a grand solution, here's a minimalist patch that works for those devices not continously in use. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02HID: Never call hid_free_buffers() when usbhid_device has been freedJiri Kosina1-2/+2
We can't call hid_free_buffers() when the underlying usbhid_device has already been freed. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02USB HID: fix memory leak of usbhid_deviceJiri Kosina1-0/+2
Add forgotten freeing of usbhid_device structure. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02USB HID: fix a possible NULL pointer dereference when we fail to allocate memoryJesper Juhl1-1/+2
If, in usb_hid_configure(), we fail to allocate storage for 'usbhid', "if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL)))", then we'll jump to the 'fail:' label where we have this code: usb_free_urb(usbhid->urbin); usb_free_urb(usbhid->urbout); usb_free_urb(usbhid->urbctrl); Since we got here because we couldn't allocate storage for 'usbhid', what we have here is a NULL pointer dereference - ouch... This patch solves that little problem by adding a new 'fail_no_usbhid:' label after the problematic calls to usb_free_urb() and jumps to that one instead, in the problem case. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02USB HID: add ASUS LCM to the blacklistChristian Lamparter1-0/+4
Some of ASUS' notebooks (e.g G Series) include a tiny oled display, which is attached to an internal USB bus. Unfortunatly the device reports a wrong DeviceDescriptor and is therefore identified as a HID device... Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02USB HID: Add all Logitech Harmonies to blacklistPhil Dibowitz1-0/+132
This patch adds the entire range of Logitech's ProductIDs that are reserved for their Harmony remotes. The in-kernel HID driver can't do anything with these, and now there is a GPL user-space application that can handle them: http://www.sf.net/projects/harmonycontrol Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-08-02HID: remove the Applie IR sensor from the hid_blacklistTino Keitel1-2/+0
The IR sensor in some newer Apple computers has no other driver in the kernel, yet. However, the macmini driver in lirc requires a HID device for the IR sensor. Cc: Soeren Sonnenburg <kernel@nn7.de> Signed-off-by: Tino Keitel <tino.keitel@tikei.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-12USB: add reset_resume methodAlan Stern1-3/+6
This patch (as918) introduces a new USB driver method: reset_resume. It is called when a device needs to be reset as part of a resume procedure (whether because of a device quirk or because of the USB-Persist facility), thereby taking over a role formerly assigned to the post_reset method. As a consequence, post_reset no longer needs an argument indicating whether it is being called as part of a reset-resume. This separation of functions makes the code clearer. In addition, the pre_reset and post_reset method return types are changed; they now must return an error code. The return value is unused at present, but at some later time we may unbind drivers and re-probe if they encounter an error during reset handling. The existing pre_reset and post_reset methods in the usbhid, usb-storage, and hub drivers are updated to match the new requirements. For usbhid the post_reset routine is also used for reset_resume (duplicate method pointers); for the other drivers a new reset_resume routine is added. The change to hub.c looks bigger than it really is, because mark_children_for_reset_resume() gets moved down next to the new hub_reset_resume() routine. A minor change to usb-storage makes the usb_stor_report_bus_reset() routine acquire the host lock instead of requiring the caller to hold it already. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12USB: add USB-Persist facilityAlan Stern1-1/+1
This patch (as886) adds the controversial USB-persist facility, allowing USB devices to persist across a power loss during system suspend. The facility is controlled by a new Kconfig option (with appropriate warnings about the potential dangers); when the option is off the behavior will remain the same as it is now. But when the option is on, people will be able to use suspend-to-disk and keep their USB filesystems intact -- something particularly valuable for small machines where the root filesystem is on a USB device! Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-09Merge branches 'debug-module-param' and 'upstream' into for-linusJiri Kosina3-71/+180
2007-07-09HID: Logitech keyboard 0xc311 needs reset leds quirkJiri Kosina1-0/+2
The keyboard 0x046d/0xc311 needs reset leds quirk Tested-by: Antonino Ingargiola <tritemio@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09HID: support for logitech cordless desktop LX500 special mappingRyo Dairiki1-0/+3
This keyboard has wireless mouse which has left, middle, right buttons and 2-dimensional scrolling wheel. Unfornetuly, this wheel reports side scrolling events and 11 or 12 button events at the same time. I've wrote a patch to fix this mapping. I'm not sure if this mapping is proper for buttons, because , for example, there is no entry for "burn cd" in input.h. The patch also supress 11 and 12 button events from mouse when you scroll the wheel left and right. With this patch, only side scrolling events are reported. (This mouse has only 4 buttons and 2D wheel. There is no such buttons like 11 and 12.) Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09HID: fix autocentering of PID devicesDiogo Kastrup1-0/+1
When setting the autocentering of PID devices, PID_DIRECTION_ENABLE is not being explicitely set to 1. This results in autocentering working only on the vertical axis when this field is preset to 0. Fix that by setting it explicitely to 1 when preparing the set_effect report for autocentering spring effect. Signed-off-by: Diogo Kastrup <dk@bighost.com.br> Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09HID: separate quirks for report descriptor fixupJiri Kosina2-91/+153
Lately there have been quite a lot of bug reports against broken devices which require us to fix their report descriptor in the runtime, before it is passed to the HID parser. Those devices have eaten quite an amount of our quirks space, which isn't particularly necessary - the quirks are not needed after the report descriptor is parsed, and they just consume bits. Therefore this patch separates the quirks for report descriptor fixup, and moves their handling into separate code. The quirks are then forgotten as soon as the report descriptor has been parsed. Module parameter 'rdesc_quirks' is introduced to be able to modify these quirks in runtime in a similar way to 'quirks' parameter for ordinary HID quirks. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09HID: Add NOGET quirk for all NCR devicesJiri Kosina1-0/+10
Devices manufactured by NCR have userspace hiddev-based drivers, which do all the necessary device querying by themselves. The devices must not be queried directly by the generic HID driver, as reported by NCR engineers. Cc: Petr Ostadal <postadal@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09HID: support for Petalynx Maxter remote controlJiri Kosina2-0/+23
Petalynx Maxter remote control [1] 0x18b1/0x0037 emits 0xfa and 0xfc from consumer page (reserved in HUT 1.12) for back and more keys. It also emits a few usages from LOGIVENDOR page, which need adding. Also, this device has broken report descriptor - the reported maximum is too low - it doesn't contain the range for 'back' and 'more' keys, so we need to bump it up before the report descriptor is being parsed. Besides all this, it also requires NOGET quirk. This patch does so. [1] http://www.elmak.pl/index.php?option=com_phpshop&page=shop.browse&category_id=14&ext=opis&lang=en Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09HID: support for Gameron dual psx adaptorJulien Eyries1-0/+4
This patch provides support for the Gameron dual psx adaptor. The modification is to add the quirk HID_QUIRK_MULTI_INPUT for this specific USB device. Signed-off-by: Julien Eyries <jeyries@yahoo.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09USB HID: avoid flush_scheduled_work()Alan Stern1-1/+1
This patch (as914) replaces a call to flush_scheduled_work() with cancel_work_sync(), in order to help avoid potential deadlocks. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09HID: force hid-input for Microsoft SideWinder GameVoice deviceJiri Kosina1-0/+4
Microsoft SideWinder GameVoice driver is a trivial device with a few buttons (0x09 HID usage) and an audio connector, which just forwards the audio input into oridinary sound card present in the computer. Despite this fact, the only interface of this device reports itself as a Telephony/Headset type of HID device. This is apparently incorrect - the device itself doesn't provide any audio/telephony functionality. This is achieved in userland application which only needs to receive the button events from the HID driver. This patch establishes a new quirk which forces hid-input to claim a device it will otherwise leave untouched. Reported-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09HID: make debugging output runtime-configurableJiri Kosina7-40/+34
There have been many reports recently about broken HID devices, the diagnosis of which required users to recompile their kernels in order to be able to provide debugging output needed for coding a quirk for a particular device. This patch makes CONFIG_HID_DEBUG default y if !EMBEDDED and makes it possible to control debugging output produced by HID code by supplying 'debug=1' module parameter. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-10USB HID: hiddev - fix race between hiddev_send_event() and hiddev_release()Jiri Kosina1-0/+14
There is a small race window in which hiddev_release() could corrupt the list that is being processed for new event in hiddev_send_event(). Synchronize the operations over this list. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09HID: switch to using input_dev->dev.parentDmitry Torokhov7-15/+16
In preparation for struct class_device -> struct device input core conversion switch to using input_dev->dev.parent when specifying device position in sysfs tree. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09USB HID: Logitech wheel 0x046d/0xc294 needs HID_QUIRK_NOGET quirkJan Kratochvil1-0/+2
Logitech wheel (product id 0xc294) doesn't like to be polled for reports, otherwise it slows down initialization of this device to ten seconds. This patch adds HID_QUIRK_NOGET flag for this wheel. Signed-off-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09USB HID: usb_buffer_free() cleanupDmitry Torokhov2-14/+7
usb_buffer_free() now handles NULLs so remove unneeded checks form callers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09USB HID: report descriptor of Cypress USB barcode readers needs fixupJiri Kosina2-0/+32
Certain versions of Cypress USB barcode readers (this problem is known to happen at least with PIDs 0xde61 and 0xde64) have report descriptor which has swapped usage min and usage max tag. This results in HID parser failing for report descriptor of these devices, as it (wrongly) requires allocating more usages than HID_MAX_USAGES. Solve this by walking through the report descriptor for such devices, and swap the usage min and usage max items (and their values) to be in proper order. Reported-by: Bret Towe <magnade@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-05-09USB HID: update CONFIG_USB_HIDINPUT_POWERBOOK descriptionNoel Kothe1-2/+2
This option is needed on the Apple Intel Laptops too. Signed-off-by: Noel Kothe <noel@debian.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-29USB HID: don't warn on idVendor == 0Jiri Kosina1-2/+0
It turns out that there are broken devices out there that incorrectly report VID/PID as 0x000, see http://lkml.org/lkml/2007/4/27/496 Therefore we should not confuse users by dumping warnings and stacktraces in such situation. It is not possible to add quirks for such horribly broken devices, but currently that's not needed. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-19USB HID: add 'quirks' module parameterPaul Walmsley2-0/+51
Add a 'quirks' module parameter for the usbhid module, so users can add or modify quirks at module load time. Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-19USB HID: add support for dynamically-created quirksPaul Walmsley1-14/+149
Add internal support for dynamically-allocated HID quirks, "dquirks" (for "dynamic quirks"). Includes several functions to add/modify quirks from the list. This code is used by the next patch to implement quirk modification upon module load. Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-19USB HID: clarify static quirk handling as squirksPaul Walmsley1-6/+33
Rename existing quirks handling code that operates over a static array to "squirks" (short for static quirks) to differentiate it from the dynamically-allocated quirks that will be introduced in the next patch. Add an accessor function specifically for static quirks, usbhid_exists_squirk(). Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-19USB HID: encapsulate quirk handling into hid-quirks.cPaul Walmsley3-446/+487
Move the USB_VENDOR* and USB_DEVICE* defines and the hid_blacklist[] array there from hid-core.c. Add hid-quirks.c:usbhid_lookup_any_quirks() to return quirk information to hid-core.c. Convert __u32, __u16 types to u32, u16. Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-18USB HID: EMS USBII device needs HID_QUIRK_MULTI_INPUTPaul Zaremba1-0/+4
Add HID_QUIRK_MULTI_INPUT to the EMS USBII (0x0b43/0003) so the kernel detects both joystick ports properly. Without it you end up with a single joystick node (js0) that combines the two physical port signals. Signed-off-by: Paul Zaremba <pez-gpg@treeofice.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-16HID: update copyright and authorship macroJiri Kosina1-1/+1
Updates Copyright and DRIVER_AUTHOR in HID and USB HID sources. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11USB HID: add support for WiseGroup MP-8800 Quad JoypadSam Liddicott1-1/+4
This adds support for WiseGroup Quad Joypad (0x0925/0x8800). The same quirks as for Dual Joypad (0x0925/0x8866) are needed. Signed-off-by: Sam Liddicott <sam@liddicott.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11USB HID: add FF support for Logitech Force 3D Pro JoystickJiri Kosina2-0/+2
This patch adds support for Logitech Force 3D Pro Joystick (0x046d/0xc286) to hid-lgff driver. Device ID reported by Richard Bolkey <rbolkey@cs.utexas.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>