aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-07-07Input: elan_i2c - change the hover event from MT to STduson1-7/+5
The firmware only reports hover condition while the very first contact is approaching the surface; the hover is not reported for the subsequent contacts. Therefore we should not be using ABS_MT_DISTANCE to report hover but rather its single-touch counterpart ABS_DISTANCE. Signed-off-by: Duson Lin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-07-03Merge branch 'next' into for-linusDmitry Torokhov12-76/+1296
Prepare second round of input updates for 4.2 merge window.
2015-07-01Input: wdt87xx_i2c - add a scaling factor for TOUCH_MAJOR eventHungNien Chen1-5/+14
Get the scaling factor when it reads the sys params. The width value will multiple the factor and report the value in the TOUCH_MAJOR event. Signed-off-by: HungNien Chen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-07-01Input: wdt87xx_i2c - remove stray newline in diagnostic messageDmitry Torokhov1-1/+1
There is no reason to have a newline between plat_id and xml_id1. Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-29Input: arc_ps2 - add HAS_IOMEM dependencySebastian Ott1-0/+1
Fix this compile error: drivers/built-in.o: In function `arc_ps2_probe': /mnt/linux/drivers/input/serio/arc_ps2.c:206: undefined reference to `devm_ioremap_resource' Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-29Input: wdt87xx_i2c - fix format warningDmitry Torokhov1-1/+1
This fixes the following warning: drivers/input/touchscreen/wdt87xx_i2c.c: In function 'wdt87xx_validate_firmware': >> drivers/input/touchscreen/wdt87xx_i2c.c:472:4: warning: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t' [-Wformat=] size, fw->size); Reported-by: kbuild test robot <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-25Input: improve parsing OF parameters for touchscreensDmitry Torokhov4-29/+49
When applying touchscreen parameters specified in device tree let's make sure we keep whatever setup was done by the driver and not reset the missing values to zero. Reported-by: Pavel Machek <[email protected]> Tested-by: Pavel Machek <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-25Input: edt-ft5x06 - mark as direct input deviceDmitry Torokhov1-6/+1
edt-ft5x06 is a touchscreen and thus a direct input device; let's amrk it as such. This also allows us to drop some initialization code as input_init_mt_slots() will do that for us. Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-25Input: use for_each_set_bit() where appropriateAnshul Garg1-25/+9
Instead of iterating over all bits in a bitmap and test them individually let's siwtch to for_each_set_bit() which is more compact and is also faster. Also use bitmap_weight() when counting number of set bits. This also fixes INPUT_DO_TOGGLE() implementation as it should have used *_CNT as the upper boundary, not *_MAX. Signed-off-by: Anshul Garg <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-24Input: add a driver for wdt87xx touchscreen controllerHungNien Chen3-0/+1153
This is a driver for Weida HiTech WDT87xx series touchscreen controller. Signed-off-by: HungNien Chen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-24Input: axp20x-pek - fix reporting button state as invertedHans de Goede1-2/+6
Currently we are reporting the button state as inverted on all boards with an axp209 pmic, tested on a ba10-tvbox, bananapi, bananapro, cubietruck and utoo-p66 tablet. The axp209 datasheet clearly states that the power button must be connected between the PWRON key and ground. Which means that on a press we will get a falling edge (dbf) irq not a rising one, and likewise on release we will get a rising edge (dbr) irq, not a falling one. This commit swaps the check for the 2 irqs fixing the inverted reporting of the power button state. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Acked-by: Carlo Caione <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-22Input: xpad - re-send LED command on present eventPavel Rojtberg1-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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-22Input: xpad - set the LEDs properly on XBox Wireless controllersPierre-Loup A. Griffais1-5/+45
Based on Patch by Pierre-Loup A. Griffais <[email protected]>: 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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-22Input: imx_keypad - check for clk_prepare_enable() errorFabio Estevam1-1/+3
clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-22Merge branch 'next' into for-linusDmitry Torokhov53-374/+1277
Prepare first round of input updates for 4.2 merge window.
2015-06-16Input: pixcir_i2c_ts - fix receive errorFrodo Lai1-1/+1
The i2c_master_recv() uses readsize to receive data from i2c but compares to size of rdbuf which is always 27. This would cause problem when the max_fingers is not 5. Change the comparison value to readsize instead. Fixes: 36874c7e219 ("Input: pixcir_i2c_ts - support up to 5 fingers and hardware tracking IDs:) Cc: [email protected] Signed-off-by: Frodo Lai <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-16MAINTAINERS: remove non existent input mt git treeBaruch Siach1-1/+0
The "INPUT MULTITOUCH (MT) PROTOCOL" entry git tree is not there on git.kernel.org. Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-16Input: improve usage of gpiod APIUwe Kleine-König3-21/+6
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Simplify drivers accordingly. Note that in the case of the drv260x driver error checking is more strict now because -ENOSYS is reported to the caller now. But this should only be returned if GPIOLIB is disabled which shouldn't happen as the driver depends on GPIOLIB. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-16tty/vt/keyboard: define LED triggers for VT keyboard lock statesSamuel Thibault1-8/+19
In addition to defining triggers for VT LED states, let's define triggers for VT keyboard lock states, such as "kbd-shiftlock", "kbd-altgrlock", etc. This permits to fix #7063 from userland by using a modifier to implement proper CapsLock behavior and have the keyboard caps lock led show that modifier state. Signed-off-by: Samuel Thibault <[email protected]> Tested-by: Pavel Machek <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-16tty/vt/keyboard: define LED triggers for VT LED statesSamuel Thibault1-24/+117
Now that input core allows controlling keyboards LEDs via standard LED subsystem triggers let's switch VT keyboard code to make use of this feature. We will define the following standard triggers: "kbd-scrollock", "kbd-numlock", "kbd-capslock", and "kbd-kanalock" which are default triggers for respective LEDs on keyboards. Signed-off-by: Samuel Thibault <[email protected]> Tested-by: Pavel Machek <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-11Input: export LEDs as class devices in sysfsSamuel Thibault5-6/+226
This change creates a new input handler called "leds" that exports LEDs on input devices as standard LED class devices in sysfs and allows controlling their state via sysfs or via any of the standard LED triggers. This allows to re-purpose and reassign LDEs on the keyboards to represent states other than the standard keyboard states (CapsLock, NumLock, etc). The old API of controlling input LEDs by writing into /dev/input/eventX devices is still present and will take precedence over accessing via LEDs subsystem (i.e. it may override state set by a trigger). If input device is "grabbed" then requests coming through LED subsystem will be ignored. Signed-off-by: Samuel Thibault <[email protected]> Tested-by: Pavel Machek <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-11Input: cyttsp4 - use swap() in cyttsp4_get_touch()Fabian Frederick1-4/+1
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-11Input: goodix - do not explicitly set evbits in input deviceDmitry Torokhov1-4/+0
input_mt_init_slots() will do that for us. Reviewed-by: Benjamin Tissoires <[email protected]> Acked-by: Bastien Nocera <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-09Input: goodix - export id and version read from deviceIrina Tirdea1-12/+21
Goodix touchscreens export through their registers a Product ID and Firmware Version. The Product ID is an ASCII encoding of the product name (e.g.: "911"). Export to sysfs (through the input subsystem) the product id and firmware version read from the device rather than using constant values. Signed-off-by: Octavian Purdila <[email protected]> Signed-off-by: Irina Tirdea <[email protected]> Acked-by: Bastien Nocera <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-09Input: goodix - fix variable length array warningIrina Tirdea1-1/+1
Fix sparse warning: drivers/input/touchscreen/goodix.c:182:26: warning: Variable length array is used. Replace the variable length array with fixed length. Some Goodix devices have maximum 5 touch points, while others have 10 touch points. Using the maximum length (80 bytes) for all devices will lead to wasting 40 bytes on stack when using devices with maximum 5 touch points. However, that is preferable to using kmalloc which will use even more resources. Signed-off-by: Irina Tirdea <[email protected]> Acked-by: Bastien Nocera <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-09Input: goodix - fix alignment issuesIrina Tirdea1-8/+8
Fix alignment to match open parenthesis detected by running checkpatch.pl --strict. Signed-off-by: Irina Tirdea <[email protected]> Acked-by: Bastien Nocera <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-09Input: add OnKey driver for DA9063 MFD partSteve Twiss4-0/+238
This adds OnKey driver support for DA9063. Signed-off-by: Steve Twiss <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-08Input: elan_i2c - add product IDs FW namesCharlie Mooney2-7/+18
Previously the elan_i2c touchpad driver would simply request the firmware "/lib/firmware/elan_i2c.bin", which does not work well if there are multiple such devices in the system. Let's append the "product ID" (by using the same function as the sysfs interface for consistency) to the filename. This results in filenames of the form "/lib/firmware/elan_i2c_72.0.bin", allowing you to support multiple elan_i2c touchpads on the same device by simply naming each device's FW with its corresponding product ID. This way when you trigger a fw update the driver will load the correct binary. Signed-off-by: Charlie Mooney <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-08Input: elan_i2c - add support for multi IC type and iap formatDuson Lin4-11/+49
In order to support multiple IC types for i2c/smbus protocol, add get ic type command and use this data when checking firmware page count and signature address. Signed-off-by: Duson Lin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-08Input: synaptics - add min/max quirk for Lenovo S540Peter Hutterer1-1/+6
https://bugzilla.redhat.com/show_bug.cgi?id=1223051#c2 Cc: [email protected] Tested-by: [email protected] Signed-off-by: Peter Hutterer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-04Input: alps - do not reduce trackpoint speed by halfHans de Goede1-3/+2
On some v7 devices (e.g. Lenovo-E550) the deltas reported are typically only in the 0-1 range dividing this by 2 results in a range of 0-0. And even for v7 devices where this does not lead to making the trackstick entirely unusable, it makes it twice as slow as before we added v7 support and were using the ps/2 mouse emulation of the dual point setup. If some kind of generic slowdown is actually necessary for some devices, then that belongs in userspace, not in the kernel. Cc: [email protected] Reported-and-tested-by: Rico Moorman <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-04Input: elantech - add new icbody type洪一竹1-0/+1
This adds new icbody type to the list recognized by Elantech PS/2 driver. Cc: [email protected] Signed-off-by: Sam Hung <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-02Input: focaltech - report finger width to userspaceDmitry Tunin1-0/+13
Focaltech touchpads report finger width in packet[5] of absolute packet. Range for width in raw format is 0x10 - 0x70. Second half-byte is always 0. 0xff is reported, when a large contact area is detected. This can be handled in userspace. Signed-off-by: Dmitry Tunin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-02tty: remove platform_sysrq_reset_seqArnd Bergmann1-18/+1
The platform_sysrq_reset_seq code was intended as a way for an embedded platform to provide its own sysrq sequence at compile time. After over two years, nobody has started using it in an upstream kernel, and the platforms that were interested in it have moved on to devicetree, which can be used to configure the sequence without requiring kernel changes. The method is also incompatible with the way that most architectures build support for multiple platforms into a single kernel. Now the code is producing warnings when built with gcc-5.1: drivers/tty/sysrq.c: In function 'sysrq_init': drivers/tty/sysrq.c:959:33: warning: array subscript is above array bounds [-Warray-bounds] key = platform_sysrq_reset_seq[i]; We could fix this, but it seems unlikely that it will ever be used, so let's just remove the code instead. We still have the option to pass the sequence either in DT, using the kernel command line, or using the /sys/module/sysrq/parameters/reset_seq file. Fixes: 154b7a489a ("Input: sysrq - allow specifying alternate reset sequence") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-06-02Input: elantech - fix detection of touchpads where the revision matches a ↵Hans de Goede1-3/+4
known rate Make the check to skip the rate check more lax, so that it applies to all hw_version 4 models. This fixes the touchpad not being detected properly on Asus PU551LA laptops. Cc: [email protected] Reported-and-tested-by: David Zafra Gómez <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-26Input: synaptics_i2c - use proper boolean valuesShailendra Verma1-3/+3
The variable no_decel is bool type so assigning "true" instead of "1". Also, synaptics_i2c_get_input() has bool return type, so let's use "false" there. Signed-off-by: Shailendra Verma <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-26Input: psmouse - use true instead of 1 for boolean valuesShailendra Verma1-1/+1
The variable psmouse_smartscroll is bool type so assigning true instead of 1. Signed-off-by: Shailendra Verma <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-26Input: cyapa - fix a few typos in commentsShailendra Verma1-14/+9
Signed-off-by: Shailendra Verma <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-26Input: stmpe-ts - enforce device tree only modeDmitry Torokhov3-68/+6
The STMPE MFD is only used with device tree configured systems (and STMPE MFD core depends on OF), so force the configuration to come from device tree only. Tested-by: Heiner Kallweit <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-22Input: stmpe-ts - fix automatic module loadingDmitry Torokhov1-2/+10
When STMPE is instantiated via device tree individual MFD cells rae formed with OF modaliases, not platform modaliases, and so we need to add OF device table to the driver if we want it to load automatically: of:Nstmpe_touchscreenT<NULL>Cst,stmpe-ts Reported-by: Heiner Kallweit <[email protected]> Tested-by: Heiner Kallweit <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-22Input: update email-id of Rajeev KumarRajeev Kumar2-2/+2
[email protected] email-id doesn't exist anymore as I have left the company. Signed-off-by: Rajeev Kumar <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-22Input: sentelic - use "static inline" instead of "inline"Khem Raj1-2/+2
gcc-5 defaults to gnu11 which used c99 inline semantics in c99 'inline' is not externally visible unlike gnu89, therefore we use 'static inline' which has same semantics between gnu89 and c99 Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-21Input: smtpe-ts - wait 50mS until polling for pen-upMarek Vasut1-1/+1
Wait a little bit longer, 50mS instead of 20mS, until the driver starts polling for pen-up. The problematic behavior before this patch is applied is as follows. The behavior was observed on the STMPE610QTR controller. Upon a physical pen-down event, the touchscreen reports one set of x-y-p coordinates and a pen-down event. After that, the pen-up polling is triggered and since the controller is not ready yet, the polling mistakenly detects a pen-up event while the physical state is still such that the pen is down on the touch surface. The pen-up handling flushes the controller FIFO, so after that, all the samples in the controller are discarded. The controller becomes ready shortly after this bogus pen-up handling and does generate again a pen-down interrupt. This time, the controller contains x-y-p samples which all read as zero. Since pressure value is zero, this set of samples is effectively ignored by userland. In the end, the driver just bounces between pen-down and bogus pen-up handling, generating no useful results. Fix this by giving the controller a bit more time before polling it for pen-up. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-21Input: smtpe-ts - use msecs_to_jiffies() instead of HZMarek Vasut1-1/+1
Use msecs_to_jiffies(20) instead of plain (HZ / 50), as the former is much more explicit about it's behavior. We want to schedule the task 20 mS from now, so make it explicit in the code. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-21Input: adxl34x - add OF match supportLaurent Pinchart1-0/+21
The I2C subsystem can match devices without explicit OF support based on the part of their compatible property after the comma. However, this mechanism uses the first compatible value only. For adxl34x OF device nodes the compatible property will contain the more specific "adi,adxl345" or "adi,adxl346" value first. This prevents the device node from being matched with the adxl34x driver. Fix this by adding an OF match table with an "adi,adxl345" compatible entry. There's no need to add the "adi,adxl346" entry as the ADXL346 is backward-compatible with the ADXL345 with differences handled by runtime detection of the device model. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-21DT: i2c: Deprecate adi,adxl34x compatible stringLaurent Pinchart1-2/+1
DT nodes should use the more specific adi,adxl345 and adi,adxl346 compatible values instead. As the ADXL346 is backward-compatible with the ADXL345, ADXL346 nodes must list both adi,adxl346 and adi,adxl345, in that order. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-21Input: cyapa - do not set otherwise unused variableDmitry Torokhov1-2/+1
As the name suggests, always_unused argument in cyapa_gen3_set_power_mode() is never used, so there is no reason for setting it to 0. Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-21Input: joydev - don't classify the vmmouse as a joystickThomas Hellstrom1-0/+61
Joydev is currently thinking some absolute mice are joystick, and that messes up games in VMware guests, as the cursor typically gets stuck in the top left corner. Try to detect the event signature of a VMmouse input device and back off for such devices. We're still incorrectly detecting, for example, the VMware absolute USB mouse as a joystick, but adding an event signature matching also that device would be considerably more risky, so defer that to a later merge window. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: atmel_mxt_ts - use BIT() macro when reporting button stateDmitry Torokhov1-4/+4
This makes the intent a tad more clear. Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: vmmouse - do not reference non-existing version of X driverThomas Hellstrom1-1/+1
The vmmouse Kconfig help text was referring to an incorrect user-space driver version. Fix this. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>