aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-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: 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-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: alps - use the generic process_bitmap function for v5 touchpadsHans de Goede1-62/+12
Now that the generic process_bitmap function has been improved to offer accurate coordinates for the first touch we can use it for v5 (dolphin) touchpads too. Besides being a nice code cleanup this also fixes the saw tooth pattern in the coordinates for the second touch the dolphin specific version had. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: alps - rename alps_set_abs_params_mt to alps_set_abs_params_semi_mtHans de Goede1-8/+8
Rename alps_set_abs_params_mt to alps_set_abs_params_semi_mt, to make it clear that it is only (to be) used for semi-mt devices. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: alps - do not use input-mt finger tracking for semi-mt devicesHans de Goede1-2/+6
With the recent process_bitmap() changes all semi-mt devices always report the first finger down in slot 0, so stop using input-mt finger tracking for these. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: alps - use more accurate coordinates for first touch in semi-mt modeHans de Goede2-7/+53
All alps semi-mt touchpads give us the following data when 2 (or more) fingers are touching: 1 more or less accurate touch for the first finger down, and a bitmap with columns and rows in which 1 or more fingers are seen resulting in a crude (low res) bounding box. So far for v3, rushmore and v4 touchpads we've been reporting the coordinates of 2 opposite corners of the box when 2 fingers are touching. Ignoring the much better resolution data given in the normal position packet. This commit actually uses this data for the first touch, figures out which corner of the bounding box is closest to the first touch, and reports the coordinates of the opposite corner for the second touch, resulting in much better data for the first touch and for the single touch pointer-emulation events. This approach is similar to the one in alps_process_bitmap_dolphin, that function takes the single accurate touch info, calculates the distance to the center of the bounding box, and then puts the 2nd touch mirrored to the center. The downside of that approach is that if both touches move slowly in the same direction, the bounding box will stay the same for a while (as it is low res) and the second touch will thus been seen moving in the opposite direction until the bounding box actually changes, and then the second touch snaps to its new position resulting in a saw tooth pattern in the coordinates for the second touch, hence this new approach. This commit fixes 2 finger scrolling being choppy / jumpy on these touchpads. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: alps - decode the position packet firstHans de Goede1-21/+14
We should decode the position packet before the packet with the bitmap data. This way we can use the more accurate position info in process_bitmap() to get better results. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: alps - only set fields that are actually presentHans de Goede1-29/+33
Pinnacle / Rushmore packets contain either position info, or bitmap info, never both. So far we've in essence been storing garbage in the position / bitmap fields of the fields struct when decoding a bitmap / pos packet. We've been relying on the following sequence to get away with this: 1) Decode bitmap packet 2) Process bitmap packet 3) Decode position packet 4) Use position / button info This patch allows us to change this sequence, which will allow using the position info when processing the bitmap for more accurate results. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: alps - change alps_decode_rushmore to do all decoding itselfHans de Goede1-5/+17
Change alps_decode_rushmore to do all decoding itself, rather then relying on alps_decode_pinnacle and then overriding some fields + or-ing in some bits. This is a preparation patch for modifying the decode functions to properly differentiate between position and bitmap packets. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: ff-core - fix typo in comment to input_ff_erase()Shailendra Verma1-1/+1
Signed-off-by: Shailendra Verma <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-20Input: fix typo in comment to input_handler_for_each_handle()Shailendra Verma1-1/+1
Signed-off-by: Shailendra Verma <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-15Input: wm831x-on - pass the IRQF_ONESHOT flagFabio Estevam1-1/+2
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-15Input: twl6040-vibra - pass the IRQF_ONESHOT flagFabio Estevam1-1/+2
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-15Input: retu-pwrbutton - pass the IRQF_ONESHOT flagFabio Estevam1-1/+2
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-15Input: twl4030-pwrbutton - pass the IRQF_ONESHOT flagFabio Estevam1-1/+2
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-15Input: max7359_keypad - switch to using matrix_keypad_build_keymap()Evgeniy Dushistov2-21/+10
max7359_build_keycode() does the same thing as matrix_keypad_build_keymap(), but the latter can also handle DT bindings. Tested on beagleboard-xm. Signed-off-by: Evgeniy A. Dushistov <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-15Input: max7359_keypad - do not set MAX7359_CFG_INTERRUPT flagEvgeniy Dushistov1-1/+0
In datasheet of max7359 there is the following description of this flag: 0 - INT cleared when FIFO empty, 1 - INT cleared after host read. In this mode, I2C should read FIFO until interrupt condition removed, or further INT may be lost. So, if we set this flag, we have to read FIFO until it becomes empty. But in interrupt we read FIFO just once. This lead to "keyboard" hang until reboot, if we press several keys, because of interrupt handler read just one "press" from FIFO and clear interrupt. Signed-off-by: Evgeniy A. Dushistov <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-15Input: evdev - use kvfree() in evdev_release()Pekka Enberg1-4/+1
Use kvfree() instead of open-coding it. Signed-off-by: Pekka Enberg <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-13Input: soc_button_array - remove duplicated includeWei Yongjun1-1/+0
Remove duplicated include for acpi.h. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-13Input: zforce - remove duplicated includeWei Yongjun1-1/+0
Remove duplicated include for delay.h. Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-08Input: add TI drv2665 haptics driverDan Murphy4-0/+351
Add the TI drv2665 piezo haptic driver. This haptics IC requires the data to be streamed to the FIFO for continuous output. Datasheet can be found at: http://www.ti.com/product/drv2665 Signed-off-by: Dan Murphy <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-08Input: ff-core - fix spelling mistake in ff-coreDan Murphy1-1/+1
Fix spelling of magnitude s/manginude/magnitude Signed-off-by: Dan Murphy <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2015-05-08Input: drv2667 - fix Kconfig error for help screenDan Murphy1-1/+1
Fix the Kconfig for the drv2667 as there was a copy/paste error. Signed-off-by: Dan Murphy <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>