Commit graph

590294 commits

Author SHA1 Message Date
Sangwon Jee ff43f433e0 Input: melfas_mip4 - add maintainer information
Add maintainer information.

Signed-off-by: Sangwon Jee <jeesw@melfas.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-07 16:30:14 -07:00
Sangwon Jee e687abfe9d Input: melfas_mip4 - add devicetree binding documentations
Add devicetree binding documentations.

Signed-off-by: Sangwon Jee <jeesw@melfas.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-07 16:30:13 -07:00
Dmitry Torokhov 62837b3c1a Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled
Another Lifebook machine that needs the same quirk as other similar
models to make the driver working.

Also let's reorder elantech_dmi_force_crc_enabled list so LIfebook enries
are in alphabetical order.

Reported-by: William Linna <william.linna@gmail.com>
Tested-by: William Linna <william.linna@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-07 16:30:12 -07:00
Guenter Roeck 261d7794c4 Input: synaptics-rmi4 - fix error handling in I2C transport driver
Instantiating the rmi4 I2C transport driver without interrupts assigned
(for example using manual i2c instantiation from the command line)
caused the driver to fail to load, but it does not clean up its regulator
or transport device registrations. Result is a crash at a later time,
for example when rebooting the system.

Fixes: 946c8432aa ("Input: synaptics-rmi4 - support regulator supplies")
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-04 11:52:24 -07:00
Guenter Roeck bbc2ceeb32 Input: synaptics-rmi4 - fix error handling in SPI transport driver
Instantiating the rmi4 SPI transport driver without an interrupt assigned
caused the driver to fail to load, but it does not clean up its transport
device registration. Result may be a crash at a later time, for example
when rebooting the system.

Fixes: 8d99758dee ("Input: synaptics-rmi4 - add SPI transport driver")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-04 11:52:23 -07:00
Ben Gamari 574a62c93a Input: ALPS - add V8 protocol documentation
Tested-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Ben Gamari <ben@smart-cactus.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-04 11:47:02 -07:00
Ben Gamari aeaa881f9b Input: ALPS - set DualPoint flag for 74 03 28 devices
Here we introduce logic in alps_identify to set the ALPS_DUALPOINT flag
for touchpad hardware responding to E7 report with 73 03 28, as is found
in the Dell Latitude E7470.

Tested-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Ben Gamari <ben@smart-cactus.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-04 11:47:01 -07:00
Ben Gamari 7ad8a1067d Input: ALPS - allow touchsticks to report pressure
The SS5 hardware can report this.

Tested-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Ben Gamari <ben@smart-cactus.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-04 11:46:54 -07:00
Ben Gamari a831776323 Input: ALPS - handle 0-pressure 1F events
While a button is held SS5 hardware will give us single-finger packets
with x, y, and pressure equal to zero. This causes annoying jumps in
pointer position if a touch is released while the button is held. Handle
this by claiming zero contacts to ensure that no position events are
provided to the user.

Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Ben Gamari <ben@smart-cactus.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-04 11:46:51 -07:00
Ben Gamari 4777ac220c Input: ALPS - add touchstick support for SS5 hardware
Add touchstick support for the so-called SS5 hardware, which uses a
variant of the SS4 protocol.

Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Ben Gamari <ben@smart-cactus.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-04 11:46:41 -07:00
Matti Kurkela f9a703a54d Input: elantech - force needed quirks on Fujitsu H760
Just like Fujitsu CELSIUS H730, the H760 also has an Elantech touchpad with
the same quirks. Without this patch, the touchpad is useless out-of-the-box
as the mouse pointer won't move.

This patch makes the driver aware of both the crc_enabled=1 requirement and
the middle button, making the touchpad fully functional out-of-the-box.

Signed-off-by: Matti Kurkela <Matti.Kurkela@iki.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-03 17:31:57 -07:00
Marcos Paulo de Souza ad3cce0641 Input: elantech - fix Lenovo version typo
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-03 17:28:58 -07:00
Benjamin Tissoires 265d426d74 Input: elan_i2c - fix return tests of i2c_smbus_read_block_data()
i2c_smbus_read_block_data() returns negative errno else the number of
data bytes in the slave's response.

