aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/joystick/xpad.c
AgeCommit message (Collapse)Author
2013-06-18Input: xpad - fix for "Mad Catz Street Fighter IV FightPad" controllersShawn Joseph
Added MAP_TRIGGERS_TO_BUTTONS for Mad Catz Street Fighter IV FightPad device. This controller model was already supported by the xpad driver, but none of the buttons work correctly without this change. Tested on kernel version 3.9.5. Signed-off-by: Shawn Joseph <jms.576@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-03Input: xpad - add a few new VID/PID combinationsGuillermo A. Amaral
This adds VID/PID combinations for MadCatz, PDP and PowerA (new). Removed Pelican 'TSZ' Wired Xbox 360 Controller since it's clashing with Edge wireless Controller and I failed to confirm the PID. Signed-off-by: "Guillermo A. Amaral B." <g@maral.me> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-03Input: xpad - minor formatting fixesGuillermo A. Amaral
Fixed a few minor coding style issues in xpad driver. Signed-off-by: "Guillermo A. Amaral B." <g@maral.me> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-24Merge branch 'next' into for-linusDmitry Torokhov
2012-07-12Input: xpad - add Andamiro Pump It Up padYuri Khan
I couldn't find the vendor ID in any of the online databases, but this mat has a Pump It Up logo on the top side of the controller compartment, and a disclaimer stating that Andamiro will not be liable on the bottom. Signed-off-by: Yuri Khan <yurivkhan@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-11Input: xpad - add signature for Razer Onza Tournament EditionIlia Katsnelson
Signed-off-by: Ilia Katsnelson <k0009000@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-11Input: xpad - handle all variations of Mad Catz Beat PadYuri Khan
The device should be handled by xpad driver instead of generic HID driver. Signed-off-by: Yuri Khan <yurivkhan@gmail.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-05-04USB: input: xpad.c: fix up dev_* messagesGreg Kroah-Hartman
Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: "Magnus Hörlin" <magnus@alefors.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01USB: xpad.c: remove dbg() usageGreg Kroah-Hartman
dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: "Magnus Hörlin" <magnus@alefors.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01USB: input: xpad.c: fix up dev_err() usageGreg Kroah-Hartman
We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: "Magnus Hörlin" <magnus@alefors.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25USB: xpad.c: remove err() usageGreg Kroah-Hartman
err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: "Magnus Hörlin" <magnus@alefors.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Mauro Carvalho Chehab <mchehab@redhat.com> CC: Chris Moeller <kode54@gmail.c> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-01-13module_param: make bool parameters really bool (drivers & misc)Rusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-11-18USB: convert drivers/input/* to use module_usb_driver()Greg Kroah-Hartman
This converts the drivers in drivers/input/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Henk Vergonet <Henk.Vergonet@gmail.com> Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Henrik Rydberg <rydberg@euromail.se> Cc: "Magnus Hörlin" <magnus@alefors.se> Cc: Chris Moeller <kode54@gmail.c> Cc: Christoph Fritz <chf.fritz@googlemail.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Edwin van Vliet <edwin@cheatah.nl> Cc: Ping Cheng <pingc@wacom.com> Cc: Eduard Hasenleithner <eduard@hasenleithner.at> Cc: Alexander Strakh <strakh@ispras.ru> Cc: Glenn Sommer <gsommer@datanordisk.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-04Input: xpad - enable rumble support for XBox360 Wireless ControllersChris Moeller
This patch implements rumble support for XBox360 Wireless Controllers. Signed-off-by: Chris Moeller <kode54@gmail.c> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-21Input: xpad - add support for two more dance pads and a guitarMagnus Hörlin
Signed-off-by: Magnus Hörlin <magnus@alefors.se> Reviewed-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-18Input: xpad - ensure xpad->bulk_out is initialized before submitting urbAxel Lin
As pointed out by Oliver Neukum: xpad->irq_in is currently submitted before xpad->bulk_out is allocated. That however is a race, because the callback for irq_in can call xpad360w_process_packet(), which will in turn submit the bulk URB. This patch moves initialization for xpad->bulk_out earlier, so we can ensure xpad->bulk_out is initialized before submitting urb. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: xpad - remove useless check in xpad_removeDmitry Torokhov
ixpad can never be NULL here; if it is NULL we would not have been bound to the interface and then why would we be called? Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: xpad - fix resource reclaim in xpad_probe error pathAxel Lin
Properly free the resources in error path by the reverse order of resource allocation. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: xpad - fix a memory leakAxel Lin
In xpad_led_disconnect(), what we really want is to kfree(xpad_led). In xpad_disconnect(), add a missing kfree(xpad->bdata) to fix the memory leak. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: xpad - return proper error in error pathAxel Lin
In current implementation, xpad_probe return 0 when usb_alloc_urb failed for xpad->bulk_out and kzalloc failed for xpad->bdata. This patch removes the initialization for error variable, assign the error code at the place the error happens instead. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-08-10Merge branch 'next' into for-linusDmitry Torokhov
2010-08-10Input: xpad - add USB-ID for PL-3601 Xbox 360 padChristoph Fritz
This patch adds USB Vendor and Product ID for Pelican PL-3601 'TSZ' Wired Xbox 360 Controller to the device table. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-08-02Merge branch 'next' into for-linusDmitry Torokhov
2010-07-26Input: xpad - add product ID for Hori Fighting Stick EX2Chris Merrett
Signed-off-by: Chris Merrett <chrisfu@hardc0re.org.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-13Input: xpad - remove mouse buttons and axes for dance padsChristoph Fritz
Dance pads don't have any axes/sticks, only buttons for directions. For example buttons like left+right will get triggered at once, an axis can't handle this anyway. So this patch adds a module parameter named "sticks_to_null" for unknown devices. A known dance pad makes use of it by changing to a new mapping-option named DANCEPAD_MAP_CONFIG. Other tested devices may follow by adding this mapping-option too. Some buttons of xpad-devices are addressing mouse-buttons instead of gamepad-buttons. This gets fixed too. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-20USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-24Input: xpad - add rumble support for original xbox controllerBenjamin Valentin
Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-21Merge commit 'v2.6.33-rc5' into nextDmitry Torokhov
2010-01-09Input: xbox - do not use GFP_KERNEL under spinlockDmitry Torokhov
xbox_play_effect() is called while holding dev->event_lock with interrupts disabled and thus may not use GFP_KERNEL when submitting urbs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-12-29Input: xpad - allow using triggers as buttons rather than axesNicolas Léveillé
Certain devices implement triggers as buttons rather than axes. In particular, arcade sticks such as the HORI Real Arcade Pro.EX do not have analog buttons. These devices are now setup to present buttons rather than axes for triggers. User-space applications often also have problems with axes-as-buttons. Activating MAP_TRIGGERS_TO_BUTTONS for a device removes the artificial difference between buttons and triggers. Signed-off-by: Nicolas Léveillé <nicolas@uucidl.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-29Input: xpad - add two new Xbox 360 devicesNicolas Léveillé
Added two new Xbox 360 devices: - HORI Real Arcade Pro.EX - Mad Catz SFIV Fightpad Signed-off-by: Nicolas Léveillé <nicolas@uucidl.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-10-05Input: xpad - add BigBen Interactive XBOX 360 ControllerThomas Gruber
Add BigBen Interactive XBOX 360 Controller (146b:0601) to xpad driver. Signed-off-by: Thomas Gruber <kerneldev@tuxpower.org> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-20Input: xpad - add USB ID for the drumkit controller from Rock BandCorbin Simpson
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-12Input: xpad - don't resend successfully sent outgoing requestsMichael Gruber
This avoids an infinite loop. Signed-off-by: Michael Gruber <lists.mg@googlemail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-10-17USB: remove info() macro from usb input driversGreg Kroah-Hartman
USB should not be having it's own printk macros, so remove info() and use the system-wide standard of dev_info() wherever possible. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16misc: replace __FUNCTION__ with __func__Harvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-31Input: xpad - add Pelican Eclipse D-Pad to the list of devicesHarley Laue
Signed-off-by: Harley Laue <losinggeneration@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16Input: replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-27Merge branch 'for-linus' of ↵Linus Torvalds
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: xpad - fix build failure
2008-04-27Input: xpad - fix build failureDmitry Torokhov
If both CONFIG_JOYSTICK_XPAD_FF and CONFIG_JOYSTICK_XPAD_LEDS are unset xpad_bulk_out is not defined and build fails. Move it out of the #ifdef block so it is always defined. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (120 commits) usb: don't update devnum for wusb devices wusb: make ep0_reinit available for modules wusb: devices dont use a set address wusb: teach choose_address() about wireless devices wusb: add link wusb-usb device wusb: add authenticathed bit to usb_dev USB: remove unnecessary type casting of urb->context usb serial: more fixes and groundwork for tty changes USB: replace remaining __FUNCTION__ occurrences USB: usbfs: export the URB_NO_INTERRUPT flag to userspace USB: fix compile problems in ehci-hcd USB: ehci: qh_completions cleanup and bugfix USB: cdc-acm: signedness fix USB: add documentation about callbacks USB: don't explicitly reenable root-hub status interrupts USB: OHCI: turn off RD when remote wakeup is disabled USB: HCDs use the do_remote_wakeup flag USB: g_file_storage: ignore bulk-out data after invalid CBW USB: serial: remove endpoints setting checks from core and header USB: serial: remove unneeded number endpoints settings ...
2008-04-24USB: convert away from urb->status in xpad driverOliver Neukum
USB is moving to transfering status as a parameter. To ease the transition urb->status is to be touched only once in a function. The xpad driver has been overlooked. Dmitry wants this to go through the USB tree. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-15Input: xpad - set proper buffer length for outgoing requestsMichael Gruber
The messages for led/rumble are exactly 3 and 8 bytes respectively. Hence set up the transfer_buffer_length accordingly. Signed-off-by: Michael Gruber <lists.mg@googlemail.com> Acked-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03Input: xpad - don't use GFP_ATOMICOliver Neukum
GFP_ATOMIC should not be used when GFP_KERNEL can be used. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03Input: xpad - add support for wireless xbox360 controllersBrian Magnuson
Signed-off-by: Brian Magnuson <bdmagnuson@gmail.com> Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03Input: xpad - drop obsolete driver versioningAnssi Hannula
The driver version numbers and changelog have not been updated in a long while to reflect actual changes. Remove the version number and add a notice that later changes can be tracked in SCM. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03Input: xpad - enable force feedback on xbox 360 controllers onlyAnssi Hannula
Commit 4994cd8dadcf9d484ab3ec19f3c7c7a4e5353c1c introduced a regression which causes xpad to report force feedback cababilities for non-360 controllers too, even while there is no actual support for those. Fix that by adding a check for XTYPE_XBOX360 to xpad_init_ff(). Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03Input: xpad - do not report nonexistent buttons for xbox360Anssi Hannula
The buttons BTN_C and BTN_Z are only used in the original xbox controller, not in xbox360 controller. Therefore only add them to keybit when the controller is a non-360 one. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03Input: xpad - add more xbox 360 controller idsAnssi Hannula
Add Mad Catz and 0x0e6f xbox360 controllers which are already found in xpad_device[] table in xpad.c into the vendor id list. Also add Logitech into the vendor list for Logitech Chillstream gamepads. Also add the RedOctane Guitar Hero X-plorer. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03Input: xpad - fix inverted Y and RY axesAnssi Hannula
The commit ae91d10aab2762f81733e9194cb56eff99c8d808 inverted Y and RY axes on xbox360 so that up is positive and down is negative. This is wrong, as axes on game controllers have up as negative per convention. Also, even xpad itself reports HAT0X with up as negative. Fix that by inverting them again. Also, according to http://bugzilla.kernel.org/show_bug.cgi?id=10337 the original xbox controllers also have the Y and RY axes inverted. Fix that by inverting them as well. Cc: Brian Magnuson <bdmagnuson@gmail.com> Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>