aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
Commit message (Collapse)AuthorAgeFilesLines
* Revert "GCC: Fix up for gcc 5+"Moyster2018-11-301-1/+0
| | | | This reverts commit ff505baaf412985af758d5820cd620ed9f1a7e05.
* Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds2018-11-2968-70/+70
| | | | | | | | | | | | | | This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Moyster <oysterized@gmail.com>
* drivers: input: mouse: Use "static inline" instead of "inline" in "lifebook.h"demicro2018-11-291-3/+3
|
* GCC: Fix up for gcc 5+mydongistiny2018-11-291-0/+1
| | | | | Signed-off-by: mydongistiny <jaysonedson@gmail.com> Signed-off-by: Mister Oyster <oysterized@gmail.com>
* Input: gtco - fix potential out-of-bound accessDmitry Torokhov2018-11-271-7/+10
| | | | | | | | | | | | | | | | commit a50829479f58416a013a4ccca791336af3c584c7 upstream. parse_hid_report_descriptor() has a while (i < length) loop, which only guarantees that there's at least 1 byte in the buffer, but the loop body can read multiple bytes which causes out-of-bounds access. Bug: 69916367 Change-Id: Ic6a2fda77685b90d7642c09b20f5d57d6d48b726 Reported-by: Andrey Konovalov <andreyknvl@google.com> Reviewed-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Siqi Lin <siqilin@google.com>
* meizu: drivers: touchscreen: cleanup windows ^MMoyster2018-05-166-329/+329
|
* ANDROID: Skip building uid_sys_stats and keyreset drivers as modulesAmit Pundir2018-01-201-4/+1
| | | | | | | | | | | | | | | | | | | | | Few Android drivers viz. uid_sys_stats and keyreset/combo fail to build as kernel modules. uid_sys_stats.ko failed for undefined "tasklist_lock", which got un-exported in commit c59923a15 ("remove the tasklist_lock export"). Quoting from the commit, "Modules have no business looking at it, and all instances in drivers have been due to use of too-lowlevel APIs. Having this symbol exported prevents moving to more scalable locking schemes for the task list.". So instead of exporting tasklist_lock again, lets not build uid_sys_stats driver as module. Similarly skip building keyreset driver as module which call sys_sync() syscall. To keep things in perspective we don't build these drivers as modules in later kernels (android-4.4/4.9) as well. Change-Id: I6371df72d79c7ad0f0c08e6ebf7e16f1b0970761 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
* arm64: use the new *_relaxed macros for lower power usagefranciscofranco2017-12-251-3/+3
| | | | | | Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com> Signed-off-by: Joe Maples <joe@frap129.org> Signed-off-by: Mister Oyster <oysterized@gmail.com>
* misc: replace __FUNCTION__ by __function__Moyster2017-09-2363-264/+264
| | | | | result of : git grep -l '__FUNCTION__' | xargs sed -i 's/__FUNCTION__/__func__/g'
* ANDROID: keychord: Fix for a memory leak in keychord.Mohan Srinivasan2017-08-121-0/+1
| | | | | | | | | | | | Fixes a steady memory leak in the keychord release code. A close of the keychord device will leak 1 keychord structure. Easily reproducible by a simple program that does an open()->write()->close() of the keychord device. Bug: 64483974 Change-Id: I1fa402c666cffb00b8cfd6379d9fe47a0989152c Signed-off-by: Mohan Srinivasan <srmohan@google.com> (cherry picked from commit 72a8dae2c25d0277e48672ee85b70236268add01)
* ANDROID: keychord: Fix races in keychord_write.Mohan Srinivasan2017-08-121-1/+60
| | | | | | | | | | | | | | | | | | There are multiple bugs caused by threads racing in keychord_write. 1) Threads racing through this function can cause the same element to be added to a linked list twice (multiple calls to input_register_handler() for the same input_handler struct). And the races can also cause an element in a linked list that doesn't exist attempted to be removed (multiple calls to input_unregister_handler() with the same input_handler struct). 2) The races can also cause duplicate kfree's of the keychords struct. Bug: 64133562 Bug: 63974334 Change-Id: I6329a4d58c665fab5d3e96ef96391e07b4941e80 Signed-off-by: Mohan Srinivasan <srmohan@google.com> (cherry picked from commit 59584701f1e2ce8ce024570576b206bea6ac69cf)
* Use %zu to print resid (size_t).Mohan Srinivasan2017-08-121-2/+2
| | | | | | | | Print resid (size_t) portably. Signed-off-by: Mohan Srinivasan <srmohan@google.com> Change-Id: Ic5c9dc498bfeef2be21594ec5efd45a98a3c4b4d (cherry picked from commit a1e4c795e1b6de6b34b8cbc75499d1675608c36b)
* ANDROID: keychord: Fix a slab out-of-bounds read.Mohan Srinivasan2017-08-121-6/+22
| | | | | | | | | Fix a slab out of bounds read in keychord_write(), detected by KASAN. Signed-off-by: Mohan Srinivasan <srmohan@google.com> Bug: 63962952 Change-Id: Iafef48b5d7283750ac0f39f5aaa767b1c3bf2004 (cherry picked from commit 913d980e07d84a843f5323acc55d185212a2abec)
* Input: i8042 - add Clevo P650RS to the i8042 reset listDmitry Torokhov2017-07-041-0/+7
| | | | | | | | | | | | | commit 7c5bb4ac2b76d2a09256aec8a7d584bf3e2b0466 upstream. Clevo P650RS and other similar devices require i8042 to be reset in order to detect Synaptics touchpad. Reported-by: Paweł Bylica <chfast@gmail.com> Tested-by: Ed Bordin <edbordin@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=190301 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: mpr121 - set missing event capabilityAkinobu Mita2017-07-041-0/+1
| | | | | | | | | | | | | | | | commit 9723ddc8fe0d76ce41fe0dc16afb241ec7d0a29d upstream. This driver reports misc scan input events on the sensor's status register changes. But the event capability for them was not set in the device initialization, so these events were ignored. This change adds the missing event capability. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Oliver Neukum <ONeukum@suse.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: mpr121 - handle multiple bits change of status registerAkinobu Mita2017-07-041-9/+14
| | | | | | | | | | | | | | | | | commit 08fea55e37f58371bffc5336a59e55d1f155955a upstream. This driver reports input events on their interrupts which are triggered by the sensor's status register changes. But only single bit change is reported in the interrupt handler. So if there are multiple bits are changed at almost the same time, other press or release events are ignored. This fixes it by detecting all changed bits in the status register. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Oliver Neukum <ONeukum@suse.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: tca8418 - use the interrupt trigger from the device treeMaxime Ripard2017-07-041-3/+3
| | | | | | | | | | | | | | | | | | commit 259b77ef853cc375a5c9198cf81f9b79fc19413c upstream. The TCA8418 might be used using different interrupt triggers on various boards. This is not working so far because the current code forces a falling edge trigger. The device tree already provides a trigger type, so let's use whatever it sets up, and since we can be loaded without DT, keep the old behaviour for the non-DT case. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Oliver Neukum <ONeukum@suse.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: joydev - do not report stale values on first openRaphael Assenat2017-07-041-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | commit 45536d373a21d441bd488f618b6e3e9bfae839f3 upstream. Postpone axis initialization to the first open instead of doing it in joydev_connect. This is to make sure the generated startup events are representative of the current joystick state rather than what it was when joydev_connect() was called, potentially much earlier. Once the first user is connected to joydev node we'll be updating joydev->abs[] values and subsequent clients will be getting correct initial states as well. This solves issues with joystick driven menus that start scrolling up each time they are started, until the user moves the joystick to generate events. In emulator menu setups where the menu program is restarted every time the game exits, the repeated need to move the joystick to stop the unintended scrolling gets old rather quickly... Signed-off-by: Raphael Assenat <raph@raphnet.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Oliver Neukum <ONeukum@suse.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: kbtab - validate number of endpoints before using themJohan Hovold2017-07-041-0/+3
| | | | | | | | | | | commit cb1b494663e037253337623bf1ef2df727883cb7 upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: iforce - validate number of endpoints before using themJohan Hovold2017-07-041-0/+3
| | | | | | | | | | | | commit 59cf8bed44a79ec42303151dd014fdb6434254bb upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory that lie beyond the end of the endpoint array should a malicious device lack the expected endpoints. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000Kai-Heng Feng2017-07-041-0/+7
| | | | | | | | | | | | | | | commit 45838660e34d90db8d4f7cbc8fd66e8aff79f4fe upstream. The aux port does not get detected without noloop quirk, so external PS/2 mouse cannot work as result. The PS/2 mouse can work with this quirk. BugLink: https://bugs.launchpad.net/bugs/1591053 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: cm109 - validate number of endpoints before using themJohan Hovold2017-06-171-0/+4
| | | | | | | | | | | | commit ac2ee9ba953afe88f7a673e1c0c839227b1d7891 upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: c04148f915e5 ("Input: add driver for USB VoIP phones with CM109...") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: yealink - validate number of endpoints before using themJohan Hovold2017-06-171-0/+4
| | | | | | | | | | | | commit 5cc4a1a9f5c179795c8a1f2b0f4361829d6a070e upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: aca951a22a1d ("[PATCH] input-driver-yealink-P1K-usb-phone") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: hanwang - validate number of endpoints before using themJohan Hovold2017-06-171-0/+3
| | | | | | | | | | | | commit ba340d7b83703768ce566f53f857543359aa1b98 upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: bba5394ad3bd ("Input: add support for Hanwang tablets") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: ims-pcu - validate number of endpoints before using themJohan Hovold2017-06-171-0/+4
| | | | | | | | | | | | commit 1916d319271664241b7aa0cd2b05e32bdb310ce9 upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack control-interface endpoints. Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: i8042 - add Pegatron touchpad to noloop tableMarcos Paulo de Souza2017-06-171-0/+6
| | | | | | | | | | | | | | | commit 41c567a5d7d1a986763e58c3394782813c3bcb03 upstream. Avoid AUX loopback in Pegatron C15B touchpad, so input subsystem is able to recognize a Synaptics touchpad in the AUX port. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=93791 (Touchpad is not detected on DNS 0801480 notebook (PEGATRON C15B)) Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* input: evdev: Move wake_lock_destroy callAnurag Singh2017-04-111-1/+1
| | | | | | | | | | | | | | Calling wake_lock_destroy from inside a spinlock protected region (or, in general, from atomic context) leads to a 'scheduling while atomic bug' because the internal wakeup source deletion logic calls synchronize_rcu, which can sleep. Moreover, since the interal lists are already protected with RCUs and spinlocks, putting the wake_lock_destroy call in a spinlock is redundant. Change-Id: I10a2239b664a5f43e54495f24fe588fb09282305 Signed-off-by: Anurag Singh <anursing@codeaurora.org>
* Input: ili210x - fix permissions on "calibrate" attributeDmitry Torokhov2017-04-111-1/+1
| | | | | | | | | | commit b27c0d0c3bf3073e8ae19875eb1d3755c5e8c072 upstream. "calibrate" attribute does not provide "show" methods and thus we should not mark it as readable. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: i8042 - set up shared ps2_cmd_mutex for AUX portsDmitry Torokhov2017-04-111-0/+1
| | | | | | | | | | | | | | | commit 47af45d684b5f3ae000ad448db02ce4f13f73273 upstream. The commit 4097461897df ("Input: i8042 - break load dependency ...") correctly set up ps2_cmd_mutex pointer for the KBD port but forgot to do the same for AUX port(s), which results in communication on KBD and AUX ports to clash with each other. Fixes: 4097461897df ("Input: i8042 - break load dependency ...") Reported-by: Bruno Wolff III <bruno@wolff.to> Tested-by: Bruno Wolff III <bruno@wolff.to> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: i8042 - break load dependency between atkbd/psmouse and i8042Dmitry Torokhov2017-04-112-21/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4097461897df91041382ff6fcd2bfa7ee6b2448c upstream. As explained in 1407814240-4275-1-git-send-email-decui@microsoft.com we have a hard load dependency between i8042 and atkbd which prevents keyboard from working on Gen2 Hyper-V VMs. > hyperv_keyboard invokes serio_interrupt(), which needs a valid serio > driver like atkbd.c. atkbd.c depends on libps2.c because it invokes > ps2_command(). libps2.c depends on i8042.c because it invokes > i8042_check_port_owner(). As a result, hyperv_keyboard actually > depends on i8042.c. > > For a Generation 2 Hyper-V VM (meaning no i8042 device emulated), if a > Linux VM (like Arch Linux) happens to configure CONFIG_SERIO_I8042=m > rather than =y, atkbd.ko can't load because i8042.ko can't load(due to > no i8042 device emulated) and finally hyperv_keyboard can't work and > the user can't input: https://bugs.archlinux.org/task/39820 > (Ubuntu/RHEL/SUSE aren't affected since they use CONFIG_SERIO_I8042=y) To break the dependency we move away from using i8042_check_port_owner() and instead allow serio port owner specify a mutex that clients should use to serialize PS/2 command stream. Reported-by: Mark Laws <mdl@60hz.org> Tested-by: Mark Laws <mdl@60hz.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
* Input: xpad - x360w: report dpad as buttons and axesPavel Rojtberg2017-04-111-2/+20
| | | | | | | | | | | | | | | | | | as discussed here[0], x360w is the only pad that maps dpad_to_button. This is bad for downstream developers as they have to differ between x360 and x360w which is not intuitive. This patch implements the suggested solution of exposing the dpad both as axes and as buttons. This retains backward compatibility with software already dealing with the difference while makes new software work as expected across x360/ x360w pads. [0] http://www.spinics.net/lists/linux-input/msg34421.html Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - factor out URB submission in xpad_play_effectPavel Rojtberg2017-04-111-71/+69
| | | | | | | | | | Move submission logic to a single point at the end of the function. This makes it easy to add locking/ queuing code later on. Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - remove needless bulk out URB used for LED setupPavel Rojtberg2017-04-111-78/+1
| | | | | | | | | | | | | | | | This code was probably wrong ever since and is redundant with xpad_send_led_command. Both try to send a similar command to the xbox360 controller. However xpad_send_led_command correctly uses the pad_nr instead of bInterfaceNumber to select the led and re-uses the irq_out URB instead of creating a new one. Note that this change only affects the two supported wireless controllers. Tested using the xbox360 wireless controller (PC). Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - use ida() for finding the pad_nrPavel Rojtberg2017-04-111-12/+20
| | | | | | | | | | | | | | | | | | | | | | The pad_nr corresponds to the lit up LED on the controller. Therefore there should be no gaps when enumerating. Currently a LED is only re-assigned after a controller is re-connected 4 times. This patch uses ida to track connected pads - this way we can re-assign freed up pad number immediately. Consider the following case: 1. pad A is connected and gets pad_nr = 0 2. pad B is connected and gets pad_nr = 1 3. pad A is disconnected 4. pad A is connected again using ida_simple_get() controller A now correctly gets pad_nr = 0 again. Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - clarify LED enumerationPavel Rojtberg2017-04-111-7/+9
| | | | | | | | | | Rename led_no -> pad_nr: the number stored there is not the LED number - it gets translated later on to a LED number in xpad_identify_controller; Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - fix Razer Atrox Arcade Stick button mappingDario Scarpa2017-04-111-1/+1
| | | | | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - add Covert Forces edition of the Xbox One controllerErik Lundgren2017-04-111-0/+1
| | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - re-send LED command on present eventPavel Rojtberg2017-04-111-8/+20
| | | | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - set the LEDs properly on XBox Wireless controllersPierre-Loup A. Griffais2017-04-111-5/+45
| | | | | | | | | | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - add rumble support for Xbox One controllerMing-ting Yao Wei2017-04-111-0/+19
| | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: initialize device counter variables with -1Aniroop Mathur2017-04-115-12/+12
| | | | | | | | | | | 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. Change-Id: I58bfb094ec24e4b4cab48b3318852a27a227dc9a Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - add Thrustmaster as Xbox 360 controller vendorTommi Rantala2017-04-111-0/+1
| | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - add USB ID for Thrustmaster Ferrari 458 Racing WheelTommi Rantala2017-04-111-0/+1
| | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - sync device IDs with xboxdrvBenjamin Valentin2017-04-111-0/+33
| | | | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - add VID/PID for Razer SabertoothFrank Razenberg2017-04-111-0/+1
| | | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - add support for Xbox One controllersTed Mielczarek2017-04-111-17/+157
| | | | | | | | | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - add new USB IDs for Logitech F310 and F710Petr Sebor2017-04-111-0/+2
| | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: xpad - change D-PAD mapping on Razer devicesThomaz de Oliveira dos Reis2017-04-111-2/+2
| | | | | | | | | | | | | 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> Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
* Input: optimize events_per_packet count calculationAnshul Garg2016-09-101-9/+13
| | | | | | | | | | | | | This patch avoids unnecessary operations while estimating events per packet for an input device when event type is not set. Change-Id: I913be1e5356d5ca7d3047e6b0413069993c2921c Signed-off-by: Anshul Garg <anshul.g@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Git-commit: baf332c0f1cede26e9c2af6276b36b4c3a36e34a Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Matt Wagantall <mattw@codeaurora.org> Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
* 3.10.102-> 3.10.103Jan Engelmohr2016-09-103-1/+10
|