summaryrefslogtreecommitdiffstats
path: root/drivers/input
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' of ↵Linus Torvalds2017-04-151-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Just a small update to xpad driver to recognize yet another gamepad, and another change making sure userio.h is exported" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - add support for Razer Wildcat gamepad uapi: add missing install of userio.h
| * Input: xpad - add support for Razer Wildcat gamepadCameron Gutman2017-04-111-0/+2
| | | | | | | | | | Cc: stable@vger.kernel.org Signed-off-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2017-03-2412-29/+116
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Fixes to various USB drivers to validate existence of endpoints before trying to use them, fixes to APLS v8 protocol, and a couple of i8042 quirks" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ALPS - fix trackstick button handling on V8 devices Input: ALPS - fix V8+ protocol handling (73 03 28) Input: sur40 - validate number of endpoints before using them Input: kbtab - validate number of endpoints before using them Input: hanwang - validate number of endpoints before using them Input: yealink - validate number of endpoints before using them Input: ims-pcu - validate number of endpoints before using them Input: cm109 - validate number of endpoints before using them Input: iforce - validate number of endpoints before using them Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list Input: synaptics-rmi4 - prevent null pointer dereference in f30 Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000
| * Input: ALPS - fix trackstick button handling on V8 devicesMasaki Ota2017-03-171-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | Alps stick devices always have physical buttons, so we should not check ALPS_BUTTONPAD flag to decide whether we should report them. Fixes: 4777ac220c43 ("Input: ALPS - add touchstick support for SS5 hardware") Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Acked-by: Pali Rohar <pali.rohar@gmail.com> Tested-by: Paul Donohue <linux-kernel@PaulSD.com> Tested-by: Nick Fletcher <nick.m.fletcher@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: ALPS - fix V8+ protocol handling (73 03 28)Masaki Ota2017-03-172-16/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | Devices identified as E7="73 03 28" use slightly modified version of V8 protocol, with lower count per electrode, different offsets, and different feature bits in OTP data. Fixes: aeaa881f9b17 ("Input: ALPS - set DualPoint flag for 74 03 28 devices") Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Acked-by: Pali Rohar <pali.rohar@gmail.com> Tested-by: Paul Donohue <linux-kernel@PaulSD.com> Tested-by: Nick Fletcher <nick.m.fletcher@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: sur40 - validate number of endpoints before using themJohan Hovold2017-03-161-0/+3
| | | | | | | | | | | | | | | | | | | | 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. Fixes: bdb5c57f209c ("Input: add sur40 driver for Samsung SUR40... ") Signed-off-by: Johan Hovold <johan@kernel.org> Cc: stable@vger.kernel.org # 3.13 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: kbtab - validate number of endpoints before using themJohan Hovold2017-03-161-0/+3
| | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: hanwang - validate number of endpoints before using themJohan Hovold2017-03-161-0/+3
| | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org # 2.6.37 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: yealink - validate number of endpoints before using themJohan Hovold2017-03-161-0/+4
| | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org # 2.6.14 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: ims-pcu - validate number of endpoints before using themJohan Hovold2017-03-161-0/+4
| | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org # 3.10 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: cm109 - validate number of endpoints before using themJohan Hovold2017-03-161-0/+4
| | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org # 2.6.28 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: iforce - validate number of endpoints before using themJohan Hovold2017-03-161-0/+3
| | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fwMatjaz Hegedic2017-03-101-9/+11
| | | | | | | | | | | | | | | | | | | | | | EeeBook X205TA is yet another ASUS device with a special touchpad firmware that needs to be accounted for during initialization, or else the touchpad will go into an invalid state upon suspend/resume. Adding the appropriate ic_type and product_id check fixes the problem. Signed-off-by: Matjaz Hegedic <matjaz.hegedic@gmail.com> Acked-by: KT Liao <kt.liao@emc.com.tw> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux listDmitry Torokhov2017-03-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | TUXEDO BU1406 does not implement active multiplexing mode properly, and takes around 550 ms in i8042_set_mux_mode(). Given that the device does not have external AUX port, there is no downside in disabling the MUX mode. Reported-by: Paul Menzel <pmenzel@molgen.mpg.de> Suggested-by: Vojtech Pavlik <vojtech@suse.cz> Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: synaptics-rmi4 - prevent null pointer dereference in f30Benjamin Tissoires2017-03-101-0/+4
| | | | | | | | | | | | | | If the platform data has f30_data.disable set, f30 in rmi_f30_config() might be null. Prevent a kernel oops by checking for non-null f30. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000Kai-Heng Feng2017-03-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: rmi4 - f30: detect INPUT_PROP_BUTTONPAD from the button countBenjamin Tissoires2017-03-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | INPUT_PROP_BUTTONPAD is currently only set through the platform data. The RMI4 header doc says that this property is there to force the buttonpad property, so we also need to detect it by looking at the exported buttons count. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | lib/vsprintf.c: remove %Z supportAlexey Dobriyan2017-02-281-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge tag 'gpio-v4.11-1' of ↵Linus Torvalds2017-02-232-18/+8Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.11 cycle Core changes: - Augment fwnode_get_named_gpiod() to configure the GPIO pin immediately after requesting it like all other APIs do. This is a treewide change also updating all users. - Pass a GPIO label down to gpiod_request() from fwnode_get_named_gpiod(). This makes debugfs and the userspace ABI correctly reflect the current in-kernel consumer of a pin taken using this abstraction. This is a treewide change also updating all users. - Rename devm_get_gpiod_from_child() to devm_fwnode_get_gpiod_from_child() to reflect the fact that this function is operating on a fwnode object. This is a treewide change also updating all users. - Make it possible to take multiple GPIOs in a single hog of device tree hogs. - The refactorings switching GPIO chips to use the .set_config() callback using standard pin control properties and providing a backend into the pin control subsystem that were also merged into the pin control tree naturally appear here too. Testing instrumentation: - A whole slew of cleanups and improvements to the mockup GPIO driver. We now have an extended userspace test exercising the subsystem, and we can inject interrupts etc from userspace to fully test the core GPIO functionality. New drivers: - New driver for the Cortina Systems Gemini GPIO controller. - New driver for the Exar XR17V352/354/358 chips. - New driver for the ACCES PCI-IDIO-16 PCI GPIO card. Driver changes: - RCAR: set the irqchip parent device, add fine-grained runtime PM support. - pca953x: support optional RESET control line on the chip. - DaVinci: cleanups and simplifications. Add support for multiple instances. - .set_multiple() and naming of lines on more or less all of the ISA/PCI GPIO controllers. - mcp23s08: refactored to use regmap as a first step to further rewrites and modernizations" * tag 'gpio-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (61 commits) gpio: reintroduce devm_get_gpiod_from_child() gpio: pci-idio-16: Fix PCI BAR index gpio: pci-idio-16: Fix PCI device ID code gpio: mockup: implement event injecting over debugfs gpio: mockup: add a dummy irqchip gpio: mockup: implement naming the lines gpio: mockup: code shrink gpio: mockup: readability tweaks gpio: Add GPIO support for the ACCES PCI-IDIO-16 gpio: Add the devm_fwnode_get_index_gpiod_from_child() helper gpio: Rename devm_get_gpiod_from_child() gpio: mcp23s08: Select REGMAP/REGMAP_I2C to fix build error gpio: ws16c48: Add support for GPIO names gpio: gpio-mm: Add support for GPIO names gpio: 104-idio-16: Add support for GPIO names gpio: 104-idi-48: Add support for GPIO names gpio: 104-dio-48e: Add support for GPIO names gpio: ws16c48: Remove unnecessary driver_data set gpio: gpio-mm: Remove unnecessary driver_data set gpio: 104-idio-16: Remove unnecessary driver_data set ...
| * gpio: Rename devm_get_gpiod_from_child()Boris Brezillon2017-02-042-6/+8
| | | | | | | | | | | | | | | | | | | | | | Rename devm_get_gpiod_from_child() into devm_fwnode_get_gpiod_from_child() to reflect the fact that this function is operating on a fwnode object. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * gpio: Pass GPIO label down to gpiod_requestAlexander Stein2017-01-262-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently all users of fwnode_get_named_gpiod() have no way to specify a label for the GPIO. So GPIOs listed in debugfs are shown with label "?". With this change a proper label is used. Also adjust all users so they can pass a label, properly retrieved from device tree properties. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * gpiolib: Convert fwnode_get_named_gpiod() to configure GPIOAndy Shevchenko2017-01-262-17/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Make fwnode_get_named_gpiod() consistent with the rest of gpiod_get() like API, i.e. configure GPIO pin immediately after request. Besides obvious clean up it will help to configure pins based on firmware provided resources. Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | Merge branch 'next' into for-linusDmitry Torokhov2017-02-21122-2122/+2137
|\ \ | | | | | | | | | Prepare input updates for 4.11 merge window.
| * | Input: zet6223 - export OF device ID as module aliasesJavier Martinez Canillas2017-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I2C core always reports a MODALIAS of the form i2c:<foo> even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Before this patch: $ modinfo drivers/input/touchscreen/zet6223.ko | grep alias alias: i2c:zet6223 After this patch: $ modinfo drivers/input/touchscreen/zet6223.ko | grep alias alias: of:N*T*Czeitec,zet6223C* alias: of:N*T*Czeitec,zet6223 alias: i2c:zet6223 Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Merge tag 'ib-mfd-input-v4.11-1' of ↵Dmitry Torokhov2017-02-151-44/+406
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next Merge in cros-ec changes applied through MFD branch to resolve conflicts.
| | * | input: cros_ec_keyb: Add Tablet Mode switchGwendal Grignou2017-02-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add switch to report tablet mode. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Enric Balletbo Serra <enric.balletbo@collabora.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| | * | input: cros_ec_keyb: Add non-matrix buttons and switchesDouglas Anderson2017-02-081-45/+402
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some newer boards using mkbp we're hooking up non-matrix buttons and switches to the EC but NOT to the main application processor. Let's add kernel support to handle this. Rather than creating a whole new input driver, we'll continue to use cros_ec_keyb and just report the new keys. Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | Input: tsc2004/5 - switch to using generic device propertiesDmitry Torokhov2017-02-121-63/+30Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of supporting legacy platform data (of which we have no mainline users) and OF-based properties, let's switch to generic device properties. This will still allow legacy boards to use the driver (by defining property sets and attaching them to the drivers) and will simplify probe and make driver usable on ACPI-based systems as well. Reviewed-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: tsc2004/5 - fix regulator handlingDmitry Torokhov2017-02-121-12/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of an optional regulator missing, regulator core will return ERR_PTR(-ENOENT) and not NULL, so the check for missing regulator is incorrect. Also, the regulator is not optional, it may simply be missing from platform description, so let's use devm_regulator_get() and rely on regulator core to give us dummy supply when real one is not available. Fixes: d257f2980feb ("Input: tsc2005 - convert to gpiod") Acked-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: tsc2005 - add OF device tableDmitry Torokhov2017-02-121-1/+11
| | | | | | | | | | | | | | | | | | | | | To be prepared for SPI module loading using full compatible strings from device tree, let's add OF module device table data. Reviewed-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: add driver for Zeitec ZET6223Jelle van der Waa2017-02-093-0/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a basic driver for the Zeitec ZET6223 I2C touchscreen controllers. The driver does not support firmware loading, which is not required for all tablets which contain this chip. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: joydev - do not report stale values on first openRaphael Assenat2017-02-091-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Input: synaptics-rmi4 - forward upper mechanical buttons to PS/2 guestBenjamin Tissoires2017-02-093-16/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the latest series of ThinkPads, the button events for the TrackPoint are reported through the touchpad itself as opposed to the TrackPoint device. In order to report these buttons properly, we need to forward them to the TrackPoint device and notify psmouse to send the button presses/releases. Signed-off-by: Lyude Paul <thatslyude@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: synaptics-rmi4 - clean up F30 implementationDmitry Torokhov2017-02-091-182/+144Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does several cleanup changes to F30 code - switch to using BIT() macro - use DIV_ROUND_UP() where appropriate - factor out code setting up and reporting buttons - use single loop when reporting buttons: arithmetic is cheap compared to conditionals and associated branch misprediction. Tested-By: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: synaptics - use SERIO_OOB_DATA to handle trackstick buttonsDmitry Torokhov2017-02-092-14/+13Star
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using custom method of "passing" extended buttons from the touchpad to trackstick, let's switch to the newly introduced SERIO_OOB_DATA channel. Tested-By: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: psmouse - add a custom serio protocol to send extra informationBenjamin Tissoires2017-02-092-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tracksticks on the Lenovo thinkpads have their buttons connected through the touchpad device. We already fixed that in synaptics.c, but when we switch the device into RMI4 mode to have proper support, the pass-through functionality can't deal with them easily. We add a new PS/2 flag and protocol designed for psmouse. The RMI4 F03 pass-through can then emit a special set of commands to notify psmouse the state of the buttons. This patch implements the protocol in psmouse, while an other will do the same for rmi4-f03. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()Wei Yongjun2017-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix to return error code -ENOMEM from the devm_kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions from probe") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: xpad - restore LED state after device resumeCameron Gutman2017-02-071-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the LED_CORE_SUSPENDRESUME flag on our LED device so the LED state will be automatically restored by LED core on resume. Since Xbox One pads stop flashing only when reinitialized, we'll send them the initialization packet so they calm down too. Signed-off-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Merge branch 'synaptics-rmi4' into nextDmitry Torokhov2017-02-0610-57/+268
| |\ \ | | | | | | | | | | | | Bring in latest RMI4 support in preparation to the merge window.
| | * | Input: synaptics-rmi4 - add rmi_find_function()Benjamin Tissoires2017-02-062-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a function needs to communicate with an other, it's better to have a way to retrieve this other. Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: synaptics-rmi4 - add sysfs interfaces for hardware IDsNick Dyer2017-02-014-4/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These attributes provide various bits of information which may be enumerated under the RMI4 protocol to user space. This may be useful for displaying the particular version which is in use, or selecting the correct firmware to flash. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: synaptics-rmi4 - add sysfs attribute update_fw_statusNick Dyer2017-02-013-27/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attribute returns the percentage complete. If the firmware update fails, it reports a negative error code. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: synaptics-rmi4 - use local variables consistentlyGuenter Roeck2017-01-222-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a function declares a variable to access a structure element, use it conssistently. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: synaptics-rmi4 - correctly swap clip values if axes are swappedLucas Stach2017-01-161-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The clip values need the same swapping as the maximum values if the sensor axes are swapped. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: synaptics-rmi4 - remove redundant null check on rmi_devColin Ian King2016-12-291-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rmi_dev is currently being dereferenced before it null checked, however, after deeper inspecting, rmi_dev can never be null, so just remove this redundant check. Fixes CoverityScan CID 1391218 ("Dereference before null check") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: synaptics-rmi4 - check for non zero version logically dead codeColin Ian King2016-12-291-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version is a u8, the check for version > 0 means that version can only be zero, so the subsequent check for version != 0 is never true and hence is redudant code and can be removed. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: synaptics-rmi4 - use Kconfig "if" to express dependencyDmitry Torokhov2016-12-291-16/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to repeat "depends on RMI4_CORE" on every bit of RMI4 support, we can guard all of them at once with "if RMI4_CORE". Also use tabs for F03 indentation. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | | Input: xpad - fix stuck mode button on Xbox One S padCameron Gutman2017-02-061-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Xbox One S requires an ack to its mode button report, otherwise it continuously retransmits the report. This makes the mode button appear to be stuck down after it is pressed for the first time. Signed-off-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | | Input: joydev - use clamp() macroDmitry Torokhov2017-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We have a nice macro ensuring that the value is within certain range, let's use it instead of open-coding. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | | Input: refuse to register absolute devices without absinfoDmitry Torokhov2017-02-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If device is supposed to send absolute events (i.e. EV_ABS bit is set in dev->evbit) but dev->absinfo is not allocated, then the driver has done something wrong, and we should not register such device. Otherwise we'll crash later, when driver tries to send absolute event. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>