aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-08-19Input: i8042 - set up shared ps2_cmd_mutex for AUX portsDmitry Torokhov1-0/+1
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 <[email protected]> Tested-by: Bruno Wolff III <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-08-04Input: silead - remove some dead codeDan Carpenter1-3/+0
buf[0] is an unsigned char. touch_nr is an int. The test for negative here doesn't make sense so I have removed it. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-08-04Input: sis-i2c - select CONFIG_CRC_ITU_TArnd Bergmann1-0/+1
The newly added sis_i2c driver fails to link without the CRC_ITU_T driver enabled: drivers/input/touchscreen/sis_i2c.o: In function `sis_ts_irq_handler': sis_i2c.c:(.text+0xc0): undefined reference to `crc_itu_t' This adds a Kconfig select statement. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: a485cb037fe6 ("Input: add driver for SiS 9200 family I2C touchscreen controllers") Signed-off-by: Dmitry Torokhov <[email protected]>
2016-08-03Merge branch 'next' into for-linusDmitry Torokhov19-70/+1246
Prepare second round of input updates for 4.8 merge window.
2016-08-03Input: add driver for SiS 9200 family I2C touchscreen controllersMika Penttilä5-0/+460
This is a driver for SiS 9200 family touchscreen controllers using I2C bus. Signed-off-by: Mika Penttilä <[email protected]> Acked-by: Tammy Tseng <[email protected]> Acked-by: Yuger Yu <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-08-02Input: ili210x - fix permissions on "calibrate" attributeDmitry Torokhov1-1/+1
"calibrate" attribute does not provide "show" methods and thus we should not mark it as readable. Signed-off-by: Dmitry Torokhov <[email protected]>
2016-08-02Input: elan_i2c - properly wake up touchpad on ASUS laptopsKT Liao1-16/+63
Some ASUS laptops were shipped with touchpads that require to be woken up first, before trying to switch them into absolute reporting mode, otherwise touchpad would fail to work while flooding the logs with: elan_i2c i2c-ELAN1000:00: invalid report id data (1) Among affected devices are Asus E202SA, N552VW, X456UF, UX305CA, and others. We detect such devices by checking the IC type and product ID numbers and adjusting order of operations accordingly. Signed-off-by: KT Liao <[email protected]> Reported-by: Chris Chiu <[email protected]> Reported-by: Vlad Glagolev <[email protected]> Tested-by: Vlad Glagolev <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-08-02Input: add driver for Silead touchscreensRobert Dolca4-0/+617
This driver adds support for Silead touchscreens. It has been tested with GSL1680 and GSL3680 touch panels. It supports ACPI and device tree enumeration. Screen resolution, the maximum number of fingers supported and firmware name are configurable. Signed-off-by: Robert Dolca <[email protected]> Signed-off-by: Daniel Jansen <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-08-02Input: elantech - fix debug dump of the current packetBenjamin Tissoires1-6/+2
The use of mixed psmouse_printk() and printk creates 2 lines in the log, while the use of %*ph solves everything. Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-27Input: rotary_encoder - support binary encoding of statesUwe Kleine-König2-1/+26
It's not advisable to use this encoding, but to support existing devices add support for this to the driver. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-27Input: xpad - power off wireless 360 controllers on suspendCameron Gutman1-0/+43
When the USB wireless adapter is suspended, the controllers lose their connection. This causes them to start flashing their LED rings and searching for the wireless adapter again, wasting the controller's battery power. Instead, we will tell the controllers to power down when we suspend. This mirrors the behavior of the controllers when connected to the console itself and how the official Xbox One wireless adapter behaves on Windows. Signed-off-by: Cameron Gutman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-27Input: i8042 - break load dependency between atkbd/psmouse and i8042Dmitry Torokhov4-32/+24
As explained in [email protected] 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 <[email protected]> Tested-by: Mark Laws <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-26Input: synaptics-rmi4 - do not check for NULL when calling of_node_put()Markus Elfring1-4/+1
The of_node_put() 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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-26Input: cros_ec_keyb - cleanup use of devDouglas Anderson1-10/+9
In cros_ec_keyb we stored "dev" in "struct cros_ec_keyb", but this was the EC's dev pointer and not the keyboard's. Let's clean this up to make it the keyboard's dev pointer. This could be useful in future patches but also has the nice effect of changing a few printouts to include the name of the keyboard device instead of the EC device, so we will see: [ 1.224648] cros-ec-keyb ff110000.spi:ec@0:keyboard-controller: valid_keys[00] = 0x14 instead of: [ 1.224505] cros-ec-spi spi0.0: valid_keys[00] = 0x14 Signed-off-by: Douglas Anderson <[email protected]> Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-26Merge branch 'next' into for-linusDmitry Torokhov42-139/+2932
Prepare first round of input updates for 4.8 merge window.
2016-07-20Input: tty/vt/keyboard - use memdup_user()Muhammad Falak R Wani1-10/+4
Use memdup_user to duplicate a memory region from user-space to kernel-space, instead of open coding using kmalloc & copy_from_user. Signed-off-by: Muhammad Falak R Wani <[email protected]> Reviewed-by: Samuel Thibault <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-20Input: tsc200x - report proper input_dev nameMichael Welling4-6/+25
Passes input_id struct to the common probe function for the tsc200x drivers instead of just the bustype. This allows for the use of the product variable to set the input_dev->name variable according to the type of touchscreen used. Note that when we introduced support for TSC2004 we started calling everything TSC200X, so let's keep this quirk. Signed-off-by: Michael Welling <[email protected]> Cc: [email protected] Acked-by: Pavel Machek <[email protected]> Acked-by: Pali Rohár <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-20tty/vt/keyboard: fix OOB access in do_compute_shiftstate()Dmitry Torokhov1-21/+9
The size of individual keymap in drivers/tty/vt/keyboard.c is NR_KEYS, which is currently 256, whereas number of keys/buttons in input device (and therefor in key_down) is much larger - KEY_CNT - 768, and that can cause out-of-bound access when we do sym = U(key_maps[0][k]); with large 'k'. To fix it we should not attempt iterating beyond smaller of NR_KEYS and KEY_CNT. Also while at it let's switch to for_each_set_bit() instead of open-coding it. Reported-by: Sasha Levin <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-19Input: synaptics-rmi4 - fix maximum size check for F12 control register 8Andrew Duggan1-4/+5
According to the RMI4 spec the maximum size of F12 control register 8 is 15 bytes. The current code incorrectly reports an error if control 8 is greater then 14. Making sensors with a control register 8 with 15 bytes unusable. Signed-off-by: Andrew Duggan <[email protected]> Reported-by: Chris Healy <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-19Input: pegasus_notetaker - set device mode in reset_resume() if in useMartin Kepplinger1-1/+13
Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-19Input: pegasus_notetaker - cancel workqueue's work in suspend()Martin Kepplinger1-0/+1
Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-19Input: pegasus_notetaker - fix usb_autopm calls to be balancedMartin Kepplinger1-14/+19
We should only "put" the interface if submitting URB or setting tablet mode in pegasus_open() fails, otherwise leave it to pegasus_close(). Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-19Input: pegasus_notetaker - handle usb control msg errorsMartin Kepplinger1-9/+20
Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-19Input: wacom_w8001 - handle errors from input_mt_init_slots()Ping Cheng1-1/+7
input_mt_init_slots() may fail and we should be handling failures properly. Signed-off-by: Ping Cheng <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-19Input: wacom_w8001 - resolution wasn't set for ABS_MT_POSITION_X/YPing Cheng1-0/+2
Signed-off-by: Ping Cheng <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-19Merge branch 'for-linus' into nextDmitry Torokhov10007-248274/+507405
Sync up to bring in wacom_w8001 changes to avoid merge conflicts later.
2016-07-15Input: pixcir_ts - add support for axis inversion / swappingHans de Goede1-33/+20
Add support for axis inversion / swapping using the new touchscreen_parse_properties() and touchscreen_set_mt_pos() functionality. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-15Input: icn8318 - use of_touchscreen helpers for inverting / swapping axesHans de Goede1-47/+14
Use the touchscreen_parse_properties() and touchscreen_report_pos() to perform coordinates transformation, instead of DIY code, which results in a nice cleanup. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-15Input: edt-ft5x06 - add support for inverting / swapping axesHans de Goede1-3/+4
Add support for inverting / swapping axes using the new touchscreen_parse_properties() and touchscreen_report_pos() functionality. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-15Input: of_touchscreen - add support for inverted / swapped axesHans de Goede7-7/+105
Extend touchscreen_parse_properties() with support for the touchscreen-inverted-x/y and touchscreen-swapped-x-y properties and add touchscreen_set_mt_pos() and touchscreen_report_pos() helper functions for storing coordinates into a input_mt_pos struct, or directly reporting them, taking these properties into account. This commit also modifies the existing callers of touchscreen_parse_properties() to pass in NULL for the new third argument, keeping the existing behavior. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-15Input: ts4800-ts - add missing of_node_put after calling of_parse_phandlePeter Chen1-6/+7
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-14Input: synaptics-rmi4 - use the RMI_F11_REL_BYTES define in ↵Andrew Duggan1-2/+2
rmi_f11_rel_pos_report The size of relative data in F11 is already defined by RMI_F11_REL_BYTES. Use the define in rmi_f11_rel_pos_report() to be consistent. Signed-off-by: Andrew Duggan <[email protected]> Reviewed-by: Nick Dyer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-14Input: synaptics-rmi4 - remove unneeded variableAndrew Duggan1-4/+1
Remove the data_base_addr_offset variable in rmi_f11_attention(). The f11 data is read as a single block so there is no need to store an offset to the data address. Signed-off-by: Andrew Duggan <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Reviewed-by: Nick Dyer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-14Input: synaptics-rmi4 - remove pointer to rmi_function in f12_dataAndrew Duggan1-1/+0
The pointer to struct rmi_function in f12_data is never set and was never used. The fn pointer is also stored in rmi_2d_sensor which is a member of f12_data. Signed-off-by: Andrew Duggan <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Reviewed-by: Nick Dyer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-14Input: synaptics-rmi4 - use of_get_child_by_name() to fix refcountAndrew Duggan1-2/+2
Calling of_find_node_by_name() assumes that the caller has incremented the refcount of the of_node being passed in. Currently, the caller is not incrementing the refcount of the of_node which results in the node being prematurely freed when of_find_node_by_name() calls of_node_put() on it. Instead use of_get_child_by_name() which does not call put on the of_node. Signed-off-by: Andrew Duggan <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-14Revert "Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE"Dmitry Torokhov1-0/+3
This reverts commit 5f7e5445a2de848c66d2d80ba5479197e8287c33 because removal of input_mt_report_slot_state() means we no longer generate tracking IDs for the reported contacts. Cc: [email protected] Acked-by: Peter Hutterer <[email protected]> Acked-by: Ping Cheng <[email protected]>
2016-07-13Input: synaptics-rmi4 - support regulator suppliesBjorn Andersson2-0/+55
Support the two supplies - vdd and vio - to make it possible to control power to the Synaptics chip. Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Acked-by: Rob Herring <[email protected]> Reviewed-by: Andrew Duggan <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-13Input: raydium_i2c_ts - check CRC of incoming packetsJeffrey Lin1-19/+43
Check CRC of incoming touch packets to ensure that we do not operate on corrupted data. Signed-off-by: Jeffrey Lin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-13Input: xen-kbdfront - prefer xenbus_write() over xenbus_printf() where possibleJan Beulich1-4/+4
... as being the simpler variant. Signed-off-by: Jan Beulich <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-07-13Input: fix a double word "is is" in include/linux/input.hMasanari Iida1-1/+1
This patch fix a double word "is is" found in in Documentation/DocBook/device-drivers.xml. It is because the file was created from comments in sources, so I have to fix the double words in include/linux/input.h Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-29Input: xpad - validate USB endpoint count during probeCameron Gutman1-0/+3
This prevents a malicious USB device from causing an oops. Signed-off-by: Cameron Gutman <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-29Input: add SW_PEN_INSERTED defineDouglas Anderson1-0/+1
Some devices with a pen may have a switch that can be used to detect when the pen is inserted or removed to a slot on the device. Let's add a define to the input event codes so that everyone can be on the same page for what event we should generate when the pen is inserted or removed. In general the pen switch could be used by the software on the device to kick off any number of actions when the pen is inserted or removed. Signed-off-by: Douglas Anderson <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-23Input: vmmouse - remove port reservationSinclair Yeh1-20/+2
The VMWare EFI BIOS will expose port 0x5658 as an ACPI resource. This causes the port to be reserved by the APCI module as the system comes up, making it unavailable to be reserved again by other drivers, thus preserving this VMWare port for special use in a VMWare guest. This port is designed to be shared among multiple VMWare services, such as the VMMOUSE. Because of this, VMMOUSE should not try to reserve this port on its own. The VMWare non-EFI BIOS does not do this to preserve compatibility with existing/legacy VMs. It is known that there is small chance a VM may be configured such that these ports get reserved by other non-VMWare devices, and if this ever happens, the result is undefined. Signed-off-by: Sinclair Yeh <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Cc: <[email protected]> # 4.1- Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-23Input: add powerkey driver for HISI 65xx SoCJorge Ramirez-Ortiz3-0/+152
This driver provides a input driver for the power button on the HiSi 65xx SoC for boards like HiKey. This driver was originally by Zhiliang Xue <[email protected]> then basically rewritten by Jorge, but preserving the original module author credits. Signed-off-by: Jorge Ramirez-Ortiz <[email protected]> [jstultz: Reworked commit message, folded in other fixes/cleanups from Jorge, implemented some larger cleanups suggested by DmitryT] Signed-off-by: John Stultz <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-23Input: elantech - add more IC body types to the listDmitry Torokhov1-7/+1
The touchpad in HP Pavilion 14-ab057ca reports it's version as 12 and according to Elan both 11 and 12 are valid IC types and should be identified as hw_version 4. Reported-by: Patrick Lessard <[email protected]> Tested-by: Patrick Lessard <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-23Input: wacom_w8001 - ignore invalid pen data packetsPing Cheng1-0/+9
ThinkPad X60 Tablet PC (pen only device) sometime posts packets that are larger than W8001_PKTLEN_TPCPEN. Reported-by: Chris J Arges <[email protected]> Tested-by: Chris J Arges <[email protected]> Signed-off-by: Ping Cheng <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-23Input: wacom_w8001 - w8001_MAX_LENGTH should be 13Ping Cheng1-1/+1
Somehow the patch that added two-finger touch support forgot to update W8001_MAX_LENGTH from 11 to 13. Signed-off-by: Ping Cheng <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-23Input: apanel - spelling mistake - "skiping" -> "skipping"Colin Ian King1-1/+1
trivial fix to spelling mistake in pr_notice message Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-23Input: ams_delta_serio - fix spelling mistake: "paritiy" -> "parity"Colin Ian King1-1/+1
trivial fix to spelling mistake in dev_warn message Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2016-06-23Input: tegra-kbc - fix spelling mistake: "porperly" -> "properly"Colin Ian King1-1/+1
trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>