Commit graph

6166 commits

Author SHA1 Message Date
Dmitry Torokhov
90b9b0d5b3 Merge branch 'iforce' into next
Bring in improvements to driver for I-Force devices.
2019-06-29 23:33:37 -07:00
Tim Schumacher
11518370b3 Input: iforce - add the Saitek R440 Force Wheel
This is added based on the fact that this is an iforce-based device and
that the Windows driver for the R440 works for the Logitech WingMan Formula
Force after replacing the device/vendor IDs.

Signed-off-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:50 -07:00
Dmitry Torokhov
21ae38f855 Input: iforce - use unaligned accessors, where appropriate
Instead of open-coding conversion from/to little-endian, let's
use proper accessors.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:49 -07:00
Dmitry Torokhov
8624dfd10a Input: iforce - drop couple of temps from transport code
Transport initialization code now deals mostly with transport-specific
data, so we can drop couple of temporary variables.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:49 -07:00
Dmitry Torokhov
2178db65cd Input: iforce - drop bus type from iforce structure
It is not needed anymore as behavior is controlled by the transport
operations set up for given device.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:48 -07:00
Dmitry Torokhov
dfad2b1793 Input: iforce - use DMA-safe buffores for USB transfers
USB transport has to use cache line-aligned buffers for transfers to avoid
DMA issues; serio doe snot have such restrictions. Let's move "data_in"
buffer from main driver structure into transport modules and make sure USB
requirements are respected.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:48 -07:00
Dmitry Torokhov
6ac0aec6b0 Input: iforce - allow callers supply data buffer when fetching device IDs
We want to move buffer handling into transport layers as the properties of
buffers (DMA-safety, alignment, etc) are different for different
transports. To allow this, let's allow caller to specify their own buffers
for the results of iforce_get_id_packet() and let transport drivers to
figure what buffers they need to use for transfers.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:23 -07:00
Dmitry Torokhov
633354d191 Input: iforce - only call iforce_process_packet() if initialized
It is excessive to check if device is fully initialized in
iforce_process_packet(), as for USB-conected devices we do not start
collecting reports until the device is fully initialized.

Let's change serio transport code to not call iforce_process_packet()
until device initialization is done.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:23 -07:00
Dmitry Torokhov
2880dcf9cf Input: iforce - signal command completion from transport code
Signalling command completion from iforce_process_packet() does
not make sense, as not all transport use the same data path for
both commands and motion data form the device, that is why USB
code already has to signal command completion iforce_usb_out().

Let's move signalling completion into individual transport
modules.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:22 -07:00
Dmitry Torokhov
d3cc100069 Input: iforce - do not combine arguments for iforce_process_packet()
Current code combines packet type and data length into single argument to
iforce_process_packet() and then has to untangle it. It is much clearer to
simply use separate arguments.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:22 -07:00
Dmitry Torokhov
8a25e05890 Input: iforce - factor out hat handling when parsing packets
This makes code clearer a bit.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:21 -07:00
Dmitry Torokhov
43e61fc77f Input: iforce - update formatting of switch statements
According to our coding style case labels in switch statements should
be aligned with the switch keyword.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:21 -07:00
Dmitry Torokhov
4873586278 Input: iforce - use DMA-safe buffer when getting IDs from USB
When working with USB devices we need to use DMA-safe buffers,
and iforce->edata is not one. Let's rework the code to allocate
temporary buffer (iforce_get_id() is called only during initialization
so there is no reason to have permanent buffer) and use it. While at it,
let's utilize usb_control_msg() API which simplifies code.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:20 -07:00
Dmitry Torokhov
4f99de6d9d Input: iforce - split into core and transport modules
Now that we have moved enough transport details into separate source files
we can change them into transport modules so that they are only loaded when
needed.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:20 -07:00
Dmitry Torokhov
81fd431326 Input: iforce - move transport data into transport modules
This moves transport-specific data from main iforce structure into
transport modules.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:55:19 -07:00
Dmitry Torokhov
501025df2e Input: iforce - add bus type and parent arguments to iforce_init_device()
Note that the parent device for the USB-connected controllers is now
USB interface instead of USB device.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:54:40 -07:00
Dmitry Torokhov
05ca38283a Input: iforce - introduce start and stop io transport ops
Add start_io() and stop_io() transport methods so that core
does not have to know the details.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:54:39 -07:00
Dmitry Torokhov
9381758466 Input: iforce - move command completion handling to serio code
Continue teasing apart protocol-specific bits from core into transport
modules. This time move RS232-specific command completion handling
from core to iforce-serio module.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:54:39 -07:00
Dmitry Torokhov
2a1433ff08 Input: iforce - move get_id to the transport operations
To avoid #ifdef-ing out parts of the code and having conditionals in normal
control flow, let's define "get_id" transport method and move
implementation into respective transport modules.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:54:38 -07:00
Dmitry Torokhov
38d107690d Input: iforce - introduce transport ops
In order to tease apart the driver into core and transport modules, let's
introduce transport operations and make "xmit" the very first one such
operation.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:54:38 -07:00
Dmitry Torokhov
f7f3651e08 Input: iforce - remove "being used" silliness
The kernel is supposed to handle multiple devices, static flags
in packet handling code will never work.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:54:37 -07:00
Gustavo A. R. Silva
002cdb95dc Input: gpio_keys - use struct_size() in devm_kzalloc()
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct gpio_keys_drvdata {
	...
        struct gpio_button_data data[0];
};

