summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick
Commit message (Collapse)AuthorAgeFilesLines
* Input: xpad - fix dependancy on LEDS classDmitry Torokhov2007-09-281-1/+1
| | | | | | | | | Input: xpad - fix dependancy on LEDS class The driver can not be built-in when LEDS class is a module. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Input: iforce - fix 'unused variable' warningAndrew Morton2007-08-301-4/+4
| | | | | | | | drivers/input/joystick/iforce/iforce-packets.c: In function `iforce_get_id_packet': drivers/input/joystick/iforce/iforce-packets.c:249: warning: unused variable `status' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: xpad - add support for leds on xbox 360 padJan Kratochvil2007-07-182-42/+155
| | | | | | | | | | | | | | | | | | Export LEDs on Xbox360 pad via led subsystem as a single device in /sys/class/leds/xpad[0-9]+. Xbox360 pad has four leds, which form a circle. Unfortunately the leds can't be controlled independently and can only display a predefined set of patterns (for example one is turned on wile others are off or a rotating pattern - 1-2-3-4). To activate a pattern one needs to send a specific command to the device (see http://www.free60.org/wiki/Gamepad). Led subsystem allows us to set brightness, but there is nothing like brightness on this device. So brightness is actually interpreted as the command (only values between 0 and 14 are accepted). Signed-off-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: xpad - fix report for dpad and inverted Y and RY axes on xbox 360Dmitry Torokhov2007-07-101-20/+20
| | | | | | | | | Make the driver report Y/RY up as positive value and down as negative. Also make DPAD mapping the same as classic xpad. Reported-by: Brian Magnuson <bdmagnuson@gmail.com> Tested-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: xpad - make xpad_play_effect() staticAdrian Bunk2007-07-101-1/+2
| | | | | | | xpad_play_effect() does not need to be global. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: xpad - fix check for succesful usb_buffer_allocJan Kratochvil2007-07-101-1/+1
| | | | | Signed-off-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: grip-mp - use ARRAY_SIZEAndi Drebes2007-07-101-2/+2
| | | | | Signed-off-by: Andi Drebes <lists-receive@programmierforen.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: xpad - add Xbox360 gamepad rumble supportJan Kratochvil2007-07-102-4/+128
| | | | | | | Implementation is using force feedback support for memoryless devices. Signed-off-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: xpad - add support for Xbox 360 gamepadJan Kratochvil2007-07-101-34/+117
| | | | | | | | | | | | | | | | Xbox 360 gamepad is slightly different then the previous model so it has its own version of process_packet method. Detection of this new device relies on USB_DEVICE_INTERFACE_PROTOCOL macro. This device got vendor specific subclass so it can't be matched with USB_INTERFACE_INFO and we need only one interface protocol from four availaible. It means USB_DEVICE can't be used either. Added xpad360_btn structure with additional buttons for x360 gamepad. Added xtype into xpad_device structure to distinguish between different types of xbox devices. Signed-off-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge branch 'for-linus' of ↵Linus Torvalds2007-06-041-1/+1
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: reduce raciness when input handlers disconnect Input: ucb1x00 - do not access input_dev->private directly Input: logips2pp - fix typo in Kconfig Input: db9 - do not ignore dev2 module parameter
| * Input: db9 - do not ignore dev2 module parameterDmitry Torokhov2007-05-281-1/+1
| | | | | | | | | | | | | | Because of incorrect parameter setup anything passed in dev2=... was always ignored by the driver. See bugzilla #8541. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Merge branch 'for-linus' of ↵Linus Torvalds2007-05-233-7/+12
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ads7846 - SPI_CPHA mode bugfix Input: ads7846 - document that it handles tsc2046 too Input: input-polldev - add module info Input: ucb1x00-ts - remove commented out code Input: ucb1400_ts - use sched_setscheduler() Input: ALPS - force stream mode Input: iforce - minor clean-ups Input: iforce - fix force feedback not working Input: adbhid - do not access input_dev->private directly Input: logips2pp - add type 72 (PS/2 TrackMan Marble)
| * Input: iforce - minor clean-upsJohann Deneux2007-05-222-5/+9
| | | | | | | | | | Signed-off-by: Johann Deneux <johann.deneux@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * Input: iforce - fix force feedback not workingJohann Deneux2007-05-221-2/+3
| | | | | | | | | | | | | | | | Use an interrupt URB to send force-feedback data to the device instead of a bulk URB. This was broken since 2.6.18. Signed-off-by: Johann Deneux <johann.deneux@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | missing dependencies for USB drivers in inputAl Viro2007-05-151-0/+1
| | | | | | | | | | | | | | | | stuff that does select USB should depend on USB_ARCH_HAS_HCD, or we'll end up with unbuildable configs. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds2007-05-088-29/+480
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: Input: move USB miscellaneous devices under drivers/input/misc Input: move USB mice under drivers/input/mouse Input: move USB gamepads under drivers/input/joystick Input: move USB touchscreens under drivers/input/touchscreen Input: move USB tablets under drivers/input/tablet Input: i8042 - fix AUX port detection with some chips Input: aaed2000_kbd - convert to use polldev library Input: drivers/usb/input - usb_buffer_free() cleanup Input: synaptics - don't complain about failed resets Input: pull input.h into uinpit.h Input: drivers/usb/input - fix sparse warnings (signedness) Input: evdev - fix some sparse warnings (signedness, shadowing) Input: drivers/joystick - fix various sparse warnings Input: force feedback - make sure effect is present before playing
| * Input: move USB gamepads under drivers/input/joystickDmitry Torokhov2007-05-083-2/+451
| | | | | | | | | | | | | | | | This will allow concentrating all input devices in one place in {menu|x|q}config. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Input: drivers/joystick - fix various sparse warningsDmitry Torokhov2007-05-035-27/+30
|/ | | | | | | | | | Fix various issues pointed by sparse: - module_param_array_named() takes unsigned int as number of parameters argument - shadowing of global variables is not healthy. I think there was once a bug in db9 caused by it. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: joysticks - switch to using input_dev->dev.parentDmitry Torokhov2007-04-1218-18/+19
| | | | | | | | 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>
* Input: drivers/input/joystick - don't access dev->private directlyDmitry Torokhov2007-04-1220-49/+59
| | | | | | Use input_get_drvdata() and input_set_drvdata() instead. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - use usb_kill_urb instead of usb_unlink_urbJohann Deneux2007-04-126-38/+33
| | | | | | | | | Using usb_unlink_urb can cause iforce_open to fail when called soon after iforce_release. Also updated my email address and replaced calls to printk() by dbg(), warn(), info(), err()... Signed-off-by: Johann Deneux <johann.deneux@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: remove obsolete setup parameters from input driversDmitry Torokhov2007-02-185-18/+0
| | | | | | | They have been marked as __obsolete_setup() for several years, it is time for them to go. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Dmitry Torokhov2006-12-081-3/+3
|\ | | | | | | | | | | Conflicts: drivers/usb/input/hid.h
| * usb: iforce-usb free urb cleanupMariusz Kozlowski2006-12-011-3/+3
| | | | | | | | | | | | | | | | - usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Input: handle serio_register_driver() errorsAkinobu Mita2006-11-237-15/+17
| | | | | | | | | | Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: joysticks - handle errors when registering input devicesDmitry Torokhov2006-11-0516-59/+120
|/ | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-0511-46/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* more misc typo fixesMatt LaPlante2006-10-031-1/+1
| | | | Signed-off-by: Adrian Bunk <bunk@stusta.de>
* Input: iforce - switch to the new FF interfaceAnssi Hannula2006-07-194-238/+147
| | | | | Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: spaceball - make 4000FLX Lefty workNick Martin2006-07-191-1/+1
| | | | | | | | | | Although the Spaceball 4000FLX Lefty is already supported by the spaceball driver, it does not register properly due to SPACEBALL_MAX_ID being set too low. Increment SPACEBALL_MAX_ID such that the 4000FLX Lefty is properly recognized. Signed-off-by: Nick Martin <nim+linux@nimlabs.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - add Trust Force Feedback Race Master supportPrzemek Iskra2006-07-151-0/+1
| | | | | Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - check array bounds before accessing elementsDmitry Torokhov2006-07-061-9/+9
| | | | | | Fixes Coverity #id 864 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-302-2/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* Input: db9 - fix potential buffer overrunEric Sesterhenn2006-06-271-1/+1
| | | | | | | Fixes Coverity #id 483 Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - remove some pointless castsJesper Juhl2006-06-261-3/+3
| | | | | | | | | The 'private' member of struct input_dev is a void*, so no need to cast it when assigning it to a struct iforce* variable. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix potential overflows in driver/input/joystickDmitry Torokhov2006-06-2616-30/+40
| | | | | | | Change all sprintfs into snprintfs to make sure we won't stomp on data adjacent to our buffers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - use ENOSPC instead of ENOMEMAnssi Hannula2006-06-051-4/+4
| | | | | | | | | | Use -ENOSPC instead of -ENOMEM when the iforce device doesn't have enough free memory for the new effect. All other drivers are using -ENOSPC, so this makes the behaviour coherent. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sidewinder - fix memory leakJesper Juhl2006-05-291-5/+6
| | | | | | | | | | In sw_connect we leak 'buf' and 'idbuf' when we do not leave via one of the fail* labels. This was spotted by the coverity checker. Patch is compile tested only due to lack of hardware. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: gamecon - add SNES mouse supportRaphael Assenat2006-04-021-13/+70
| | | | | | | | | | | | SNES gamepads and mice share the same type of interface so they both can be connected to the parallel port using a simple interface. Adding mouse support to a gamepad driver may sound funny at first, but doing so in this case makes it possible to connect and SNES gamepads and mice at the same time, on the same port. Signed-off-by: Raphael Assenat <raph@raphnet.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: joysticks - semaphore to mutex conversionIngo Molnar2006-02-197-38/+43
| | | | | | | | | | | The conversion was generated via scripts, and the result was validated automatically via a script as well. Amijoy conversion was done by Arjan van de Ven. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - fix detection of USB devicesDmitry Torokhov2006-01-312-3/+2
| | | | | | | | Recent conversion to wait_event_interruptible_timeout() caused USB detection routine erroneously report timeouts for perfectly working devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: a3d - convert to dynamic input_dev allocationDmitry Torokhov2006-01-291-42/+46
| | | | | | | Also set .owner in driver structure so we'll have a link between module and driver in sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: tmdc - handle errors from input_register_device()Dmitry Torokhov2006-01-291-4/+11
| | | | | | | Also set .owner in driver structure so we'll have a link between module and driver in sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: turbografx - handle errors from input_register_device()Dmitry Torokhov2006-01-291-7/+13
| | | | | | | Also tgfx_remove shouldn't be marked __exit as it is also called from __init code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: gamecon - handle errors from input_register_device()Dmitry Torokhov2006-01-291-6/+12
| | | | | | | Also gc_remove shouldn't be marked __exit as it is also called from __init code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: gamecon - fix crash when accessing deviceDmitry Torokhov2006-01-291-149/+194
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sidewinder - handle errors from input_register_device()Dmitry Torokhov2006-01-291-2/+6
| | | | | | | Also set .owner in driver structure so we'll have a link between module and driver in sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sidewinder - fix an oopsZinx Verituse2006-01-291-1/+1
| | | | | | | Dynalloc conversion strikes again... Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: db9 - handle errors from input_register_device()Dmitry Torokhov2006-01-291-5/+10
| | | | | | | Also db9_remove shouldn't be marked __exit as it is also called from __init code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: db9 - fix possible crash with Saturn gamepadsDmitry Torokhov2006-01-291-34/+36
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
OpenPOWER on IntegriCloud