Commit graph

361 commits

Author SHA1 Message Date
Dario Scarpa 470446ecef Input: xpad - fix Razer Atrox Arcade Stick button mapping
The "Razer Atrox Arcade Stick" features 10 buttons, and two of them (LT/RT)
don't work properly.  Change its definition in xpad_device[] (mapping
field) to fix.

Signed-off-by: Dario Scarpa <dario.scarpa@duskzone.it>
Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-10 11:27:05 -07:00
Erik Lundgren 39a7a88872 Input: xpad - add Covert Forces edition of the Xbox One controller
It is identical to the Xbox One controller but has a different product ID.

Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-10 11:27:05 -07:00
Dmitry Torokhov 7b415285ae Linux 4.3-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWEUxnAAoJEHm+PkMAQRiGYCYH/3gtGkFdvSLi+E1PfI8Qk3ZA
 XuYA4Mj09JBVSmaICeueMTDVrdiq0OE0zPib26GWlF/za13kNU8KgMR3+6XCuLSX
 DiCmh6mwDItoNoSIIUERLqrFHABXz8rZ3gb3uu2+kNN74Cl0piNm1YpFclEEWjMr
 9Wk5fkq+ontnDVUQOvWUxPiUXOJTvdLXBWTRDw1yTdE3RMNwRI2d/hme6Hq++WYV
 tRalZZKQaoB33js9WRVAoLVunvtna+i+/y7VGLj8QyS0+d6ec81Hey2r1/fR/oG4
 bs4ul6vtqeb3IR/PjUqxF59pSrCLEO+qrp9KrTlJNYgr1m1QyjRxWUdy/XhyaWo=
 =gIhN
 -----END PGP SIGNATURE-----

Merge tag 'v4.3-rc4' into next

Merge with mainline to sync up with changes to parkbd driver.
2015-10-05 17:36:38 -07:00
Sudip Mukherjee c65cf81565 Input: turbografx - store object in correct index
The variable i is used to check the port to attach to and we are
supposed to save the reference of struct tgfx in the location given by
tgfx_base[i]. But after finding out the index, i is getting modified
again so we saved in a wrong index.

