summaryrefslogtreecommitdiffstats
path: root/drivers/input
Commit message (Collapse)AuthorAgeFilesLines
* Input: da9063 - report KEY_POWER instead of KEY_SLEEP during power key-pressSteve Twiss2015-12-131-4/+4
| | | | | | | | | | | | | Stop reporting KEY_SLEEP for a short key-press and report KEY_POWER instead This change applies to both DA9063 and DA9062 ONKEY drivers. A previous application used for testing by the developer required a KEY_SLEEP and KEY_POWER input_report_key event to distinguish between a short and long key-press of the power key. This is not the general convention and the typical solution is for KEY_POWER to be used in both cases: suspend and S/W power off. Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: pixcir_i2c - add support for wake and enable gpiosSander Vermin2015-12-051-0/+41
| | | | | | | | | | | On some devices the wake and enable pins of the pixcir touchscreen controller are connected to gpios and these must be controlled by the driver for the device to operate properly. Signed-off-by: Sander Vermin <sander@vermin.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom_w8001 - split the touch and pen devices into two devicesPeter Hutterer2015-12-041-51/+116
| | | | | | | | | | | | | | | | | | These devices have a pen device and a touch device through the same serial protocol, split it up into two separate devices like we do for USB Wacom tablets too. Userspace already matches on the device name so we can't drop it completely. Compose the same basename based on capabilities and append the tool type, leading to a name like "Wacom Serial Penabled 2FG Touchscreen Pen". Note that this drops BTN_TOOL_FINGER, it is not needed once the tools are split out (and a touch device with BTN_TOOL_FINGER is interpreted as touchpad by most of userspace). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom_w8001 - split pen and touch initialization upPeter Hutterer2015-12-041-83/+111
| | | | | | | This is preparation work for splitting it up for two event nodes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom_w8001 - handle touch error case correctlyPeter Hutterer2015-12-041-10/+9Star
| | | | | | | | | If a device failed at the pen setup and gets a zero reply from the touch device, we need to return an error. Otherwise we have a device with nothing but a name and the EV_KEY and EV_ABS bits. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom_w8001 - set BTN_TOOL_DOUBLETAP if we have 2fg supportPeter Hutterer2015-12-041-0/+1
| | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom_w8001 - use __set_bit for evbitsPeter Hutterer2015-12-041-1/+2
| | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: sparcspkr - use platform_register/unregister_drivers()Thierry Reding2015-12-021-11/+7Star
| | | | | | | | These new helpers simplify implementing multi-driver modules and properly handle failure to register one driver by unregistering all previously registered drivers. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2015-11-148-697/+871
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull more input updates from Dmitry Torokhov: "An update to the tsc2005 driver that allows it to also support tsc2004 (basically the same controller, but uses i2c instead of spi bus), and a couple of bug fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: parkbd - drop bogus __init from parkbd_allocate_serio() Input: elantech - add Fujitsu Lifebook U745 to force crc_enabled Input: tsc2004 - add support for tsc2004 Input: tsc200x-core - rename functions and variables Input: tsc2005 - separate SPI and core functions
| * Merge branch 'next' into for-linusDmitry Torokhov2015-11-138-697/+871
| |\ | | | | | | | | | Prepare second round of input updates for 4.3 merge window.
| | * Input: parkbd - drop bogus __init from parkbd_allocate_serio()Geert Uytterhoeven2015-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: vmlinux.o(.text+0x1056606): Section mismatch in reference from the function parkbd_attach() to the function .init.text:parkbd_allocate_serio() The function parkbd_attach() references the function __init parkbd_allocate_serio(). This is often because parkbd_attach lacks a __init annotation or the annotation of parkbd_allocate_serio is wrong. Commit 33ca8ab97cbb676d ("Input: parkbd - use parallel port device model") dropped the __init attribute from the sole caller of parkbd_allocate_serio(), but forgot to remove it from parkbd_allocate_serio() itself. Fixes: 33ca8ab97cbb676d ("Input: parkbd - use parallel port device model") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: elantech - add Fujitsu Lifebook U745 to force crc_enabledTakashi Iwai2015-11-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Another Lifebook machine that needs the same quirk as other similar models to make the driver working. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=883192 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: tsc2004 - add support for tsc2004Michael Welling2015-11-033-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | This adds support for the i2c based tsc2004 touchscreen controller. Signed-off-by: Michael Welling <mwelling@ieee.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: tsc200x-core - rename functions and variablesMichael Welling2015-11-033-152/+152
| | | | | | | | | | | | | | | | | | | | | | | | The functions, variables, and defines of the new tsc200x-core.c are renamed to tsc200x instead of tsc2005 avoid possible confusion. Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: tsc2005 - separate SPI and core functionsMichael Welling2015-11-035-695/+765
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch separates the SPI functionality from core functionality that overlaps with the tsc2004. Prepares kernel for new tsc2004 driver without much redundant code. Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | remove abs64()Andrew Morton2015-11-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch everything to the new and more capable implementation of abs(). Mainly to give the new abs() a bit of a workout. Cc: Michal Nazarewicz <mina86@mina86.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2015-11-0640-926/+3211
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "Items of note: - evdev users can now limit or mask the kind of events they will receive. This will allow applications such as power manager or network manager to only be woken when user presses special keys such as KEY_POWER or KEY_WIFI and not be bothered with ordinary key presses coming from keyboard - support for FocalTech FT6236 touchscreen controller - support for ROHM BU21023/24 touchscreen controller - edt-ft5x06 touchscreen driver got a face lift and can now be used with FT5506 - support for Google Fiber TV Box remote controls - improvements in xpad driver (with more to come) - several parport-based drivers have been switched to the new device model - other miscellaneous driver improvements" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (70 commits) HID: hid-gfrm: avoid warning for input_configured API change HID: hid-input: allow input_configured callback return errors Input: evdev - fix bug in checking duplicate clock change request Input: add userio module Input: evdev - add event-mask API Input: snvs_pwrkey - remove duplicated semicolon HID: hid-gfrm: Google Fiber TV Box remote controls Input: e3x0-button - update Kconfig description Input: tegra-kbc - drop use of IRQF_NO_SUSPEND flag Input: tegra-kbc - enable support for the standard "wakeup-source" property Input: xen - check return value of xenbus_printf Input: hp_sdc_rtc - fix y2038 problem in proc_show Input: nomadik-ske-keypad - fix a trivial typo Input: xpad - fix clash of presence handling with LED setting Input: edt-ft5x06 - work around FT5506 firmware bug Input: edt-ft5x06 - add support for FT5506 Input: edt-ft5x06 - add support for different max support points Input: edt-ft5x06 - use max support points to determine how much to read Input: rotary-encoder - add support for quarter-period mode Input: rotary-encoder - use of_property_read_bool ...
| * | Merge branch 'next' into for-linusDmitry Torokhov2015-11-0353-1337/+3554
| |\| | | | | | | | | | Prepare first round of input updates for 4.3 merge window.
| | * Input: evdev - fix bug in checking duplicate clock change requestAniroop Mathur2015-10-311-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | clk_type and clkid stores different predefined clock identification values so they cannot be compared for checking duplicate clock change request. Therefore, lets fix it to avoid unexpected results. Signed-off-by: Aniroop Mathur <a.mathur@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: add userio moduleStephen Chandler Paul2015-10-283-0/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debugging input devices, specifically laptop touchpads, can be tricky without having the physical device handy. Here we try to remedy that with userio. This module allows an application to connect to a character device provided by the kernel, and emulate any serio device. In combination with userspace programs that can record PS/2 devices and replay them through the /dev/userio device, this allows developers to debug driver issues on the PS/2 level with devices simply by requesting a recording from the user experiencing the issue without having to have the physical hardware in front of them. Signed-off-by: Stephen Chandler Paul <cpaul@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: evdev - add event-mask APIDavid Herrmann2015-10-271-2/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware manufacturers group keys in the weirdest way possible. This may cause a power-key to be grouped together with normal keyboard keys and thus be reported on the same kernel interface. However, user-space is often only interested in specific sets of events. For instance, daemons dealing with system-reboot (like systemd-logind) listen for KEY_POWER, but are not interested in any main keyboard keys. Usually, power keys are reported via separate interfaces, however, some i8042 boards report it in the AT matrix. To avoid waking up those system daemons on each key-press, we had two ideas: - split off KEY_POWER into a separate interface unconditionally - allow filtering a specific set of events on evdev FDs Splitting of KEY_POWER is a rather weird way to deal with this and may break backwards-compatibility. It is also specific to KEY_POWER and might be required for other stuff, too. Moreover, we might end up with a huge set of input-devices just to have them properly split. Hence, this patchset implements the second idea: An event-mask to specify which events you're interested in. Two ioctls allow setting this mask for each event-type. If not set, all events are reported. The type==0 entry is used same as in EVIOCGBIT to set the actual EV_* mask of filtered events. This way, you have a two-level filter. We are heavily forward-compatible to new event-types and event-codes. So new user-space will be able to run on an old kernel which doesn't know the given event-codes or event-types. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: snvs_pwrkey - remove duplicated semicolonJavier Martinez Canillas2015-10-271-2/+1Star
| | | | | | | | | | | | | | | | | | | | | Remove the unneded semicolon since it is clearly a typo error. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: e3x0-button - update Kconfig descriptionMoritz Fischer2015-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The driver is now used for the entire USRP e3xx series, this commit fixes the description that will be displayed in the menu accordingly. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: tegra-kbc - drop use of IRQF_NO_SUSPEND flagSudeep Holla2015-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver handles wakeup irq correctly using device_init_wakeup and enable_irq_wake. There's no need to use IRQF_NO_SUSPEND while registering the interrupt. This patch removes the use of IRQF_NO_SUSPEND flag. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Acked-by: Thierry Reding <treding@nvidia.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: tegra-kbc - enable support for the standard "wakeup-source" propertySudeep Holla2015-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Though the tegra-kbc driver should/will continue to support the legacy "nvidia,wakeup-source" property to enable keyboard as the wakeup source, we need to add support for the new standard property "wakeup-source". This patch adds support for "wakeup-source" property in addition to the existing "nvidia,wakeup-source" property. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: xen - check return value of xenbus_printfInsu Yun2015-10-231-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Internally, xenbus_printf uses memory allocation, so it can fail under memory pressure, leaving the input device configured as absolute with the backend supplying relative coordinates. Signed-off-by: Insu Yun <wuninsu@gmail.com> Reviewed-by: Julien Grall <julien.grall@citrix.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: hp_sdc_rtc - fix y2038 problem in proc_showWEN Pingbo2015-10-231-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hp_sdc_rtc_proc_show() use timeval to store the time, which will overflow in 2038. This patch fixes this problem by replacing timeval with timespec64. hp_sdc_rtc_proc_show() only output string, so that userspace will work normally if we apply this patch. Not all timer in i8042 have y2038 risk(handshake, match timer, etc), Replacements in those timer are just for consistency. Signed-off-by: WEN Pingbo <pingbo.wen@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: nomadik-ske-keypad - fix a trivial typoGeliang Tang2015-10-231-1/+1
| | | | | | | | | | | | | | | | | | s/regsiter/register/ Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: xpad - fix clash of presence handling with LED settingPavel Rojtberg2015-10-191-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Do not call xpad_identify_controller at init with wireless devices: it conflicts with the already sent presence packet and will be called by xpad360w_process_packet as needed anyway. Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: edt-ft5x06 - work around FT5506 firmware bugFranklin S Cooper Jr2015-10-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the touchscreen controller ISR, reading the tsc starting from register 0x2 causes the tsc to infrequently update the detected finger's x and y coordinate. The irq pin toggles at a fast rate to indicate touch events are happening. However, the tsc on average updates the touch point's x and y value every ~100 ms which is much slower than the advertised rate of 100+ Hz. This leads to multiple reads within this ~100 ms time window returning the same value. Example: X: 10 , Y: 30 X: 10 , Y: 30 X: 10, Y: 30 .. // After 100 ms X: 300, Y: 300 X: 300, y: 300 .. // After 100 ms X: 1743, Y: 621 X: 1743, Y: 621 For some reason if instead of starting to read at register 0x2 you start reading at register 0x0 this issue isn't seen. This seems like a quirk only seen in the EDT FT5506 so to fix this issue simply adjust the code to start reading from 0x0. Technically this isn't wrong so no regressions should be seen with other touchscreen controllers supported by this driver. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: edt-ft5x06 - add support for FT5506Franklin S Cooper Jr2015-10-171-1/+7
| | | | | | | | | | | | | | | | | | | | | FT5506 is essentially the same as other FT5x06 devices other than supporting 10 support points. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: edt-ft5x06 - add support for different max support pointsFranklin S Cooper Jr2015-10-171-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the code so that the maximum supported points aren't hard coded but can be changed. Set the maximum support points based on the data passed along side the compatible field. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: edt-ft5x06 - use max support points to determine how much to readFranklin S Cooper Jr2015-10-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Calculate the amount of data that needs to be read for the specified max number of support points. If the maximum number of support points changes then the amount that is read from the touch screen controller should reflect this. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: rotary-encoder - add support for quarter-period modeEzequiel Garcia2015-10-171-5/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some encoders have both outputs low in stable states, others also have a stable state with both outputs high (half-period mode) and some have a stable state in all steps (quarter-period mode). The driver used to support the former states and with this change it can also support the later. This commit also deprecates the 'half-period' property and introduces a new property 'steps-per-period'. This property specifies the number of steps (stable states) produced by the rotary encoder for each GPIO period. Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: rotary-encoder - use of_property_read_boolBen Gamari2015-10-171-8/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | This commit makes uses of_property_read_bool() to read boolean properties. This is just cosmetic cleanup. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: document and check on implicitly defined FF_MAX_EFFECTSElias Vanderstuyft2015-10-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an undocumented upper bound for the total number of ff effects: FF_GAIN (= 96). This can be found as follows: - user: write(EV_FF, effect_id, iterations) calls kernel: ff->playback(effect_id, ...): starts effect "effect_id" - user: write(EV_FF, FF_GAIN, gain) calls kernel: ff->set_gain(gain, ...): sets gain A collision occurs when effect_id equals FF_GAIN. According to input_ff_event(), FF_GAIN is the smallest value where a collision occurs. Therefore the greatest safe value for effect_id is FF_GAIN - 1, and thus the total number of effects should never exceed FF_GAIN. Define FF_MAX_EFFECTS as FF_GAIN and check on this limit in ff-core. Signed-off-by: Elias Vanderstuyft <elias.vds@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: gpio_keys_polled - add support for abs/rel axisHans de Goede2015-10-151-9/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changAdd support for EV_ABS / EV_REL events to the gpio-keys-polled driver. The driver already allows specifying what type of events (key / rel / abs) a button generates when pressed, but for rel / abs axis we also need to specify which value this specific gpio represents. One use case is digital joysticks / direction-pads which are hooked up to gpio, in this case we've left and right buttons which we want to map to EV_ABS, ABS_X and we want generate events for left with a value of -1 and for right with a value of +1 (and similar for up / down and ABS_Y). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: pixcir_i2c_ts - remove wakeirq related code from pixcir driverVignesh R2015-10-141-12/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | With commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree") wakeirq is managed by i2c-core, so remove wakeirq related code from pixcir_i2c_ts driver. Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: rotary_encoder - add wake up supportSylvain Rochet2015-10-141-0/+37
| | | | | | | | | | | | | | | | | | | | | This patch adds wake up support to GPIO rotary encoders. Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: improve autorepeat initializationPetri Gynther2015-10-141-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new function input_enable_softrepeat() that allows drivers to initialize their own values for input_dev->rep[REP_DELAY] and input_dev->rep[REP_PERIOD], but also use the software autorepeat functionality from input.c. For example, a HID driver could do: static void xyz_input_configured(struct hid_device *hid, struct hid_input *hidinput) { input_enable_softrepeat(hidinput->input, 400, 100); } static struct hid_driver xyz_driver = { .input_configured = xyz_input_configured, } Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: xpad - query wireless controller state at initPavel Rojtberg2015-10-101-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we initialize the driver/device, we really don't know how many controllers are connected. So send a "query presence" command to the base-station. (Command discovered by Zachary Lund) Presence packet taken from: https://github.com/computerquip/xpad5 Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: xpad - move the input device creation to a new functionPierre-Loup A. Griffais2015-10-101-92/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To allow us to later create / destroy the input device from the urb callback, we need to initialize/ deinitialize the input device from a separate function. So pull that logic out now to make later patches more "obvious" as to what they do. Signed-off-by: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: xpad - x360w: report dpad as buttons and axesPavel Rojtberg2015-10-101-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>
| | * Input: xpad - factor out URB submission in xpad_play_effectPavel Rojtberg2015-10-101-71/+69Star
| | | | | | | | | | | | | | | | | | | | | 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>
| | * Input: xpad - remove needless bulk out URB used for LED setupPavel Rojtberg2015-10-101-78/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Input: xpad - use ida() for finding the pad_nrPavel Rojtberg2015-10-101-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>
| | * Input: xpad - clarify LED enumerationPavel Rojtberg2015-10-101-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>
| | * Input: xpad - fix Razer Atrox Arcade Stick button mappingDario Scarpa2015-10-101-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>
| | * Input: xpad - add Covert Forces edition of the Xbox One controllerErik Lundgren2015-10-101-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>
| | * Input: ft6236 - change module license string to match copyright noticeDmitry Torokhov2015-10-101-1/+1
| | | | | | | | | | | | | | | | | | The copyright/license notice says that the code is licensed under GPL v2 only (not GPL v2+), so let's use proper string in MODULE_LICENSE(). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>