aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
AgeCommit message (Collapse)AuthorFilesLines
2017-05-01Input: twl4030-pwrbutton - use input_set_capability() helperSebastian Reichel1-2/+1
Cleanup driver slightly by using input_set_capability() instead of manually setting the required bits. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-05-01Input: twl4030-pwrbutton - use correct device for irq requestSebastian Reichel1-1/+1
The interrupt should be requested for the platform device and not for the input device. Fixes: 7f9ce649d267 ("Input: twl4030-pwrbutton - simplify driver using devm_*") Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-05-01Input: ar1021_i2c - enable touch mode during openMartin Kepplinger1-0/+15
The device could as well be in command mode, in which this driver cannot handle the device. When opening the device, let's make sure the device will be in the mode we expect it to be for this driver. Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-28Merge branch 'for-linus' of ↵Linus Torvalds1-0/+7
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fix from Dmitry Torokhov: "Yet another quirk to i8042 to get touchpad recognized on some laptops" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add Clevo P650RS to the i8042 reset list
2017-04-27input: touchscreen: mxs-lradc: || vs && typosDan Carpenter1-3/+3
These tests are meaningless as is because "adapt" can't possibly be both less than 1 and greater than 32. Fixes: d81ca730e3e4 ("input: touchscreen: mxs-lradc: Add support for touchscreen") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-04-27Merge branches 'ib-mfd-gpio-4.12', 'ib-mfd-iio-input-4.12', ↵Lee Jones6-0/+853
'ib-mfd-input-4.12', 'ib-mfd-leds-4.12', 'ib-mfd-phy-4.12' and 'ib-mfd-pinctrl-samsung-4.12' into ibs-for-mfd-merged
2017-04-24Input: i8042 - add Clevo P650RS to the i8042 reset listDmitry Torokhov1-0/+7
Clevo P650RS and other similar devices require i8042 to be reset in order to detect Synaptics touchpad. Reported-by: Paweł Bylica <[email protected]> Tested-by: Ed Bordin <[email protected]> Cc: [email protected] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=190301 Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-21Merge branch 'for-linus' of ↵Linus Torvalds1-0/+8
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixlet from Dmitry Torokhov: "An update to Elan PS/2 driver to allow working on yet another Lifebook" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled
2017-04-20Annotate hardware config module parameters in drivers/input/David Howells3-4/+4
When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/input/. Suggested-by: Alan Cox <[email protected]> Signed-off-by: David Howells <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> cc: [email protected]
2017-04-19Input: xen-kbdfront - add module parameter for setting resolutionJuergen Gross1-25/+14
Add a parameter for setting the resolution of xen-kbdfront in order to be able to cope with a (virtual) frame buffer of arbitrary resolution. While at it remove the pointless second reading of parameters from Xenstore in the device connection phase: all parameters are available during device probing already and that is where they should be read. Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-18Input: elantech - add Fujitsu Lifebook E547 to force crc_enabledThorsten Leemhuis1-0/+8
Temporary got a Lifebook E547 into my hands and noticed the touchpad only works after running: echo "1" > /sys/devices/platform/i8042/serio2/crc_enabled Add it to the list of machines that need this workaround. Cc: [email protected] Signed-off-by: Thorsten Leemhuis <[email protected]> Reviewed-by: Ulrik De Bie <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-14Merge branch 'for-linus' of ↵Linus Torvalds1-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
2017-04-14Input: synaptics-rmi4 - enable IRQ operation in F34 V7Nick Dyer3-68/+83
The polled firmware update proved unreliable when testing on S7817. Use attention to signal commands are complete. Signed-off-by: Nick Dyer <[email protected]> Tested-by: Chris Healy <[email protected]> Acked-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-14Input: synaptics-rmi4 - change F12 clip to inactive border debugNick Dyer1-11/+7
The data in F12_2D_Ctrl8 corresponds to the inactive border width used by the RMI device. It is not in pixel units and should not be treated as a clip value. Signed-off-by: Nick Dyer <[email protected]> Tested-by: Chris Healy <[email protected]> Acked-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-14Input: synaptics-rmi4 - use dev_driver_string when registering interruptNick Dyer1-1/+1
When IRQ handling was moved to rmi_driver in 3aeed5b the naming of the interrupt changed from "rmi4_i2c" to "2-0020" (or similar). This patch restores the previous behaviour and makes the interrupt easier to identify in /proc/interrupts. Signed-off-by: Nick Dyer <[email protected]> Tested-by: Chris Healy <[email protected]> Acked-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-14Input: ar1021_i2c - highlight support for AR1020Martin Kepplinger2-5/+5
ar1021_i2c also supports the ar1020 device I'm using. This is tested. They also share the same datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/40001393C.pdf So let users see that they have a compatible in front of them by adding AR1020 to the driver's description. Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-14Input: ar1021_i2c - do not force raising edge IRQ triggerDmitry Torokhov1-1/+1
We should not be forcing edge triggered interrupt, but rather let platform decide the kind of trigger it needs to use. Also, the driver is not quite safe with regard to edge-triggered interrupts as it does not try to kick the controller after requesting/enabling IRQ. Reviewed-By: Christian Gmeiner <[email protected]> Tested-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-14Input: ar1021_i2c - fix too long name in driver's device tableDmitry Torokhov1-1/+1
The name field in structure i2c_device_id is 20 characters, and we expect it to be NULL-terminated, however we are trying to stuff it with 21 bytes and thus NULL-terminator is lost. This causes issues when one creates device with name "MICROCHIP_AR1021_I2C" as i2c core cuts off the last "C", and automatic module loading by alias does not work as result. The -I2C suffix in the device name is superfluous, we know what bus we are dealing with, so let's drop it. Also, no other driver uses capitals, and the manufacturer name is normally not included, except in very rare cases of incompatible name collisions. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116211 Fixes: dd4cae8bf166 ("Input: Add Microchip AR1021 i2c touchscreen") Reviewed-By: Christian Gmeiner <[email protected]> Tested-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-12Input: ar1021_i2c - coding style fixesMartin Kepplinger1-2/+2
Use the common kernel coding style and corrently align parameters with open parenthesis. Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-12Input: lpc32xx_ts - check for clk_prepare_enable() errorFabio Estevam1-5/+8
clk_prepare_enable() may fail, so we 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]>
2017-04-12Input: imx6ul_tsc - fix error handlingFabio Estevam1-3/+12
If imx6ul_tsc_init() fails we should not return directly. We should disable the previously acquired clocks in this case. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-11input: cpcap-pwrbutton: New driverSebastian Reichel3-0/+128
Motorola CPCAP is a PMIC found in multiple smartphones. This driver adds support for the power/on button and has been tested in Droid 4. Acked-by: Rob Herring <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-04-10Input: omap-keypad - fix error handling codeChristophe JAILLET1-1/+1
According to the previous error handling code, it is likely that 'goto err_free_keymap' is expected here in order to avoid a memory leak in error handling path. Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-10Input: xpad - add support for Razer Wildcat gamepadCameron Gutman1-0/+2
Cc: [email protected] Signed-off-by: Cameron Gutman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-10Input: xpad - support some quirky Xbox One padsCameron Gutman1-13/+101
There are several quirky Xbox One pads that depend on initialization packets that the Microsoft pads don't require. To deal with these, I've added a mechanism for issuing device-specific initialization packets using a VID/PID-based quirks list. For the initial set of init quirks, I have added quirk handling from Valve's Steam Link xpad driver[0] and the 360Controller project[1] for macOS to enable some new pads to work properly. This should enable full functionality on the following quirky pads: 0x0e6f:0x0165 - Titanfall 2 gamepad (previously fully non-functional) 0x0f0d:0x0067 - Hori Horipad (analog sticks previously non-functional) 0x24c6:0x541a - PowerA Xbox One pad (previously fully non-functional) 0x24c6:0x542a - PowerA Xbox One pad (previously fully non-functional) 0x24c6:0x543a - PowerA Xbox One pad (previously fully non-functional) [0]: https://github.com/ValveSoftware/steamlink-sdk/blob/master/kernel/drivers/input/joystick/xpad.c [1]: https://github.com/360Controller/360Controller Signed-off-by: Cameron Gutman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-10Input: yealink - define packet offset __be16 instead of u16Martin Kepplinger1-1/+1
sparse says warning: incorrect type in assignment (different base types) expected unsigned short [unsigned] [usertype] offset got restricted __be16 [usertype] <noident> for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the first place shouldn't hurt. Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-10Input: turbografx - use setup_timerGeliang Tang1-3/+1
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-10Input: locomokbd - use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-10Input: gameport - use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-10Input: db9 - use setup_timerGeliang Tang1-3/+1
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-10Input: soc_button_array - properly map usage 0x07/0xe3 to KEY_LEFTMETAHans de Goede1-1/+1
When submitting the support for the ACPI0011 windows tablet keys device I mapped the "windows" logo homekey to KEY_HOMEPAGE. But this is inconsistent with how it is done on windows tablets using the old PNP0C40 ACPI device and it does not match the HUT spec, which says that usage-page 7 usage 0xe3 is "Keyboard Left GUI". This commit maps usage-page 7 usage 0xe3 to KEY_LEFTMETA fixing this. Fixes: 4c3362f44980 ("Input: soc_button_array - add support for ACPI 6.0...") Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-05Input: pm8xxx-vib - add support for pm8916's vibratorDamien Riegel2-1/+11
Add pm8xxx_regs for this PMIC and the device tree match table entry. Signed-off-by: Damien Riegel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-05Input: pm8xxx-vib - handle separate enable registerDamien Riegel1-1/+10
Some PMIC vibrator IPs use a separate enable register to turn the vibrator on and off. To detect if a vibrator uses this feature, rely on the enable_mask being non-zero. Signed-off-by: Damien Riegel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-05Input: pm8xxx-vib - parametrize the driverDamien Riegel1-16/+33
In order to prepare this driver to support other vibrators of the same kind, move some hardcoded values to a structure holding register parameters (address, mask, shit of the control register). Signed-off-by: Damien Riegel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-05Input: pm8xxx-vib - reorder header alphabeticallyDamien Riegel1-4/+4
Signed-off-by: Damien Riegel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-05Input: sur40 - fix bad endianness handling in sur40_pollMartin Kepplinger1-1/+1
sparse says: sur40.c:372:40: warning: restricted __le32 degrades to integer the header's data is __le32 so we need to convert it before comparing. Signed-off-by: Martin Kepplinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-05Input: eeti_ts - switch to gpiod APIDmitry Torokhov1-17/+7
gpiod API allows standard way of specifying GPIO polarity and takes it into account when reading or setting GPIO state. It also allows us to switch to common way of obtaining GPIO descriptor and away form legacy platform data. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-05Input: eeti_ts - expect platform code to set interrupt triggerDmitry Torokhov1-5/+1
Instead of keying interrupt trigger off GPIO polarity, let's rely on platform code to set it up properly for us. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: eeti_ts - switch to using threaded interruptDmitry Torokhov1-43/+36
Instead of having standard interrupt handler and manually firing work item to perform I2C reads, let's switch to threaded interrupts, which were designed specifically for this purpose. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: eeti_ts - use gpio_get_value_cansleepDmitry Torokhov1-1/+1
We are reading GPIO state in a non-atomic context (workqueue), so we can use "cansleep" variant, and thus make the driver available on systems where GPIO controllers require sleeping when reading GPIO state. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: eeti_ts - respect interrupt set in client structureDmitry Torokhov1-7/+6
Instead of expecting that GPIO is always interrupt source, let's use interrupt specified in I2C client. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: eeti_ts - switch to using managed resourcesDmitry Torokhov1-48/+22
Using devm_* APIs simpifies error handling and device teardown. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: eeti_ts - use input_set_capability()Dmitry Torokhov1-2/+1
Use input_set_capability() instead of manipulating evbit/keybit masks directly. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: eeti_ts - use get_unaligned_be16() to retrieve dataDmitry Torokhov1-2/+4
Instead of manually converting big endian data on wire into host endianness, let's use helpers to do that for us. It might save us a few cycles if host endianness matches what's on wire. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: eeti_ts - use BIT(n)Dmitry Torokhov1-4/+4
Use idiomatic BIT(n) to form single-bit masks. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: eeti_ts - rename eeti_ts_priv to eeti_tsDmitry Torokhov1-57/+58
Also rename 'priv' variables to eeti. Reviewed-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: synaptics-rmi4 - when registering sensors do not call them "drivers"Dmitry Torokhov3-69/+69
We are not registering drivers, but transport devices (AKA sensors), so let's call them that. Also let's rename "retval" to "error" in probe() functions as the variables are used to store error codes. Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: synaptics-rmi4 - cleanup SMbus mapping handlingDmitry Torokhov1-25/+18
There is no reason to copy structures field-by-filed when we can copy elements at once. Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: synaptics-rmi4 - fix endianness issue in SMBus transportDmitry Torokhov1-5/+5
The mapping table holds address in LE form, so we should convert it to CPU when comparing it. Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-04-03Input: synaptics-rmi4 - fix handling failures from rmi_enable_sensorDmitry Torokhov1-3/+8
If rmi_enable_sensor() fails in rmi_driver_probe(), we should not return immediately, but disable IRQs and tear down function list. Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>