size = sizeof(struct gpio_keys_drvdata) + count * sizeof(struct gpio_button_data);
instance = devm_kzalloc(dev, size, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = devm_kzalloc(dev, struct_size(instance, data, count), GFP_KERNEL);

Notice that, in this case, variable size is not necessary, hence it
is removed.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:36:24 -07:00
Gustavo A. R. Silva
3d4149ec87 Input: gpio_keys_polled - use struct_size() in devm_kzalloc()
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct gpio_keys_polled_dev {
	...
        struct gpio_keys_button_data data[0];
};

size = sizeof(struct gpio_keys_polled_dev) + count * sizeof(struct gpio_keys_button_data);
instance = devm_kzalloc(dev, size, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = devm_kzalloc(dev, struct_size(instance, data, count), GFP_KERNEL);

Notice that, in this case, variable size is not necessary, hence it
is removed.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-22 23:34:57 -07:00
YueHaibing
b02f6b6b71 Input: tca8418 - remove set but not used variable 'max_keys'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/input/keyboard/tca8418_keypad.c: In function tca8418_keypad_probe:
drivers/input/keyboard/tca8418_keypad.c:269:24: warning: variable max_keys set but not used [-Wunused-but-set-variable]

It's not used since commit 16ff7cb184 ("Input:
tca8418-keypad - switch to using managed resources")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 19:01:42 -07:00
YueHaibing
b89a9f2f70 Input: synaptics-rmi4 - remove set but not used variable 'sensor_flags'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/input/rmi4/rmi_f12.c: In function rmi_f12_read_sensor_tuning:
drivers/input/rmi4/rmi_f12.c:76:6: warning: variable sensor_flags set but not used [-Wunused-but-set-variable]

It's not used since introduction in
commit b43d2c1e93 ("Input: synaptics-rmi4 - add support for F12")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 19:01:40 -07:00
Benjamin Tissoires
66f4c7765a Input: elantech - remove P52 and P72 from SMBus blacklist
Both now works correctly over SMBus. Let's use this driver so we can
update all five fingers every 8ms.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:47 -07:00
Benjamin Tissoires
140a79523e Input: elan_i2c - handle physical middle button
Some models have a middle button, we should export it as well.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:46 -07:00
Benjamin Tissoires
3abcc5329a Input: elantech/SMBus - export all capabilities from the PS/2 node
The recent touchpads might not have all the information regarding the
characteristics through the I2C port.
On some Lenovo t480s, this results in the touchpad not being detected
as a clickpad, and on the Lenovo P52, this results in a failure while
fetching the resolution through I2C.

We need to imitate the Windows behavior: fetch the data under PS/2, and
limit the querries under I2C.

This patch prepares this by exporting the info from PS/2.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:45 -07:00
Benjamin Tissoires
e3a9a12906 Input: elan_i2c - do not query the info if they are provided
See the previous patch for a long explanation.

TL;DR: the P52 and the t480s from Lenovo can't rely on I2C to fetch
the information, so we need it from PS/2.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:44 -07:00
Benjamin Tissoires
fd1cf11f71 Input: elantech - detect middle button based on firmware version
Looks like the new generation of Lenovo machine also need to
be added to the PnPID whitelist. This is definitively not going
to scale, as there is nothing that tells us currently if a
touchpad supports a true physical middle button.

Consider that all new touchpads that are not clickpads
(so matching ETP_NEW_IC_SMBUS_HOST_NOTIFY) are handling 3 physical
buttons.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:41 -07:00
Benjamin Tissoires
88463497dd Input: elantech - add helper function elantech_is_buttonpad()
We check for this bit all over the code, better have it defined once
for all.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:40 -07:00
Benjamin Tissoires
37548659bb Input: elantech - query the min/max information beforehand too
For the latest generation of Elantech touchpads, we need to forward
the min/max information from PS/2 to SMBus. Prepare this work
by fetching the information before creating the SMBus companion
device.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:39 -07:00
Dmitry Torokhov
c114dc5e5b Merge branch 'for-linus' into next
Sync up with 'for-linus' branch to avoid merge conflicts with following
patches to Elan touchpad drivers.
2019-05-27 18:48:01 -07:00
Axel Lin
b62f97634a Input: iqs5xx - remove redundant dev_set_drvdata call
Calling i2c_set_clientdata() is enough.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Jeff LaBundy <jeff@labundy.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-23 13:54:44 -07:00
Andrey Smirnov
7c7da40da1 Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOAD
In the case of compat syscall ioctl numbers for UI_BEGIN_FF_UPLOAD and
UI_END_FF_UPLOAD need to be adjusted before being passed on
uinput_ioctl_handler() since code built with -m32 will be passing
slightly different values. Extend the code already covering
UI_SET_PHYS to cover UI_BEGIN_FF_UPLOAD and UI_END_FF_UPLOAD as well.

Reported-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-23 13:04:37 -07:00
Daniel Smith
0e658060e5 Input: silead - add MSSL0017 to acpi_device_id
On Chuwi Hi10 Plus, the Silead device id is MSSL0017.

Signed-off-by: Daniel Smith <danct12@disroot.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-23 13:04:36 -07:00
Aaron Ma
aa440de305 Input: elantech - enable middle button support on 2 ThinkPads
Adding 2 new touchpad PNPIDs to enable middle button support.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-20 22:46:15 -07:00
Anson Huang
f1222f5ee2 Input: imx6ul_tsc - use devm_platform_ioremap_resource() to simplify code
Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-20 22:45:18 -07:00
Anson Huang
d8ea61c5af Input: imx_keypad - use devm_platform_ioremap_resource() to simplify code
Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-20 22:45:17 -07:00
Wolfram Sang
5f462872a1 Input: da9063_onkey - convert header to SPDX
Convert the header of the source file to SPDX.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-20 22:45:16 -07:00
Wolfram Sang
6981a23561 Input: da9063_onkey - remove platform_data support
There are no in-kernel users anymore, so remove this outdated interface.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-20 22:45:15 -07:00
Daniel Mack
b283d0c353 Input: eeti_ts - read hardware state once after wakeup
For systems in which the touch IRQ is acting as wakeup source, and that do
not support level-driven interrupts, the interrupt controller might not
latch the GPIO IRQ during sleep. In such cases, the interrupt will never
occur again after resume, hence the touch screen appears dead.

To fix this, check for the assertion of the attn gpio, and read form the
controller once in the resume path to read the hardware status and
to arm the IRQ again.

Introduce a mutex to guard eeti_ts_read() against parallel invocations
from different contexts.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reported-by: Sven Neumann <Sven.Neumann@teufel.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-15 16:29:14 -07:00
Ravi Chandra Sadineni
145b11d1ba Input: elan_i2c - increment wakeup count if wake source
Notify the PM core that this device is the wake source. This helps
userspace daemon tracking the wake sources to identify the origin of the
wake.

Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-15 16:25:12 -07:00
Dmitry Torokhov
7f7a020836 Immutable branch between MFD, GPIO, Input, LEDs and Power due for the v5.2 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAlzSuSAACgkQUa+KL4f8
 d2FLbw//TGKv9G/EvNJ96QOW7pq7MawaCpOw2L9XA5pMjqnMU+JeSKlERnFq+Awk
 b19i991wnMBgeU6uU5lj81FTKkd0L/K4X0aY68ClqY48FY9SXk/6u19rFcr4jHJs
 Azy3by8hj7rSGbneCn0mqQ9b5WqNahQsfZpCVd2RdL1M+LkDtzZvrYzv6EVwEiE4
 hZycuB2CNldjwspesfUyU8g5yaVdCPRPfRNNBNlsgAF00l5YP5ddA0LqMUdqVZzy
 yOV83d7a5iQw7+TheuICcOhMqsdtoWxUVZc5Tvz7kLWIg9UaalNJrz2StgBwKe6C
 Gu0DgJJORHzTGEvCiJykFcAw5aNzTZYlPfwWSQlZV32Gl7TjyP4wm2BFX2lXRBKv
 qijMaunYv1ZgAylwL1DysBL2yCS+Fs0Thd/eAputySN0sTMmbuTrbC9+qd7B5L3o
 H8LSfg/0kpDA7C0yyypMmg0jnruPhHhIMLO+q9YOkERWho82Fgp3LS24NoDUXuLi
 jY55bEr4gjLQ6T6CGMFvyOZRBvEIQLDg3XeeVEl8u87QG+ErHN2+ZAlUuxvWo3fM
 aVBsdqGniu19Ob8Vhl2geIJan1EZ0agRsrkIzJY12E72GVUTMnhC1qclJr5IIf1V
 bClzUZ/4vjiT7M08sp0xnI8AAODkipNbIxVr/8WFuvl/xFm3Oq8=
 =hAkf
 -----END PGP SIGNATURE-----

Merge tag 'ib-mfd-gpio-input-leds-power-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next

Sync up with MFD tree to bring in MAX77650 PMIC driver.
2019-05-10 11:45:03 -07:00
Dmitry Torokhov
2a267e7c41 Linux 5.1
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAlzPgx4eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGf8IH/jkes7tKj7pWfsNW
 uMjbm5T+Jh26sntRj+3OWOxcHRlejTH2MammnA9GIspBfF5LXkkmk40eeYhnTiVN
 SzZqSFNLO0tRIHsd7hbxhTyOzHcWmymoEqY1jb8IPMyM5BB8TiS+1C0AVlOW1P/f
 TO1gRcrddu1j80uCInRzNX5eAlvfrU4nK6GxjFdmy6b/bgYQiPfNA+jZbCWxc+48
 ivBn9ifFCKlDzki81Dmi5R98c4R9UU3Z5LsqHjC4RIV64hpHdEwnOIkXQ+XY5mW9
 7EOT1v6hJGch1ulH27ypgSZ7fhSCSYQJIY/LNWeJtdVclvlVepb2Vrx/8NUN60qC
 E0MEn1Y=
 =mCkr
 -----END PGP SIGNATURE-----

Merge tag 'v5.1' into next

Sync up with mainline to bring in the latest APIs.
2019-05-10 11:43:46 -07:00
Dmitry Torokhov
14e0c7317e Merge branch 'next' into for-linus
Prepare input updates for 5.2 merge window.
2019-05-10 11:40:35 -07:00
Bartosz Golaszewski
1af2b76f63 input: max77650: Add onkey support
Add support for the push- and slide-button events for max77650.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-05-08 12:07:07 +01:00
Gustavo A. R. Silva
0981949da8 Input: libps2 - mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warning:

drivers/input/serio/libps2.c: In function ‘ps2_handle_ack’:
drivers/input/serio/libps2.c:407:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (ps2dev->flags & PS2_FLAG_NAK) {
      ^
drivers/input/serio/libps2.c:417:2: note: here
  case 0x00:
  ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

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-05-07 14:13:04 -07:00
Marco Felsch
cbebf5adde Input: qt1050 - add Microchip AT42QT1050 support
Add initial support for the AT42QT1050 (QT1050) device. The device
supports up to five input keys, dependent on the mode. Since it adds only
the initial support, the "1 to 4 keys plus Guard Channel" mode isn't
supported.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-07 14:12:43 -07:00
Jeff LaBundy
7b5bb55d0d Input: add support for Azoteq IQS550/572/525
This patch adds support for the Azoteq IQS550/572/525 family of
trackpad/touchscreen controllers.

The driver has been tested with an IQS550EV02 evaluation board. A
demonstration of the driver's capabilities is available here:

https://youtu.be/sRNNx4XZBts

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-04-30 00:38:51 -07:00