Fixes: 4de27a638a ("Input: turbografx - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-05 17:34:57 -07:00
Sudip Mukherjee c36906c53c Input: gamecon - store object at correct index
The variable i is used to check the port to attach to and we are
supposed to save the reference of struct gc in the location given by
gc_base[i]. But after finding out the index, i is getting modified again
so we saved in a wrong index.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: a517e87c3d ("Input: gamecon - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-05 17:34:56 -07:00
Sudip Mukherjee dd23bf1044 Input: db9 - store object at correct index
The variable i is used to check the port to attach to and we are
supposed to save the reference of struct db9 in the location given by
db9_base[i]. But after finding out the index, i is getting modified again
so we saved in a wrong index.
While at it mark db9_base[i] as NULL after it is freed.

Fixes: 2260c419b5 ("Input: db9 - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-05 17:34:56 -07:00
Linus Torvalds 978ab6a009 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov:
 "Fixes for two recent regressions (in Synaptics PS/2 and uinput
  drivers) and some more driver fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Revert "Input: synaptics - fix handling of disabling gesture mode"
  Input: psmouse - fix data race in __ps2_command
  Input: elan_i2c - add all valid ic type for i2c/smbus
  Input: zhenhua - ensure we have BITREVERSE
  Input: omap4-keypad - fix memory leak
  Input: serio - fix blocking of parport
  Input: uinput - fix crash when using ABS events
  Input: elan_i2c - expand maximum product_id form 0xFF to 0xFFFF
  Input: elan_i2c - add ic type 0x03
  Input: elan_i2c - don't require known iap version
  Input: imx6ul_tsc - fix controller name
  Input: imx6ul_tsc - use the preferred method for kzalloc()
  Input: imx6ul_tsc - check for negative return value
  Input: imx6ul_tsc - propagate the errors
  Input: walkera0701 - fix abs() calculations on 64 bit values
  Input: mms114 - remove unneded semicolons
  Input: pm8941-pwrkey - remove unneded semicolon
  Input: fix typo in MT documentation
  Input: cyapa - fix address of Gen3 devices in device tree documentation
2015-10-02 17:53:25 -04:00
Andrew Morton 09a59a9d57 drivers/input/joystick/Kconfig: zhenhua.c needs BITREVERSE
It uses bitrev8(), so it must ensure that lib/bitrev.o gets included in
vmlinux.

Cc: Fengguang Wu <fengguang.wu@gmail.com>
Cc: yalin wang <yalin.wang2010@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-10-01 21:42:35 -04:00
Dmitry Torokhov 8f697e5740 Linux 4.3-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWB9f6AAoJEHm+PkMAQRiGiFMIAJYFLIkF/dXFYMNPGsRGRGYO
 SsQkfYzjy4i/yloyVlGB33e6dqxWdVgCeqYC77TO+1CBq34o6dqM4PACTrhjtS+3
 qQvaP/qn6cSoaGIkdD3v43CCiwMpZZ5+Uj7F7Uz8N4twrpykOZFMM5T7f1lrsG2F
 wJGafmvok9NU2F2wYwaJ8JrzsF6iO6ibFeB8BosRF5Ba4nKqiXVI0xNa0R8PFDm3
 tbh/IkkqokemEqnHyWyszhGFsCQupi+QgsjY/LhWUcCaL7HLEgJmkBX0tXNlgMmK
 TFCq7L8Bigu4nlgZ/iVUB9kh4GTBNVcbdRVN3loJFlczFJlIAa171OVlfRu3lvU=
 =m29x
 -----END PGP SIGNATURE-----

Merge tag 'v4.3-rc3' into next

Merge with Linux 4.3-rc3 to bring in MFD DA9062 changes to merge DA9062
OnKey driver.
2015-09-29 16:28:52 -07:00
Sudip Mukherjee 221bcb24c6 Input: walkera0701 - use parallel port device model
Modify walkera0701 driver to use the new Parallel Port device model.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-29 16:12:00 -07:00
Sudip Mukherjee 4de27a638a Input: turbografx - use parallel port device model
Modify turbografx driver to use the new Parallel Port device model.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-29 16:09:37 -07:00
Sudip Mukherjee a517e87c3d Input: gamecon - use parallel port device model
Modify gamecon driver to use the new Parallel Port device model.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-29 16:09:37 -07:00
Andrew Morton d3b367bc26 Input: zhenhua - ensure we have BITREVERSE
It uses bitrev8(), so it must ensure that lib/bitrev.o gets included in
vmlinux.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-28 16:42:34 -07:00
Sudip Mukherjee 2260c419b5 Input: db9 - use parallel port device model
Modify db9 driver to use the new Parallel Port device model.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Tested-By: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-28 16:12:17 -07:00
Dmitry Torokhov 46b018fa95 Input: walkera0701 - fix abs() calculations on 64 bit values
abs() function can not be used with 64 bit values, so let's switch to
abs64(). From include/linux/kernel.h:

/*
 * abs() handles unsigned and signed longs, ints, shorts and chars.
 * For all input types abs() returns a signed long.
 * abs() should not be used for 64-bit types (s64, u64, long long)
 * - use abs64() for those.
 */

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-19 11:39:47 -07:00
Linus Torvalds 51e771c0d2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem updates from Dmitry Torokhov:
 "Drivers, drivers, drivers...  No interesting input core changes this
  time"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (74 commits)
  Input: elan_i2c - use iap_version to get firmware information
  Input: max8997_haptic - fix module alias
  Input: elan_i2c - fix typos for validpage_count
  Input: psmouse - add small delay for IBM trackpoint pass-through mode
  Input: synaptics - fix handling of disabling gesture mode
  Input: elan_i2c - enable ELAN0100 acpi panels
  Input: gpio-keys - report error when disabling unsupported key
  Input: sur40 - fix error return code
  Input: sentelic - silence some underflow warnings
  Input: zhenhua - switch to using bitrev8()
  Input: cros_ec_keyb - replace KEYBOARD_CROS_EC dependency
  Input: cap11xx - add LED support
  Input: elants_i2c - fix for devm_gpiod_get API change
  Input: elan_i2c - enable asynchronous probing
  Input: elants_i2c - enable asynchronous probing
  Input: elants_i2c - wire up regulator support
  Input: do not emit unneeded EV_SYN when suspending
  Input: elants_i2c - disable idle mode before updating firmware
  MAINTAINERS: Add maintainer for atmel_mxt_ts
  Input: atmel_mxt_ts - remove warning on zero T44 count
  ...
2015-09-04 12:02:11 -07:00
Dmitry Torokhov 01b944fe1c Merge branch 'next' into for-linus
Prepare first round of input updates for 4.3 merge window.
2015-09-03 10:01:44 -07:00
Yalin Wang 012bd2a533 Input: zhenhua - switch to using bitrev8()
Instead of custom zhenhua_bitreverse() let's use generic bitrev8().

Signed-off-by: Yalin Wang <yalin.wang2010@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-20 17:44:34 -07:00
Ingo Molnar a5dd192496 Merge branch 'x86/urgent' into x86/asm to fix up conflicts and to pick up fixes
Conflicts:
	arch/x86/entry/entry_64_compat.S
	arch/x86/math-emu/get_address.c

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-08-18 09:39:47 +02:00
Dmitry Torokhov c20bc5502d Input: turbografx - fix potential out of bound access
Patch 17dd3f0f7a: "[PATCH] drivers/input/joystick: convert to dynamic
input_dev allocation" from Sep 15, 2005, leads to the following static
checker warning:

        drivers/input/joystick/turbografx.c:235 tgfx_probe()
        error: buffer overflow 'tgfx_buttons' 5 <= 5

drivers/input/joystick/turbografx.c
   195          for (i = 0; i < n_devs; i++) {
   196                  if (n_buttons[i] < 1)
   197                          continue;
   198
   199                  if (n_buttons[i] > 6) {
                            ^^^^^^^^^^^^^^^^
Possibly off by one.  >= 6.

Let's change the upper value to ARRAY_SIZE(tgfx_buttons) to ensure we do
not reach past the end of the array.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-03 14:11:45 -07:00
Andy Lutomirski 4ea1636b04 x86/asm/tsc: Rename native_read_tsc() to rdtsc()
Now that there is no paravirt TSC, the "native" is
inappropriate. The function does RDTSC, so give it the obvious
name: rdtsc().

Suggested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kvm ML <kvm@vger.kernel.org>
Link: http://lkml.kernel.org/r/fd43e16281991f096c1e4d21574d9e1402c62d39.1434501121.git.luto@kernel.org
[ Ported it to v4.2-rc1. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-07-06 15:23:28 +02:00
Andy Lutomirski 016bfc449a x86/asm/tsc, input/joystick/analog: Switch from rdtscl() to native_read_tsc()
This timing code is hideous, and this doesn't help.  It gets rid
of one of the last users of rdtscl(), though.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kvm ML <kvm@vger.kernel.org>
Cc: linux-input@vger.kernel.org
Link: http://lkml.kernel.org/r/90d19b3cea0e05ca6f333d1598daa38afb993260.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-07-06 15:23:28 +02:00
Pavel Rojtberg cae705baa4 Input: xpad - re-send LED command on present event
The controller only receives commands when its present. So for the
correct LED to be lit the LED command has to be sent on the present
event.

Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-06-22 14:24:58 -07:00
Pierre-Loup A. Griffais 75b7f05d27 Input: xpad - set the LEDs properly on XBox Wireless controllers
Based on Patch by Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>:
Add the logic to set the LEDs on XBox Wireless controllers.  Command
sequence found by sniffing the Windows data stream when plugging the
device in.

Updated based on comments on linux-input:
unify codepaths in xpad_send_led_command for wired/ wireless controller.
Also document command values for clarification.
All values tested on Xbox 360 Wireless Controller.

Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-06-22 14:24:57 -07:00
Ming-ting Yao Wei 0604949ce3 Input: xpad - add rumble support for Xbox One controller
This adds rumble support for Xbox One controller by sending continuous
rumble command. Trigger button rumbling is not yet implemented.

Signed-off-by: Ming-ting Yao Wei <mwei@lxde.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-04-14 17:01:53 -07:00
Markus Elfring de3748f66f Input: adi - remove an unnecessary check
The input_free_device() function tests whether its argument is NULL and
then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-02-11 23:07:13 -08:00
Dmitry Torokhov f20c86cd75 Merge branch 'next' into for-linus
Prepare input updates for 3.19.
2014-12-15 20:32:42 -08:00
Aniroop Mathur 939ffb1712 Input: initialize device counter variables with -1
Let's initialize atomic_t variables keeping track of number of various
devices created so far with -1 in order to avoid extra subtraction
operation.

Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03 15:27:17 -08:00
Greg Kroah-Hartman a1f9a40726 Input: xpad - use proper endpoint type
The xpad wireless endpoint is not a bulk endpoint on my devices, but
rather an interrupt one, so the USB core complains when it is submitted.
I'm guessing that the author really did mean that this should be an
interrupt urb, but as there are a zillion different xpad devices out
there, let's cover out bases and handle both bulk and interrupt
endpoints just as easily.

Signed-off-by: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-25 00:42:19 -08:00
Tommi Rantala 4dfb15cd5a Input: xpad - add Thrustmaster as Xbox 360 controller vendor
Add Thrustmaster as Xbox 360 controller vendor. This is required for
example to make the GP XID (044f:b326) gamepad work.

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-16 14:05:40 -07:00
Tommi Rantala 4b54625822 Input: xpad - add USB ID for Thrustmaster Ferrari 458 Racing Wheel
Add the USB ID for the Xbox 360 Thrustmaster Ferrari 458 Racing Wheel.

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-16 14:05:40 -07:00
Takashi Iwai 76460a7bec Input: joystick - use ktime for measuring timing
The current codes in gameport and analog joystick drivers for the time
accounting have a long-standing problem when the system is running
with CPU freq; since the timing is measured via TSC or sample counter,
the calculation isn't reliable.

In this patch, as a simple fix, use the standard ktime to measure the
timing.  In case where no high resolution timer is available,
use_ktime bool option is provided to both modules.  Setting
use_ktime=false switches to the old methods.

Tested-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-11 23:41:18 -07:00
Benjamin Valentin f554f619b7 Input: xpad - sync device IDs with xboxdrv
The userspace xboxdrv driver knows some more device ids than the kernel.
This patch adds the missing xbox gamepads from [1] to xpad.c

[1] https://github.com/Grumbel/xboxdrv/blob/master/src/xpad_device.cpp

Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-08 14:57:25 -07:00
Frank Razenberg a7b447380c Input: xpad - add VID/PID for Razer Sabertooth
The xpad driver recognizes Razer Sabertooth controllers as generic xbox
controller, while it is really a 360 controller.  This patch adds pid/vid
mappings for the controller so that it is correctly recognized.

Signed-off-by: Frank Razenberg <frank@zzattack.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-08 14:57:24 -07:00
Dmitry Torokhov 91167e1914 Merge branch 'next' into for-linus
Prepare second round of input updates for 3.17.
2014-08-14 23:02:58 -07:00
Ted Mielczarek 1a48ff81b3 Input: xpad - add support for Xbox One controllers
Xbox One controllers require an initialization message to start sending
data, so xpad_init_output becomes a required function. The Xbox One
controller does not have LEDs like the Xbox 360 controller, so that
functionality is not implemented. The format of messages controlling rumble
is currently undocumented, so rumble support is not yet implemented.

Note that Xbox One controller advertises three interfaces with the same
interface class, subclass and protocol, so we have to also match against
interface number.

Signed-off-by: Ted Mielczarek <ted@mielczarek.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-13 10:30:01 -07:00
Mark Brown a6b48699ae Input: joystick - use get_cycles on ARMv8
As with ARM the ARMv8 architecture provides a cycle counter which can be
used to provide a high resolution time for the joystick driver and
silence the build warning that results from not having a precise timer
on ARMv8, making allmodconfig and allyesconfig quieter.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-12 09:59:40 -07:00
Dmitry Torokhov 55df811f20 Merge branch 'next' into for-linus
First round of input updates for 3.14.
2014-01-23 08:10:44 -08:00
Paul Gortmaker bf9a9f8e51 Input: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-06 23:23:57 -08:00
Petr Sebor 8e2f2325b7 Input: xpad - add new USB IDs for Logitech F310 and F710
This enables the rumble force feedback on the F710 unit since
it is no longer treated as XTYPE_UNKNOWN type.

Signed-off-by: Petr Sebor <petr@scssoft.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-02 15:47:21 -08:00
Thomaz de Oliveira dos Reis dbb48007a0 Input: xpad - change D-PAD mapping on Razer devices
When using Razer Onza controller the dpad doesn't work in many games
because D-PAD was mapped to buttons (useful for dance pads) and not to
HAT0X/Y axis.

ers who really want to have it mapped to buttons can restore previous
behavior by using 'dpad_to_buttons' module option.

Signed-off-by: Thomaz de Oliveira dos Reis <thor27@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-02 15:47:16 -08:00
Dmitry Torokhov 4ba25a496f Linux 3.11
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJSJPkeAAoJEHm+PkMAQRiGVWMH/jo5f01Ra7G4/CYS59K+AlBQ
 /oWL3W81r5MORlsMxwUwGtJ3sZ7UulKwiDrluWeOkz2+/9SmoHoUfkpbByq1bSIV
 y0eqhmjtkHQZz5radJIHeyz1gJIICBIgAM0l45j8SpK4n9EXRcjLSZjdjAkPzxZp
 qZpfxKhVSTu79m96bud7F+HrboHDQEyhD9zqdSi4xPQNnOmTc7K3tvui9AB3rMbV
 ablM3C+LqBYjZx+pKS/rOdfATxZvtU392HU53XTALt6VD1e8alMmhmpe0I9Zxvjv
 scsB6hfRkevfe7VaK3aVoDnQnLKd61yxs+/XdzTtkWPbVGp+kiuFUdDv/5y2r1g=
 =7Xf6
 -----END PGP SIGNATURE-----

Merge tag 'v3.11' into next

Merge with mainline to bring in sync changes to cyttsp4 driver.
2013-09-18 07:58:33 -07:00
Dmitry Torokhov 07176b988e Merge branch 'next' into for-linus
Merge first round of changes for 3.12 merge window.
2013-09-06 20:23:44 -07:00
Mag ed06349fe8 Input: xpad - add signature for Razer Onza Classic Edition
Signed-off-by: Nol "Mag" Archinova <magissia@magissia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-26 00:35:01 -07:00
Wei Yongjun 67b3bfd0c2 Input: as5011 - fix error return code in as5011_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-24 17:44:25 -07:00
Jingoo Han 846fc20ff7 Input: joysticks - use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-12 22:32:30 -07:00
Dmitry Torokhov 27eb2c4b3d Merge branch 'next' into for-linus
Prepare first set of updates for 3.11 merge window.
2013-07-02 09:01:31 -07:00
Shawn Joseph be66227151 Input: xpad - fix for "Mad Catz Street Fighter IV FightPad" controllers
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>
2013-06-18 23:22:04 -07:00
Arnd Bergmann 6fdd496e07 input/joystick: use get_cycles on ARM
ARM normally has an accurate clock source, so
we can theoretically use analog joysticks more
accurately and at the same time avoid the
build warning

 #warning Precise timer not defined for this architecture.

from the joystick driver.

Now, why anybody would use that driver no ARM I have no
idea, but Ben Dooks enabled it in the s3c2410_defconfig
along with a bunch of other drivers, even though that
platform has neither ISA nor PCI support. It still
seems to be the right thing to fix this quirk.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Cc: Ben Dooks <ben-linux@fluff.org>
2013-03-14 22:38:20 +01:00
Linus Torvalds c6699b58f4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "Two new touchpad drivers - Cypress APA I2C Trackpad and Cypress PS/2
  touchpad and a big update to ALPS driver from Kevin Cernekee that adds
  support for "Rushmore" touchpads and paves way for adding support for
  "Dolphin" touchpads.

  There is also a new input driver for Goldfish emulator and also
  Android keyreset driver was folded into SysRq code.

  A few more drivers were updated with device tree bindings and others
  got some small cleanups and fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (55 commits)
  Input: cyttsp-spi - remove duplicate MODULE_ALIAS()
  Input: tsc2005 - add MODULE_ALIAS
  Input: tegra-kbc - require CONFIG_OF, remove platform data
  Input: synaptics - initialize pointer emulation usage
  Input: MT - do not apply filtering on emulated events
  Input: bma150 - make some defines public and fix some comments
  Input: bma150 - fix checking pm_runtime_get_sync() return value
  Input: ALPS - enable trackstick on Rushmore touchpads
  Input: ALPS - add support for "Rushmore" touchpads
  Input: ALPS - make the V3 packet field decoder "pluggable"
  Input: ALPS - move pixel and bitmap info into alps_data struct
  Input: ALPS - fix command mode check
  Input: ALPS - rework detection of Pinnacle AGx touchpads
  Input: ALPS - move {addr,nibble}_command settings into alps_set_defaults()
  Input: ALPS - use function pointers for different protocol handlers
  Input: ALPS - rework detection sequence
  Input: ALPS - introduce helper function for repeated commands
  Input: ALPS - move alps_get_model() down below hw_init code
  Input: ALPS - copy "model" info into alps_data struct
  Input: ALPS - document the alps.h data structures
  ...
2013-02-20 11:00:43 -08:00
Dmitry Torokhov 2d9f0d964b Merge branch 'next' into for-linus
Prepare first set of updates for 3.9 merge window.
2013-02-19 22:05:39 -08:00
Chris Metcalf 84e4e46020 drivers/input/joystick/analog.c: enable precise timer
Like nm10300, tile can just use get_cycles() for this.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-02-04 12:53:12 -05:00
Dmitry Torokhov cb696e7cf2 Input: walkera0701 - claim parport when opening the device
Postpone claiming the port until the device is opened, instead of doing
that when the driver is loaded.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-21 17:32:01 -08:00
Dmitry Torokhov ea05ae071e Input: walkera0701 - use proper error codes
We have been using -EBUSY where we should have used -EIO or -ENOMEM,
so let's fix that and also add some diagnostic messages.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-21 17:31:58 -08:00
Dmitry Torokhov e0dba55eae Input: walkera0701 - switch to using pr_xxx() for messages
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-21 17:31:54 -08:00
Dmitry Torokhov 1932c8a003 Input: walkera0701 - set up input device's parent
This will place the joystick's input device into propoer place in sysfs
hierarchy as long as th port has device assigned to it (i.e. it is not
legacy port).

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-21 17:31:50 -08:00
Dmitry Torokhov 022573c275 Merge branch 'next' into for-linus
Prepare first set of updates for 3.8 merge window.
2012-12-16 22:04:14 -08:00
Peter Popovec a455e2985f Input: walkera0701 - fix crash on startup
The driver's timer must be set up before enabling IRQ handler, otherwise
bad things may happen.

Reported-and-tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Peter Popovec <popovec@fei.tuke.sk>
CC: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-16 22:02:51 -08:00
Guillermo A. Amaral 540602a43a Input: xpad - add a few new VID/PID combinations
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-03 21:20:54 -08:00
Guillermo A. Amaral 0d027966b9 Input: xpad - minor formatting fixes
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-12-03 21:20:12 -08:00
Bill Pemberton e2619cf78e Input: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:05:38 -08:00
Bill Pemberton 5298cc4cc7 Input: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:05:19 -08:00
Bill Pemberton 1cb0aa8817 Input: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:03:48 -08:00
Shubhrajyoti D 24e491c21b Input: as5011 - use C99-style structure initializators
Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.

Thanks to Julia Lawall <julia.lawall@lip6.fr> for automating the
conversion.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-10-11 00:48:54 -07:00
Dmitry Torokhov 314820c9e8 Merge branch 'next' into for-linus 2012-07-24 22:43:04 -07:00
Linus Torvalds 39ea32ca7e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov:
 "The changes are limited to adding new VID/PID combinations to drivers
  to enable support for new versions of hardware, most notably hardware
  found in new MacBook Pro Retina boxes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: xpad - add Andamiro Pump It Up pad
  Input: xpad - add signature for Razer Onza Tournament Edition
  Input: xpad - handle all variations of Mad Catz Beat Pad
  Input: bcm5974 - Add support for 2012 MacBook Pro Retina
  HID: add support for 2012 MacBook Pro Retina
2012-07-13 10:33:18 -07:00
Yuri Khan e76b8ee25e Input: xpad - add Andamiro Pump It Up pad
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-12 23:59:39 -07:00
Ilia Katsnelson cc71a7e899 Input: xpad - add signature for Razer Onza Tournament Edition
Signed-off-by: Ilia Katsnelson <k0009000@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-11 00:55:06 -07:00
Yuri Khan 3ffb62cb9a Input: xpad - handle all variations of Mad Catz Beat Pad
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-07-11 00:54:49 -07:00
Dmitry Torokhov 3c3416abbe Merge branch 'for-linus' to bring in change ensuring that drivers that
use threaded IRQs use IRQF_ONESHOT.
2012-07-07 16:07:48 -07:00
Linus Torvalds 1b74a8684e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov:
 "Two fixes for regressions in Wacom driver and fixes for drivers using
  threaded IRQ framework without specifying IRQF_ONESHOT."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: request threaded-only IRQs with IRQF_ONESHOT
  Input: wacom - don't retrieve touch_max when it is predefined
  Input: wacom - fix retrieving touch_max bug
  Input: fix input.h kernel-doc warning
2012-07-06 09:50:39 -07:00
Lars-Peter Clausen 9b7e31bbf4 Input: request threaded-only IRQs with IRQF_ONESHOT
Since commit 1c6c69525b ("genirq: Reject bogus threaded irq requests")
threaded IRQs without a primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail. This patch adds the
IRQF_ONESHOT to input drivers where it is missing. Not modified by
this patch are those drivers where the requested IRQ will always be a
nested IRQ (e.g. because it's part of an MFD), since for this special
case IRQF_ONESHOT is not required to be specified when requesting the
IRQ.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-04 13:12:19 -07:00
Mark Brown 14674e7011 i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING
Since there are uses for I2C_M_NOSTART which are much more sensible and
standard than most of the protocol mangling functionality (the main one
being gather writes to devices where something like a register address
needs to be inserted before a block of data) create a new I2C_FUNC_NOSTART
for this feature and update all the users to use it.

Also strengthen the disrecommendation of the protocol mangling while we're
at it.

In the case of regmap-i2c we remove the requirement for mangling as
I2C_M_NOSTART is the only mangling feature which is being used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-05-30 10:55:34 +02:00
Linus Torvalds 2c01e7bc46 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer updates from Dmitry Torokhov:
 - a bunch of new drivers (DA9052/53 touchscreenn controller, Synaptics
   Navpoint, LM8333 keypads, Wacom I2C touhscreen);
 - updates to existing touchpad drivers (ALPS, Sntelic);
 - Wacom driver now supports Intuos5;
 - device-tree bindings in numerous drivers;
 - other cleanups and fixes.

Fix annoying conflict in drivers/input/tablet/wacom_wac.c that I think
implies that the input layer device naming is broken, but let's see.  I
brough it up with Dmitry.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits)
  Input: matrix-keymap - fix building keymaps
  Input: spear-keyboard - document DT bindings
  Input: spear-keyboard - add device tree bindings
  Input: matrix-keymap - wire up device tree support
  Input: matrix-keymap - uninline and prepare for device tree support
  Input: adp5588 - add support for gpio names
  Input: omap-keypad - dynamically handle register offsets
  Input: synaptics - fix compile warning
  MAINTAINERS: adjust input-related patterns
  Input: ALPS - switch to using input_mt_report_finger_count
  Input: ALPS - add semi-MT support for v4 protocol
  Input: Add Synaptics NavPoint (PXA27x SSP/SPI) driver
  Input: atmel_mxt_ts - dump each message on just 1 line
  Input: atmel_mxt_ts - do not read extra (checksum) byte
  Input: atmel_mxt_ts - verify object size in mxt_write_object
  Input: atmel_mxt_ts - only allow root to update firmware
  Input: atmel_mxt_ts - use CONFIG_PM_SLEEP
  Input: sentelic - report device's production serial number
  Input: tl6040-vibra - Device Tree support
  Input: evdev - properly handle read/write with count 0
  ...
2012-05-24 10:34:29 -07:00
Greg Kroah-Hartman 8818e4190f USB: input: xpad.c: fix up dev_* messages
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-04 15:32:53 -07:00
Greg Kroah-Hartman a852d78e4e USB: input: iforce: fix up dev_* messages
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:23:04 -07:00
Greg Kroah-Hartman c4f0bbcd1d USB: xpad.c: remove dbg() usage
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-01 21:32:59 -07:00
Greg Kroah-Hartman f576125dc8 USB: iforce: remove dbg() usage
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:31:55 -07:00
Greg Kroah-Hartman 39e85a2673 USB: input: xpad.c: fix up dev_err() usage
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-05-01 20:56:34 -04:00
Greg Kroah-Hartman d331efdd99 USB: input: joystick: iforce: fix up dev_err() usages
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 18:40:57 -04:00
Greg Kroah-Hartman 9cb757bfac USB: xpad.c: remove err() usage
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-04-25 14:48:23 -07:00
Greg Kroah-Hartman 7b22a8855a USB: iforce: remove err() usage
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:34:49 -07:00
Dmitry Torokhov 57b8628bb0 Merge commit 'v3.4-rc4' into next 2012-04-21 23:28:35 -07:00
Axel Lin 98a8413192 Input: gameport - use module_gameport_driver
This patch converts the drivers in drivers/input/* to use
module_gameport_driver() macro which makes the code smaller
and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:44 -07:00
Axel Lin 65ac9f7a23 Input: serio - use module_serio_driver
This patch converts the drivers in drivers/input/* to use
module_serio_driver() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:43 -07:00
Linus Torvalds 2f7fa1be66 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull 2nd round of input updates from Dmitry Torokhov:
 - update to Wacom driver to support wireless devices
 - update to Sentelci touchpad driver to support newer hardware
 - update to gpio-keys driver to support "interrupt-only" keys
 - fixups to earlier commits

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: wacom - check for allocation failure in probe()
  Input: tegra-kbc - allocate pdata before using it
  Input: amijoy - add missing platform check
  Input: wacom - wireless battery status
  Input: wacom - create inputs when wireless connect
  Input: wacom - wireless monitor framework
  Input: wacom - isolate input registration
  Input: sentelic - improve packet debugging information
  Input: sentelic - minor code cleanup
  Input: sentelic - enabling absolute coordinates output for newer hardware
  Input: sentelic - refactor code for upcoming new hardware support
  Input: gpio_keys - add support for interrupt only keys
  Input: gpio_keys - consolidate key destructor code
  Input: revert "gpio_keys - switch to using threaded IRQs"
  Input: gpio_keys - constify platform data
  Input: spear-keyboard - remove kbd_set_plat_data()
2012-03-29 23:17:44 -07:00
David Howells 9ffc93f203 Remove all #inclusions of asm/system.h
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <dhowells@redhat.com>
2012-03-28 18:30:03 +01:00
Geert Uytterhoeven 3183968cbf Input: amijoy - add missing platform check
On multi-platform kernels, the Amiga joystick driver may be initialized
when running on Amiga only. Else it may crash later.
Fortunately this driver is almost always compiled as a module (to avoid
conflicts with the mouse driver), so it needs an explicit insmod to
trigger a crash.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:33:23 -07:00
Axel Lin 1b92c1cf6b Input: convert I2C drivers to use module_i2c_driver()
This patch converts the drivers in drivers/input/* to use the
module_i2c_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-16 23:06:19 -07:00
Rusty Russell 90ab5ee941 module_param: make bool parameters really bool (drivers & misc)
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>
2012-01-13 09:32:20 +10:30
Greg Kroah-Hartman 08642e7c52 USB: convert drivers/input/* to use module_usb_driver()
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-11-18 09:48:31 -08:00
Paul Gortmaker d2d8442d00 drivers/input: Add module.h to modular drivers implicitly using it
A pending cleanup will mean that module.h won't be implicitly
everywhere anymore.  Make sure the modular drivers in input dir
are actually calling out for <module.h> explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:16 -04:00
Linus Torvalds 8554cc18db Merge branch 'for-linus' of 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: ad714x - read the interrupt status registers in a row
  Input: ad714x - use DMA-safe buffers for spi_write()
  Input: ad714x - fix endianness issues
  Input: ad714xx-spi - force SPI bus into the default 8-bit mode
  Input: ep93xx_keypad - add missing include of linux/module.h
  Input: tnetv107x-ts - add missing include of linux/module.h
  Input: max11801_ts - correct license statement
  Input: atmel_mxt_ts - report pressure information from the driver
  Input: bcm5974 - Add support for newer MacBookPro8,2
  Input: wacom - report id 3 returns 4 bytes of data
  Input: wacom - add WAC_MSG_RETRIES define
  Input: wacom - add support for the Wacom Bamboo Pen (CTL-660/K)
  Input: tegra-kbc - correct call to input_free_device
  Input: mpu3050 - correct call to input_free_device
  Input: bcm5974 - add support for touchpads found in MacBookAir4,2
  Input: mma8450 - fix module device table type
  Input: remove CLOCK_TICK_RATE from analog joystick driver
2011-08-24 09:19:03 -07:00
Deepak Saxena 18b08c55a9 Input: remove CLOCK_TICK_RATE from analog joystick driver
The analog joystick driver is written for x86 systems. This
patch updates it to use the PIT_TICK_RATE value instead of
CLOCK_TICK_RATE as they are equivalent on x86 and we want to
deprecate the latter.

Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-04 23:41:36 -07:00
Linus Torvalds 70a3eff576 Merge branch 'for-linus' of 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: (53 commits)
  Input: synaptics - fix reporting of min coordinates
  Input: tegra-kbc - enable key autorepeat
  Input: kxtj9 - fix locking typo in kxtj9_set_poll()
  Input: kxtj9 - fix bug in probe()
  Input: intel-mid-touch - remove pointless checking for variable 'found'
  Input: hp_sdc - staticize hp_sdc_kicker()
  Input: pmic8xxx-keypad - fix a leak of the IRQ during init failure
  Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data
  Input: cy8ctmg110_ts - constify i2c_device_id table
  Input: cy8ctmg110_ts - fix checking return value of i2c_master_send
  Input: lifebook - make dmi callback functions return 1
  Input: atkbd - make dmi callback functions return 1
  Input: gpio_keys - switch to using SIMPLE_DEV_PM_OPS
  Input: gpio_keys - add support for device-tree platform data
  Input: aiptek - remove double define
  Input: synaptics - set minimum coordinates as reported by firmware
  Input: synaptics - process button bits in AGM packets
  Input: synaptics - rename set_slot to be more descriptive
  Input: synaptics - fuzz position for touchpad with reduced filtering
  Input: synaptics - set resolution for MT_POSITION_X/Y axes
  ...
2011-07-27 09:24:56 -07:00
Chris Moeller b514d4f7c6 Input: xpad - enable rumble support for XBox360 Wireless Controllers
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-07-04 19:31:06 -07:00
Magnus Hörlin fabadbc754 Input: xpad - add support for two more dance pads and a guitar
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>
2011-06-21 14:41:09 -07:00
Ralf Baechle 334955ef96 i8253: Create linux/i8253.h and use it in all 8253 related files
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/20110601180610.054254048@duck.linux-mips.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

 arch/arm/mach-footbridge/isa-timer.c |    2 +-
 arch/mips/cobalt/time.c              |    2 +-
 arch/mips/jazz/irq.c                 |    2 +-
 arch/mips/kernel/i8253.c             |    2 +-
 arch/mips/mti-malta/malta-time.c     |    2 +-
 arch/mips/sgi-ip22/ip22-time.c       |    2 +-
 arch/mips/sni/time.c                 |    2 +-
 arch/x86/kernel/apic/apic.c          |    2 +-
 arch/x86/kernel/apm_32.c             |    2 +-
 arch/x86/kernel/hpet.c               |    2 +-
 arch/x86/kernel/i8253.c              |    2 +-
 arch/x86/kernel/time.c               |    2 +-
 drivers/block/hd.c                   |    2 +-
 drivers/clocksource/i8253.c          |    2 +-
 drivers/input/gameport/gameport.c    |    2 +-
 drivers/input/joystick/analog.c      |    2 +-
 drivers/input/misc/pcspkr.c          |    2 +-
 include/linux/i8253.h                |   11 +++++++++++
 sound/drivers/pcsp/pcsp.h            |    2 +-
 19 files changed, 29 insertions(+), 18 deletions(-)
2011-06-09 15:01:37 +02:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Dmitry Torokhov 01c728a246 Merge branch 'next' into for-linus 2011-01-11 22:01:45 -08:00
Fabien Marteau 9d084a3d5d Input: add Austria Microsystem AS5011 joystick driver
This is driver for EasyPoint AS5011 2 axis joystick chip. This chip is
plugged on an I2C bus.

Tested on ARM processor (i.MX27).

Signed-off-by: Fabien Marteau <fabien.marteau@armadeus.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-10 11:01:43 -08:00
Dmitry Torokhov 554738da71 Merge branch 'next' into for-linus
Conflicts:
	include/linux/input.h
2011-01-06 22:34:59 -08:00
Namhyung Kim 8ed9e0e1b6 Input: turbografx - fix reference counting
The ref-count of parport gained from parport_find_number()
was not released in normal path.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-01 09:20:34 -08:00
Dmitry Torokhov 33e808c383 Input: iforce - clean up Makefile
Use <module>-y notation to specify list of objects comprising iforce
module and conditionally pull in USB and RS232 support.

Also remove custom compiler flags and rely on general makefile rules
for enabling warnings.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-22 12:54:13 -08:00
Axel Lin e3f0f0a6c1 Input: xpad - ensure xpad->bulk_out is initialized before submitting urb
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-18 00:16:44 -08:00
Dmitry Torokhov 2a0591596b Input: xpad - remove useless check in xpad_remove
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-11 22:02:27 -08:00
Axel Lin 161feb2417 Input: xpad - fix resource reclaim in xpad_probe error path
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-11 22:02:23 -08:00
Axel Lin 6ff92a6db2 Input: xpad - fix a memory leak
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-11 22:02:18 -08:00
Axel Lin 49cc69b678 Input: xpad - return proper error in error path
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-11-11 22:02:11 -08:00
Linus Torvalds 229aebb873 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  Update broken web addresses in arch directory.
  Update broken web addresses in the kernel.
  Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
  Revert "Fix typo: configuation => configuration" partially
  ida: document IDA_BITMAP_LONGS calculation
  ext2: fix a typo on comment in ext2/inode.c
  drivers/scsi: Remove unnecessary casts of private_data
  drivers/s390: Remove unnecessary casts of private_data
  net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
  drivers/infiniband: Remove unnecessary casts of private_data
  drivers/gpu/drm: Remove unnecessary casts of private_data
  kernel/pm_qos_params.c: Remove unnecessary casts of private_data
  fs/ecryptfs: Remove unnecessary casts of private_data
  fs/seq_file.c: Remove unnecessary casts of private_data
  arm: uengine.c: remove C99 comments
  arm: scoop.c: remove C99 comments
  Fix typo configue => configure in comments
  Fix typo: configuation => configuration
  Fix typo interrest[ing|ed] => interest[ing|ed]
  Fix various typos of valid in comments
  ...

Fix up trivial conflicts in:
	drivers/char/ipmi/ipmi_si_intf.c
	drivers/usb/gadget/rndis.c
	net/irda/irnet/irnet_ppp.c
2010-10-24 13:41:39 -07:00
Justin P. Mattock 631dd1a885 Update broken web addresses in the kernel.
The patch below updates broken web addresses in the kernel

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Acked-by: Ben Pfaff <blp@cs.stanford.edu>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Reviewed-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-10-18 11:03:14 +02:00
Daniel Mack b84ae4a140 Input: fix faulty XXinput_* calls
They've been introduced by 987a6c02 ("Input: switch to input_abs_*()
access functions") and they appear to be some kind of debug left-over.

[Dmitry Torokhov: these are my fault - I added XX prefixes in places where
 I wanted to do additional review of the code but failed to actually do
 that in these particular instances.]

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-13 12:03:24 -07:00
Dmitry Torokhov 5fc0d36c00 Merge branch 'next' into for-linus 2010-08-10 08:41:58 -07:00
Christoph Fritz 6ac8a99b90 Input: xpad - add USB-ID for PL-3601 Xbox 360 pad
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-10 08:40:15 -07:00
Daniel Mack 987a6c0298 Input: switch to input_abs_*() access functions
Change all call sites in drivers/input to not access the ABS axis
information directly anymore. Make them use the access helpers instead.

Also use input_set_abs_params() when possible.
Did some code refactoring as I was on it.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-08-02 20:29:56 -07:00
Dmitry Torokhov d01d0756f7 Merge branch 'next' into for-linus 2010-08-02 18:35:17 -07:00
Chris Merrett b326b853dc Input: xpad - add product ID for Hori Fighting Stick EX2
Signed-off-by: Chris Merrett <chrisfu@hardc0re.org.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-26 01:16:28 -07:00
Dmitry Torokhov c25f7b763c Input: gamecon - reference correct pad in gc_psx_command()
Otherwise we won't see any events from the gamepad.
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16408

Reported-and-tested-by: Eugene Yudin <eugene.yudin@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-20 20:29:32 -07:00
Dmitry Torokhov 7b5d3312fb Input: gamecon - reference correct input device in NES mode
We moved input devices from 'struct gc' to individial pads (struct
gc-pad), but gc_nes_process_packet() was still trying to use old
ones and crashing.

Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-20 20:29:11 -07:00
Christoph Fritz 7beae7028a Input: xpad - remove mouse buttons and axes for dance pads
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-07-13 09:43:50 -07:00
Linus Torvalds 7a9b149212 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
  USB: remove unused usb_buffer_alloc and usb_buffer_free macros
  usb: musb: update gfp/slab.h includes
  USB: ftdi_sio: fix legacy SIO-device header
  USB: kl5usb105: reimplement using generic framework
  USB: kl5usb105: minor clean ups
  USB: kl5usb105: fix memory leak
  USB: io_ti: use kfifo to implement write buffering
  USB: io_ti: remove unsused private counter
  USB: ti_usb: use kfifo to implement write buffering
  USB: ir-usb: fix incorrect write-buffer length
  USB: aircable: fix incorrect write-buffer length
  USB: safe_serial: straighten out read processing
  USB: safe_serial: reimplement read using generic framework
  USB: safe_serial: reimplement write using generic framework
  usb-storage: always print quirks
  USB: usb-storage: trivial debug improvements
  USB: oti6858: use port write fifo
  USB: oti6858: use kfifo to implement write buffering
  USB: cypress_m8: use kfifo to implement write buffering
  USB: cypress_m8: remove unused drain define
  ...

Fix up conflicts (due to usb_buffer_alloc/free renaming) in
	drivers/input/tablet/acecad.c
	drivers/input/tablet/kbtab.c
	drivers/input/tablet/wacom_sys.c
	drivers/media/video/gspca/gspca.c
	sound/usb/usbaudio.c
2010-05-20 21:26:12 -07:00
Daniel Mack 997ea58eb9 USB: rename usb_buffer_alloc() and usb_buffer_free() users
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-05-20 13:21:38 -07:00
Linus Torvalds 1014cfe2fb Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  lockdep: Reduce stack_trace usage
  lockdep: No need to disable preemption in debug atomic ops
  lockdep: Actually _dec_ in debug_atomic_dec
  lockdep: Provide off case for redundant_hardirqs_on increment
  lockdep: Simplify debug atomic ops
  lockdep: Fix redundant_hardirqs_on incremented with irqs enabled
  lockstat: Make lockstat counting per cpu
  i8253: Convert i8253_lock to raw_spinlock
2010-05-18 08:17:35 -07:00
Linus Torvalds aa86f26bd8 Merge branch 'for-linus' of 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: ad7877 - keep dma rx buffers in seperate cache lines
  Input: psmouse - reset all types of mice before reconnecting
  Input: elantech - use all 3 bytes when checking version
  Input: iforce - fix Guillemot Jet Leader 3D entry
  Input: iforce - add Guillemot Jet Leader Force Feedback
2010-05-13 07:28:43 -07:00
Marek Vasut 513d8be988 Input: iforce - fix Guillemot Jet Leader 3D entry
USB ID entry for "Guillemot Jet Leader 3D" in iforce-main.c did not match
one used in iforce-usb.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-10 22:54:39 -07:00
Marek Vasut d861f7bf14 Input: iforce - add Guillemot Jet Leader Force Feedback
This device features a RUDDER on the knob.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-10 22:54:24 -07:00
Ingo Molnar 53ba4f2fa7 Merge commit 'v2.6.34-rc6' into core/locking 2010-05-03 09:17:01 +02:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Dan Carpenter 5bc923c505 Input: gamecon - fix off by one range check
It should be >= GC_MAX not > GC_MAX.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-03-05 00:32:21 -08:00
Thomas Gleixner ced918eb74 i8253: Convert i8253_lock to raw_spinlock
i8253_lock needs to be a real spinlock in preempt-rt, i.e. it can
not be converted to a sleeping lock.

Convert it to raw_spinlock and fix up all users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
LKML-Reference: <20100217163751.030764372@linutronix.de>
2010-03-02 10:28:38 +01:00
Dmitry Torokhov a1e1274747 Input: gamecon - use pr_err() and friends
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-21 22:10:12 -08:00
Dmitry Torokhov af930d6462 Input: gamecon - constify some of the setup structures
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-21 22:10:07 -08:00
Dmitry Torokhov 0995174dda Input: gamecon - simplify pad type handling
Instead of having array bitmasks by type for all gamepads have explicit
type field in every pad structure.

Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-21 22:10:01 -08:00
Dmitry Torokhov 315543fd11 Input: gamecon - simplify coordinate calculation for PSX
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-21 22:09:55 -08:00
Dmitry Torokhov d38fcb9690 Input: gamecon - fix some formatting issues
Fix formatting of 'switch' statements and change the code to stay closer
to 80 column limit where it does not hurt code readability.

Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-21 22:09:49 -08:00
Scott Moreau 7aa9e0e826 Input: gamecon - add rumble support for N64 pads
Add force-feedback support for N64 pads with rumble pak accessory installed.
Actually we do not check for the presence of rumble pad but simply assume it
is installed and expect the device to ignore FF commands if rumble pak is
missing.

Signed-off-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-21 22:09:43 -08:00
Benjamin Valentin 121873059f Input: xpad - add rumble support for original xbox controller
Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-24 22:42:10 -08:00
Dmitry Torokhov 7755726fe9 Merge commit 'v2.6.33-rc5' into next 2010-01-21 23:55:25 -08:00
Dmitry Torokhov dd38d6889d Input: xbox - do not use GFP_KERNEL under spinlock
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>
2010-01-09 23:44:03 -08:00
Roel Kluin abf2a117c6 Input: gf2k - fix &&/|| confusion in gf2k_connect()
This always evaluates to true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-01 18:45:52 -08:00
Dmitry Torokhov c2b27ef672 Input: iforce - wait for command completion when closing the device
We need to wait for the command to disable FF effects to complete before
continuing with closing the device.

Tested-by: Johannes Ebke <johannes.ebke@physik.uni-muenchen.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-12-30 12:19:38 -08:00
Nicolas Léveillé b45d44e7e0 Input: xpad - allow using triggers as buttons rather than axes
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-12-29 23:33:37 -08:00
Dmitry Torokhov 98b7fb0472 Input: iforce - fix oops on device disconnect
Do not try to free iforce device when we closing input device; disconnect
is the only place where it should be deleted.

Reported-by: Johannes Ebke <johannes.ebke@physik.uni-muenchen.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-12-24 22:38:11 -08:00
Nicolas Léveillé dadaae3777 Input: xpad - add two new Xbox 360 devices
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-11-29 23:35:05 -08:00
Thomas Gruber 3ac91d36bb Input: xpad - add BigBen Interactive XBOX 360 Controller
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-10-05 22:00:09 -07:00
Dmitry Torokhov 4b61bb575b Merge commit 'v2.6.31-rc8' into next 2009-08-27 22:00:20 -07:00
Linus Torvalds 22e93eddd9 Merge branch 'for-linus' of 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: ucb1400_ts - enable interrupt unconditionally
  Input: ucb1400_ts - enable ADC Filter
  Input: wacom - don't use on-stack memory for report buffers
  Input: iforce - support new revision of ACT LABS Force RS
  Input: joydev - decouple axis and button map ioctls from input constants
2009-08-24 12:25:27 -07:00
Corbin Simpson 805423e84e Input: xpad - add USB ID for the drumkit controller from Rock Band
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-20 22:06:31 -07:00
Jiri Kosina 68947b8f9a Input: iforce - support new revision of ACT LABS Force RS
Reported-by: cemede@gmail.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-19 22:16:51 -07:00
Linus Torvalds 71c4c8b7c3 Merge branch 'for-linus' of 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: atkbd - add force relese key quirk for Soltech TA12
  Input: fix EVIOCGNAME/JSIOCGNAME regression
  Input: atkbd - add forced release keys quirk for FSC Amilo Pi 3525
  Input: pcspkr - switch driver to dev_pm_ops
  Input: xpad - don't resend successfully sent outgoing requests
  Input: wistron_btns - recognize Maxdata Pro 7000 notebooks
2009-07-22 09:25:31 -07:00