Checking for error not null means the function always fails if the device
answers properly.

So given that we read 3 bytes and access those, better check that we
actually read those 3 bytes.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-03 16:41:00 -07:00
Arnd Bergmann 979987ded3 Input: ektf2127 - mark PM functions as __maybe_unused
The newly added ektf2127 driver uses the SIMPLE_DEV_PM_OPS macro
to conditionally refer to the resume/suspend functions, which
causes a warning when CONFIG_PM_SLEEP is disabled:

drivers/input/touchscreen/ektf2127.c:168:12: error: 'ektf2127_resume' defined but not used [-Werror=unused-function]
drivers/input/touchscreen/ektf2127.c:156:12: error: 'ektf2127_suspend' defined but not used [-Werror=unused-function]

We could either put these functions inside of an #ifdef or
add __maybe_unused annotations. This uses the second approach,
which is generally more foolproof.

Fixes: 9ca5bf5029 ("Input: add support for Elan eKTF2127 touchscreen controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-03 16:36:52 -07:00
Axel Lin d095c500fd Input: snvs_pwrkey - drop input_free_device call if input_register_device fails
Current code uses devm_input_allocate_device() so don't explicitly call
input_free_device if input_register_device fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-26 20:01:59 -07:00
Siebren Vroegindeweij 9ca5bf5029 Input: add support for Elan eKTF2127 touchscreen controller
This adds a driver for the Elan eKTF2127 touchscreen controller,
which speaks an i2c protocol which is distinctly different from
the already supported eKTH controllers.

Signed-off-by: Michel Verlaan <michel.verl@gmail.com>
Signed-off-by: Siebren Vroegindeweij <siebren.vroegindeweij@hotmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-26 20:01:58 -07:00
Hans Verkuil 51db013767 Input: serio - add hangup support
The Pulse-Eight USB CEC adapter is a usb device that shows up as a ttyACM0
device.  It requires that you run inputattach in order to communicate with
it via serio.

This all works well, but it would be nice to have a udev rule to
automatically start inputattach. That too works OK, but the problem comes
when the USB device is unplugged: the tty hangup is never handled by the
serio framework so the inputattach utility never exits and you have to kill
it manually.

By adding this hangup callback the inputattach utility now properly exits
as soon as the USB device is unplugged.

The udev rule I used on my Debian sid system is:

SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1002", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service"

And /etc/systemd/system/pulse8-cec-inputattach@.service is as follows:

===============================================================
[Unit]
Description=inputattach for pulse8-cec device on %I

[Service]
Type=simple
ExecStart=/usr/local/bin/inputattach --pulse8-cec /dev/%I
KillMode=process
===============================================================

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-21 07:57:11 -07:00
Marcin Niestroj 722dc54628 Input: tps65218-pwrbutton - add support for tps65217 variant
The power button found in tps65217 device is very similar to the tps65218,
so let's enhance the driver to support both variants.

This driver enables us to use tps65217's power button as KEY_POWER on
am335x boards (directly connected button in chiliboard, accessible pin
via expansion header in beaglebone). This patch has been tested with
chiliboard.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-10 10:47:49 -07:00
Russell King 3521a0f05d Input: jornada720_ts - get rid of mach/irqs.h and mach/hardware.h includes
Switch the jornada720 touchscreen driver to obtain its gpio from
the platform device via gpiolib and derive the interrupt from the
GPIO, rather than via a hard-coded interrupt number obtained from
the mach/irqs.h and mach/hardware.h headers.

Tested-by: Adam Wysocki <armlinux@chmurka.net>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-10 10:47:48 -07:00
Russell King 72f6d0b9ea Input: jornada720_kbd - remove unneeded mach/hardware.h include
The Jornada720 keyboard driver does not make use of anything from the
mach/hardware.h header, so this header can be removed.

Tested-by: Adam Wysocki <armlinux@chmurka.net>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-10 10:47:47 -07:00
Baoyou Xie db808498ae Input: focaltech - mark focaltech_set_resolution() static
We get 1 warning when building kernel with W=1:
drivers/input/mouse/focaltech.c:393:6: warning: no previous prototype for 'focaltech_set_resolution' [-Wmissing-prototypes]

In fact, this function is only used in the file in which it is
declared and don't need a declaration, but can be made static.
So this patch marks it 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-05 10:42:11 -07:00
HungNien Chen 4e74823322 Input: wdt87xx_i2c - fix the flash erase issue
The spec says that flash erase time is 30ms typical/200ms max, so let's
replace current 50ms wait with 200ms to avoid potential failures.

Signed-off-by: HungNien Chen <hn.chen@weidahitech.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-05 10:31:47 -07:00
Vladimir Zapolskiy de56bea05b Input: gpio-keys-polled - don't use unit-address with button nodes
The change corrects an example in device tree documentation section,
because button/key device nodes don't contain reg property there is
no need to declare unit-address, and address and size cell properties
are also redundant.

At the moment a compilation of the hypothetical original example
should produce W=1 level warnings, and it is better to stop spreading
misusage of the polled gpio keys device tree binding through this
example.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-05 10:31:45 -07:00
Vignesh R 6946416164 Input: add generic input driver to read encoded GPIO lines
Add a driver to read group of GPIO lines and provide its status as a
numerical value as input event to the system. This will help in
interfacing devices, that can be connected over GPIOs, that provide
input to the system by driving GPIO lines connected to them like a
rotary dial or a switch.

For example, a rotary switch can be connected to four GPIO lines. The
status of the GPIO lines reflect the actual position of the rotary
switch dial. For example, if dial points to 9, then the four GPIO lines
connected to the switch will read HLLH(0b'1001 = 9). This value
can be reported as an ABS_* event to the input subsystem.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-29 20:24:23 -07:00
Alexandre Belloni 680772647d Input: add ADC resistor ladder driver
A common way of multiplexing buttons on a single input in cheap devices is
to use a resistor ladder on an ADC. This driver supports that configuration
by polling an ADC channel provided by IIO.

Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-29 20:00:58 -07:00
Martin Kepplinger f959cd8c0e Input: pegasus_notetaker - directly include workqueue header
According to the kernel's guidelines, let's directly include the
workqueue functions we use.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-25 10:11:32 -07:00
Johnny Chuang bc1d57fe5f Input: elants_i2c - get product id on recovery mode for FW update
We use hw version to construct name of file holding touchscreen firmware,
so let's try reading it even if touchscreen initialization fails (the
firmware supports reading product/hardware id even when device is in
recovery/boot mode).

Signed-off-by: Johnny Chuang <johnny.chuang@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-25 10:11:31 -07:00
Bhaktipriya Shridhar c9a3a7cf95 Input: wm97xx - remove deprecated create_singletheread_workqueue
alloc_ordered_workqueue() replaces deprecated
create_singlethread_workqueue().

It queues work items via &wm->ts_reader and &wm->pen_event_work which map
to wm97xx_pen_irq_worker (handles a pen down interrupt) and
wm97xx_ts_reader (the touchscreen sample reader) respectively. Hence, an
ordered dedicated workqueue has been used.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-25 10:11:30 -07:00
Bhaktipriya Shridhar 62e5147568 Input: mc13783_ts - remove deprecated create_singletheread_workqueue
The workqueue "workqueue" has a single workitem(&priv->work) and hence
doesn't require ordering. Also, it is not being used on a memory reclaim
path. Hence, the singlethreaded workqueue has been replaced with the use
of system_wq.

System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.

Workitem is sync cancelled in mc13783_ts_remove() to ensure that there
are no workitems pending when the driver is disconnected.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-25 10:11:00 -07:00
Bhaktipriya Shridhar 24dde60f56 Input: psmouse - remove deprecated create_singletheread_workqueue
alloc_ordered_workqueue() replaces the deprecated
create_singlethread_workqueue().

There are multiple work items on the work queue viz
&priv->dev3_register_work, &priv->recalib_wq, &psmouse->resync_work,
which require execution ordering. Hence, an ordered workqueue has been
used.

The workqueue is not being used on a memory reclaim path.  Hence,
WQ_MEM_RECLAIM has not been set.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-25 10:10:53 -07:00
Dmitry Torokhov 99ff4d3af8 Input: jornada720_kbd - switch to using dev_dbg
Switch to using dev_dbg instead of naked printk so that output is uniform
with the other driver messages in the kernel.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22 14:17:19 -07:00
Russell King 0f631d87d9 Input: jornada720_kbd - get rid of mach/irqs.h include
Switch the jornada720 keyboard driver to obtain its interrupt from the
platform device, rather than via a hard-coded interrupt number obtained
from the mach/irqs.h header.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22 14:17:17 -07:00
Russell King a8a7bdc598 Input: jornada720_kbd - switch to devm_* APIs
Switch the jornada720_kbd driver to use the devm_* APIs.  This is in
preparation to removing the mach/irqs.h include from this driver.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22 14:17:16 -07:00
Krzysztof Kozlowski 3f5c5920e6 Input: max77693-haptic - change Krzysztof Kozlowski's email to kernel.org
Change my email address to kernel.org instead of Samsung one for the
purpose of any future contact.  The copyrights remain untouched and are
attributed to Samsung.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22 14:17:06 -07:00
LABBE Corentin e9bf4529d3 Input: pixcir_i2c_ts - remove a useless blank line
This patch fix the following checkpatch report:
Blank lines aren't necessary after an open brace

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22 14:16:50 -07:00
LABBE Corentin 5ac82f081a Input: pixcir_i2c_ts - remove text about writing to Free Software Foundation
Checkpatch complains about the text suggesting writing to
Free Software Foundation for GPLv2 license copy.
This patch remove that text.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22 14:16:37 -07:00
LABBE Corentin 8ffef3cc69 Input: pixcir_i2c_ts - simplify code with of_device_get_match_data
The usage of of_device_get_match_data reduce the code size a bit.
Furthermore, it is better to use a standard function for
getting the match data.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22 14:16:29 -07:00
Hans de Goede d18716542d Input: remove duplicate ft6236 driver
The new(ish) ft6236 simply re-implements the M09 protocol of the
(much) older edt-ft5x06.c driver.

This commit removes this duplicate driver and adds the i2c ids and
dt compatible string to the edt-ft5x06.c driver to keep compatibility.

This commit also adds the standard touchscreen properties as optional
properties to the edt,ft5x06 binding, these were documented in the
focaltech,ft6236 bindingi, but were missing from the edt,ft5x06 doc.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22 14:16:07 -07:00
Mika Penttilä a485cb037f Input: add driver for SiS 9200 family I2C touchscreen controllers
This is a driver for SiS 9200 family touchscreen controllers using I2C bus.

Signed-off-by: Mika Penttilä <mika.penttila@nextfour.com>
Acked-by: Tammy Tseng <tammy_tseng@sis.com>
Acked-by: Yuger Yu <yuger_yu@sis.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-03 00:49:00 -07:00
Dmitry Torokhov b27c0d0c3b Input: ili210x - fix permissions on "calibrate" attribute
"calibrate" attribute does not provide "show" methods and thus we should
not mark it as readable.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-02 23:40:41 -07:00
KT Liao 2de4fcc646 Input: elan_i2c - properly wake up touchpad on ASUS laptops
Some ASUS laptops were shipped with touchpads that require to be woken up
first, before trying to switch them into absolute reporting mode, otherwise
touchpad would fail to work while flooding the logs with:

	elan_i2c i2c-ELAN1000:00: invalid report id data (1)

Among affected devices are Asus E202SA, N552VW, X456UF, UX305CA, and
others. We detect such devices by checking the IC type and product ID
numbers and adjusting order of operations accordingly.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Reported-by: Chris Chiu <chiu@endlessm.com>
Reported-by: Vlad Glagolev <stealth@vaygr.net>
Tested-by: Vlad Glagolev <stealth@vaygr.net>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-02 23:40:40 -07:00
Robert Dolca 3197704cae Input: add driver for Silead touchscreens
This driver adds support for Silead touchscreens. It has been tested
with GSL1680 and GSL3680 touch panels.

It supports ACPI and device tree enumeration. Screen resolution,
the maximum number of fingers supported and firmware name are
configurable.

Signed-off-by: Robert Dolca <robert.dolca@intel.com>
Signed-off-by: Daniel Jansen <djaniboe@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-02 23:37:49 -07:00
Benjamin Tissoires 014420fe88 Input: elantech - fix debug dump of the current packet
The use of mixed psmouse_printk() and printk creates 2 lines in the log,
while the use of %*ph solves everything.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-02 23:37:42 -07:00
Uwe Kleine-König d205a21859 Input: rotary_encoder - support binary encoding of states
It's not advisable to use this encoding, but to support existing devices
add support for this to the driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-27 18:26:10 -07:00
Cameron Gutman f712a5a052 Input: xpad - power off wireless 360 controllers on suspend
When the USB wireless adapter is suspended, the controllers
lose their connection. This causes them to start flashing
their LED rings and searching for the wireless adapter
again, wasting the controller's battery power.

Instead, we will tell the controllers to power down when
we suspend. This mirrors the behavior of the controllers
when connected to the console itself and how the official
Xbox One wireless adapter behaves on Windows.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-27 18:26:09 -07:00
Dmitry Torokhov 4097461897 Input: i8042 - break load dependency between atkbd/psmouse and i8042
As explained in 1407814240-4275-1-git-send-email-decui@microsoft.com we
have a hard load dependency between i8042 and atkbd which prevents
keyboard from working on Gen2 Hyper-V VMs.

> hyperv_keyboard invokes serio_interrupt(), which needs a valid serio
> driver like atkbd.c.  atkbd.c depends on libps2.c because it invokes
> ps2_command().  libps2.c depends on i8042.c because it invokes
> i8042_check_port_owner().  As a result, hyperv_keyboard actually
> depends on i8042.c.
>
> For a Generation 2 Hyper-V VM (meaning no i8042 device emulated), if a
> Linux VM (like Arch Linux) happens to configure CONFIG_SERIO_I8042=m
> rather than =y, atkbd.ko can't load because i8042.ko can't load(due to
> no i8042 device emulated) and finally hyperv_keyboard can't work and
> the user can't input: https://bugs.archlinux.org/task/39820
> (Ubuntu/RHEL/SUSE aren't affected since they use CONFIG_SERIO_I8042=y)

To break the dependency we move away from using i8042_check_port_owner()
and instead allow serio port owner specify a mutex that clients should use
to serialize PS/2 command stream.

Reported-by: Mark Laws <mdl@60hz.org>
Tested-by: Mark Laws <mdl@60hz.org>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-27 14:20:09 -07:00
Markus Elfring 887ec0bfbd Input: synaptics-rmi4 - do not check for NULL when calling of_node_put()
The of_node_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-26 12:09:55 -07:00
Douglas Anderson 8f97f8e58b Input: cros_ec_keyb - cleanup use of dev
In cros_ec_keyb we stored "dev" in "struct cros_ec_keyb", but this was
the EC's dev pointer and not the keyboard's.  Let's clean this up to
make it the keyboard's dev pointer.  This could be useful in future
patches but also has the nice effect of changing a few printouts to
include the name of the keyboard device instead of the EC device, so we
will see:

[    1.224648] cros-ec-keyb ff110000.spi:ec@0:keyboard-controller: valid_keys[00] = 0x14

instead of:

[    1.224505] cros-ec-spi spi0.0: valid_keys[00] = 0x14

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-26 12:09:54 -07:00
Muhammad Falak R Wani 0097ff3d5d Input: tty/vt/keyboard - use memdup_user()
Use memdup_user to duplicate a memory region from user-space to
kernel-space, instead of open coding using kmalloc & copy_from_user.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-20 17:57:30 -07:00
Martin Kepplinger c1d7b7c181 Input: pegasus_notetaker - set device mode in reset_resume() if in use
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-19 14:33:07 -07:00