aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/apanel.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2019-02-16Input: db9 - mark expected switch fall-throughGustavo A. R. Silva1-1/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/input/joystick/db9.c: In function ‘db9_saturn_read_packet’: drivers/input/joystick/db9.c:256:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (tmp == 0xff) { ^ drivers/input/joystick/db9.c:263:2: note: here default: ^~~~~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-16Input: qt2160 - remove redundant spinlockSven Van Asbroeck1-9/+0
Remove a spinlock which prevents schedule_delayed_work() and mod_delayed_work() from executing concurrently. This was required back when mod_delayed_work() did not exist, and had to be implemented with a cancel + schedule. See commit e7c2f967445d ("workqueue: use mod_delayed_work() instead of __cancel + queue") schedule_delayed_work() and mod_delayed_work() can now be used concurrently. So the spinlock is no longer needed. Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-16Input: st1232 - handle common DT bindingsMatthias Fend2-2/+8
This is required to specify generic touchscreen properties via DT. Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-16Input: ims-pcu - switch to using brightness_set_blocking()Dmitry Torokhov1-19/+8
Now that LEDs core allows "blocking" flavor of "set brightness" method we can use it and get rid of private work item. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-16Input: st1232 - switch to gpiod APIMartin Kepplinger1-14/+11
Use devm_gpiod_get_optional() and gpiod_set_value_cansleep() instead of the old API. The st1232_ts_power() now passes on the inverted "poweron" value to reflect the correct logical value. Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-11Revert "Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G"Dmitry Torokhov1-1/+0
This reverts commit 7db54c89f0b30a101584e09d3729144e6170059d as it breaks Acer Aspire V-371 and other devices. According to Elan: "Acer Aspire F5-573G is MS Precision touchpad which should use hid multitouch driver. ELAN0501 should not be added in elan_i2c." Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202503 Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-11Input: qt2160 - switch to using brightness_set_blocking()Dmitry Torokhov1-42/+27
Now that LEDs core allows "blocking" flavor of "set brightness" method we can use it and get rid of private work items. Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-09Input: ili210x - fetch touchscreen geometry from DTMarek Vasut1-40/+11
Fetching the geometry from the ILI251x registers seems unreliable and sometimes returns all zeroes. Add support for fetching the geometry and axis inversion from DT instead. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-09Input: msm-vibrator - tweak an error messageDan Carpenter1-2/+1
The PTR_ERR(NULL) value is zero and it's not useful to print that. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-09Input: matrix_keypad - use flush_delayed_work()Dmitry Torokhov1-1/+1
We should be using flush_delayed_work() instead of flush_work() in matrix_keypad_stop() to ensure that we are not missing work that is scheduled but not yet put in the workqueue (i.e. its delay timer has not expired yet). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-09Input: ps2-gpio - flush TX work when closing portDmitry Torokhov1-0/+1
To ensure that TX work is not running after serio port has been torn down, let's flush it when closing the port. Reported-by: Sven Van Asbroeck <thesven73@gmail.com> Acked-by: Danilo Krummrich <danilokrummrich@dk-develop.de> Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-09Input: cap11xx - switch to using set_brightness_blocking()Dmitry Torokhov1-24/+11
Updating LED state requires access to regmap and therefore we may sleep, so we could not do that directly form set_brightness() method. Historically we used private work to adjust the brightness, but with the introduction of set_brightness_blocking() we no longer need it. As a bonus, not having our own work item means we do not have use-after-free issue as we neglected to cancel outstanding work on driver unbind. Reported-by: Sven Van Asbroeck <thesven73@gmail.com> Reviewed-by: Sven Van Asbroeck <TheSven73@googlemail.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-07Input: elantech - enable 3rd button support on Fujitsu CELSIUS H780Matti Kurkela1-0/+9
Like Fujitsu CELSIUS H760, the H780 also has a three-button Elantech touchpad, but the driver needs to be told so to enable the middle touchpad button. The elantech_dmi_force_crc_enabled quirk was not necessary with the H780. Also document the fw_version and caps values detected for both H760 and H780 models. Signed-off-by: Matti Kurkela <Matti.Kurkela@iki.fi> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-07Input: tm2-touchkey - acknowledge that setting brightness is a blocking callDmitry Torokhov1-5/+5
We need to access I2C bus when switching brightness, and that may block, therefore we have to set stmfts_brightness_set() as LED's brightness_set_blocking() method. Fixes: 72d1f2346ded ("Input: tm2-touchkey - add touchkey driver support for TM2") Acked-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-07Input: stmfts - acknowledge that setting brightness is a blocking callDmitry Torokhov1-14/+16
We need to turn regulators on and off when switching brightness, and that may block, therefore we have to set stmfts_brightness_set() as LED's brightness_set_blocking() method. Fixes: 78bcac7b2ae1 ("Input: add support for the STMicroelectronics FingerTip touchscreen") Acked-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-07Input: ili210x - switch to using devm_device_add_group()Dmitry Torokhov1-14/+2
By switching to devm_device_add_group() we can complete driver conversion to using managed resources and get rid of ili210x_i2c_remove(). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - add ILI251X supportMarek Vasut1-15/+103
Add support for ILI251x touch controller. This controller is similar to the ILI210x, except for the following differences: - Does not support I2C R-W transfer, Read must be followed by an obscenely long delay, and then followed by Write - Does support 10 simultaneous touch inputs. - Touch data format is slightly different, pressure reporting does not work although the touch data contain such information. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - add OF match tableMarek Vasut1-0/+7
Add OF match table for the ili210x touchscreen. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - reorder probeMarek Vasut1-16/+16
Perform the register access only after the I2C client data are set, this is only done in preparation for the subsequent patch which uses the I2C client data in the register IO function. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - rework the touchscreen sample processingMarek Vasut1-25/+30
Get rid of the packed structures for representing data as that does not apply to other similar Ilitek touchscreens. Instead, implement a function which parses the data and reports touch events and coordinates. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - convert to devm IRQMarek Vasut1-11/+15
Convert the driver to devm_request_irq(), drop the related unmanaged deregistration code and add ili210x_irq_teardown() to tear the IRQ down and cancel possible touchscreen pending work. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - add reset GPIO supportMarek Vasut1-0/+26
The touchscreen can have a reset GPIO connected to it, add support for such an arrangement. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - convert to devm_ functionsMarek Vasut1-10/+7
Convert the driver to dev-managed allocations. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - drop get_pendown_stateMarek Vasut1-12/+1
The .get_pendown_state callback is set only by the platform data code, which was just removed. Thus, get_pendown_state() always returns false, so drop that altogether. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-06Input: ili210x - drop platform data supportMarek Vasut2-21/+2
There is not a single user of the ili210x platform data in the kernel, just drop it. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>