aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
AgeCommit message (Collapse)AuthorFilesLines
2019-11-11Input: ili210x - do not set parent device explicitlyDmitry Torokhov1-1/+0
We are using devm_input_allocate_device() that set's up the parent for us, no need to do it ourselves. Tested-by: Adam Ford <[email protected]> #imx6q-logicpd Tested-by: Sven Van Asbroeck <[email protected]> # ILI2118A variant Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-11Input: ili210x - handle errors from input_mt_init_slots()Dmitry Torokhov1-1/+6
input_mt_init_slots() may fail and we need to handle such failures. Tested-by: Adam Ford <[email protected]> #imx6q-logicpd Tested-by: Sven Van Asbroeck <[email protected]> # ILI2118A variant Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-11Input: ili210x - switch to using threaded IRQDmitry Torokhov1-61/+56
Let's switch the driver to using threaded IRQ so that we do not need to manage the interrupt and work separately, and we do not acknowledge interrupt until we finished handling it completely. Tested-by: Adam Ford <[email protected]> #imx6q-logicpd Tested-by: Sven Van Asbroeck <[email protected]> # ILI2118A variant Tested-by: Marek Vasut <[email protected]> # ILI2117 Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-11Input: ili210x - add ILI2117 supportMarek Vasut1-1/+45
Add support for ILI2117 touch controller. This controller is similar to the ILI210x and ILI251x, except for the following differences: - Reading out of touch data must happen at most 300 mS after the interrupt line was asserted. No command must be sent, the data are returned upon pure I2C read of 43 bytes long. - Supports 10 simultaneous touch inputs. - Touch data format is slightly different. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Rob Herring <[email protected]> # for DT binding Tested-by: Adam Ford <[email protected]> #imx6q-logicpd Tested-by: Sven Van Asbroeck <[email protected]> # ILI2118A variant Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-11Input: ar1021 - fix typo in preprocessor macro nameFlavio Suligoi1-2/+2
Fix spelling mistake. Signed-off-by: Flavio Suligoi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-04Input: synaptics-rmi4 - simplify data read in rmi_f54_workLucas Stach1-32/+16
The body of the for loop is only ever run once as the second standard_report element is never changed from its initial zero init, so the loop condition is never satisfies after the first run. Equally the start member of the first element is never changed from 0, so the index offset is always a constant 0. Remove this needless obfuscation of the code and write it in a straight forward manner. Signed-off-by: Lucas Stach <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-04Input: synaptics-rmi4 - remove unused result_bits maskAndrew Duggan1-4/+1
The result_bits mask is no longer used by the driver and should be removed. Signed-off-by: Andrew Duggan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-04Input: synaptics-rmi4 - do not consume more data than we have (F11, F12)Andrew Duggan2-4/+4
Currently, rmi_f11_attention() and rmi_f12_attention() functions update the attn_data data pointer and size based on the size of the expected size of the attention data. However, if the actual valid data in the attn buffer is less then the expected value then the updated data pointer will point to memory beyond the end of the attn buffer. Using the calculated valid_bytes instead will prevent this from happening. Signed-off-by: Andrew Duggan <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-04Input: synaptics-rmi4 - disable the relative position IRQ in the F12 driverAndrew Duggan1-2/+26
This patch fixes an issue seen on HID touchpads which report finger positions using RMI4 Function 12. The issue manifests itself as spurious button presses as described in: https://www.spinics.net/lists/linux-input/msg58618.html Commit 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain") switched the RMI4 driver to using an irq_domain to handle RMI4 function interrupts. Functions with more then one interrupt now have each interrupt mapped to their own IRQ and IRQ handler. The result of this change is that the F12 IRQ handler was now getting called twice. Once for the absolute data interrupt and once for the relative data interrupt. For HID devices, calling rmi_f12_attention() a second time causes the attn_data data pointer and size to be set incorrectly. When the touchpad button is pressed, F30 will generate an interrupt and attempt to read the F30 data from the invalid attn_data data pointer and report incorrect button events. This patch disables the F12 relative interrupt which prevents rmi_f12_attention() from being called twice. Signed-off-by: Andrew Duggan <[email protected]> Reported-by: Simon Wood <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-11-04Input: synaptics-rmi4 - fix video buffer sizeLucas Stach1-1/+1
The video buffer used by the queue is a vb2_v4l2_buffer, not a plain vb2_buffer. Using the wrong type causes the allocation of the buffer storage to be too small, causing a out of bounds write when __init_vb2_v4l2_buffer initializes the buffer. Signed-off-by: Lucas Stach <[email protected]> Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: kxtj9 - switch to using polled mode of input devicesDmitry Torokhov2-122/+37
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts kxtj9 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. note that with regular input devices handling polling, there is no longer a benefit in having separate INPUT_KXTJ9_POLLED_MODE config option. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: kxtj9 - switch to using managed resourcesDmitry Torokhov1-58/+28
Using devm API allows to clean up error handling and drop the remove() method. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: bma150 - switch to using polled mode of input devicesDmitry Torokhov2-112/+44
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts bma150 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: bma150 - use managed resources helpersJonathan Bakker1-37/+14
The driver can be cleaned up by using managed resource helpers. Signed-off-by: Jonathan Bakker <[email protected]> Signed-off-by: Paweł Chmiel <[email protected]> [dtor: do not explicitly set parent of input device since we are using devm] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: mma8450 - switch to using polled mode of input devicesDmitry Torokhov2-56/+46
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts mma8450 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: gpio_decoder - switch to using polled mode of input devicesDmitry Torokhov2-20/+23
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts gpio_decoder driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: rb532_button - switch to using polled mode of input devicesDmitry Torokhov2-16/+17
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts rb532_button driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: rb532_button - switch to using managed resourcesDmitry Torokhov1-18/+2
Using devm API allows us to clean up error handling paths and drop the remove() method. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: sgi_btns - switch to using polled mode of input devicesDmitry Torokhov2-13/+13
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts sgi_btns driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: sgi_btns - switch to using managed resourcesDmitry Torokhov1-29/+8
Switching to devm API allows to clean up error handling paths and drop the remove() method. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: cobalt_btns - switch to using polled mode of input devicesDmitry Torokhov2-13/+14
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts cobalt_btns driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: cobalt_btns - convert to use managed resourcesDmitry Torokhov1-40/+17
This simplifies error handling and allows to remove cobalt_buttons_remove() method. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: wistron_btns - switch to using polled mode of input devicesDmitry Torokhov2-25/+27
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts wistron_btns driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: apanel - switch to using polled mode of input devicesDmitry Torokhov2-90/+64
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts apanel driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. While at it, let's convert the driver to use devm. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: gpio_keys_polled - switch to using polled mode of input devicesDmitry Torokhov2-32/+34
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts gpio_keys_polled driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Note that we still keep polled and non-polled gpio-keys drivers separate, as they are different enough and mixing them up would make the code pretty confusing. Acked-by: Andy Shevchenko <[email protected]> Acked-by: Marco Felsch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: jornada680_kbd - switch to using polled mode of input devicesDmitry Torokhov2-19/+19
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts jornada680_kbd driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Acked-by: Marco Felsch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: clps711x-keypad - switch to using polled mode of input devicesDmitry Torokhov2-42/+29
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts clps711x-keypad driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Also use managed API when allocating input device, this allows us to remove clps711x_keypad_remove() method. Acked-by: Andy Shevchenko <[email protected]> Acked-by: Marco Felsch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: adc-keys - switch to using polled mode of input devicesDmitry Torokhov2-18/+19
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts adc-keys driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Acked-by: Marco Felsch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: tsc6507x-ts - switch to using polled mode of input devicesDmitry Torokhov2-20/+17
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts tsc6507x-ts driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: ts4800-ts - switch to using polled mode of input devicesDmitry Torokhov2-31/+38
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts ts4800-ts driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: sur40 - switch to using polled mode of input devicesDmitry Torokhov2-40/+53
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts sur40 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: raspberrypi-ts - switch to using polled mode of input devicesDmitry Torokhov2-19/+20
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts raspberrypi-ts driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-29Input: psxpad-spi - switch to using polled mode of input devicesDmitry Torokhov2-31/+34
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts psxpad-spi driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191001220421.GA66693@dtor-ws Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: edt-ft5x06 - add support for regulatorMylène Josserand1-0/+30
Add the support for enabling optional regulator that may be used as VCC source. Signed-off-by: Mylène Josserand <[email protected]> Signed-off-by: Ondrej Jirman <[email protected]> Reviewed-by: Rob Herring <[email protected]> # bindings Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: st1232 - switch to using MT-B protocolDmitry Torokhov1-54/+56
Switch the driver to the slotted variant of multitouch protocol (MT-B) with in-kernel tracking of the contacts. Tested-by: Matthias Fend <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: st1232 - note that the receive buffer is DMA-safeDmitry Torokhov1-1/+1
The receiving buffer is allocated separately from the main driver data structure, and is naturally DMA-safe, so mark it as such when building I2C transfer message. Tested-by: Matthias Fend <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: st1232 - do not set parent device explicitlyDmitry Torokhov1-1/+0
devm_input_allocate_device() already sets parent device for us. Tested-by: Matthias Fend <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: st1232 - do not allocate fingers data separatelyDmitry Torokhov1-10/+6
The finger structure size is quite small and allocating it together with the main driver structure will not increase likelyhood of allocation failing, but reduces number of objects needing to be tracked by the allocator and devm. Tested-by: Matthias Fend <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: st1232 - do not reset the chip too earlyDmitry Torokhov1-10/+12
We should not be putting the chip into reset while interrupts are enabled and ISR may be running. Fix this by installing a custom devm action and powering off the device/resetting GPIO line from there. This ensures proper ordering. Tested-by: Matthias Fend <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: st1232 - rely on I2C core to configure wakeup interruptDmitry Torokhov1-10/+6
When I2C client is created with I2C_CLIENT_WAKE flag (which happens either because we have "wakeup-source" device property or the flag was passed in when creating an I2C client manually), I2C core will take care of configuring interrupt as wakeup source on suspend. Tested-by: Matthias Fend <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: st1232 - do not unconditionally configure as wakeup sourceDmitry Torokhov1-1/+0
Do not unconditionally configure the touchscreen as wakeup source but rather rely on I2C core to do that when requested (either via "wakeup-source" device property, or when creating a client with I2C_CLIENT_WAKE flag). Tested-by: Matthias Fend <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-28Input: st1232 - simplify parsing of read bufferDmitry Torokhov1-25/+25
Avoid complex 2-variable loop when parsing touchscreen data to make the code clearer. Acked-by: Martin Kepplinger <[email protected]> Tested-by: Matthias Fend <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-27Input: wacom_i2c - remove unneeded gpio.h header fileFabio Estevam1-1/+0
There is no gpio functions used in the driver that is exported by the gpio.h header, so remove this unneeded header. Signed-off-by: Fabio Estevam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-27Input: s3c2410_ts - remove unneeded gpio.h header fileFabio Estevam1-1/+0
There is no gpio functions used in the driver that is exported by the gpio.h header, so remove this unneeded header. Signed-off-by: Fabio Estevam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-27Input: colibri-vf50-ts - remove unneeded gpio.h header fileFabio Estevam1-1/+0
The touchscreen device is a GPIO consumer, not a GPIO controller, so there is no need to include <linux/gpio.h>. Remove the unneeded header file. Signed-off-by: Fabio Estevam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-27Input: gpio_keys_polled - switch to using devm_fwnode_gpiod_get()Dmitry Torokhov1-4/+3
devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-27Input: gpio_keys - switch to using devm_fwnode_gpiod_get()Dmitry Torokhov1-4/+2
devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov <[email protected]>
2019-10-27Merge tag 'v5.4-rc5' into nextDmitry Torokhov11-83/+115
Sync up with mainline.
2019-10-25Merge branch 'for-linus' of ↵Linus Torvalds1-2/+4
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fix from Dmitry Torokhov: "A fix for st1232 driver to properly report coordinates for 2nd and subsequent fingers when more than one is on the surface" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: st1232 - fix reporting multitouch coordinates
2019-10-23Input: adp5589 - make keypad support optionalLars-Peter Clausen1-73/+98
On some platforms the adp5589 is used in GPIO only mode. On these platforms we do not want to register a input device, so make that optional and only create the input device if a keymap is supplied. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Alexandru Ardelean <[email protected]> Link: https://lore.kernel.org/r/[email protected] [dtor: dropped unnecessary changes related to passing pdata to various functions] Signed-off-by: Dmitry Torokhov <[email protected]>