GitHub/MotorolaMobilityLLC/kernel-slsi.git
7 years agoInput: atmel_mxt_ts - add T100 as a readable object
Maxime Roussin-Bélanger [Fri, 19 May 2017 21:59:03 +0000 (14:59 -0700)]
Input: atmel_mxt_ts - add T100 as a readable object

When using the 'object' sysfs attribute, T100 is not displayed in
the output.

Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: edt-ft5x06 - increase allowed data range for threshold parameter
Martin Kepplinger [Tue, 23 May 2017 00:19:45 +0000 (17:19 -0700)]
Input: edt-ft5x06 - increase allowed data range for threshold parameter

The datasheet and application note does not mention an allowed range for
the M09_REGISTER_THRESHOLD parameter. One of our customers needs to set
lower values than 20 and they seem to work just fine on EDT EP0xx0M09 with
T5x06 touch.

So, lacking a known lower limit, we increase the range for thresholds,
and set the lower limit to 0. The documentation is updated accordingly.

Signed-off-by: Schoefegger Stefan <stefan.schoefegger@ginzinger.com>
Signed-off-by: Manfred Schlaegl <manfred.schlaegl@ginzinger.com>
Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: cros_ec_keyb - remove extraneous 'const'
Arnd Bergmann [Thu, 11 May 2017 17:14:06 +0000 (10:14 -0700)]
Input: cros_ec_keyb - remove extraneous 'const'

gcc-7 warns about 'const SIMPLE_DEV_PM_OPS', as that macro already contains
a 'const' keyword:

drivers/input/keyboard/cros_ec_keyb.c:663:14: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume);

This removes the extra one.

Fixes: 6af6dc2d2aa6 ("input: Add ChromeOS EC keyboard driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: add support for PlayStation 1/2 joypads connected via SPI
Tomohiro Yoshidomi [Sat, 6 May 2017 20:00:31 +0000 (13:00 -0700)]
Input: add support for PlayStation 1/2 joypads connected via SPI

PlayStation 1/2 joypads can be connected directly to the SPI interface.

Signed-off-by: Tomohiro Yoshidomi <sylph23k@gmail.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
Benjamin Valentin [Sun, 7 May 2017 21:49:09 +0000 (14:49 -0700)]
Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth

Add USB IDs for two more Xbox 360 controllers.

I found them in the pull requests for the xboxdrv userspace driver, which
seems abandoned.

Thanks to psychogony and mkaito for reporting the IDs there!

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
Reviewed-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - sync supported devices with xboxdrv
Benjamin Valentin [Sun, 7 May 2017 21:48:14 +0000 (14:48 -0700)]
Input: xpad - sync supported devices with xboxdrv

The userspace xboxdrv driver [0] contains some USB IDs unknown to the
kernel driver. I have created a simple script [1] to extract the missing
devices and add them to xpad.

A quick google search confirmed that all the new devices called
Fightstick/pad are Arcade-type devices [2] where the
MAP_TRIGGERS_TO_BUTTONS option should apply.

There are some similar devices in the existing device table where this
flag is not set, but I did refrain from changing those.

[0] https://github.com/xboxdrv/xboxdrv/blob/stable/src/xpad_device.cpp
[1] http://codepad.org/CHV98BNH
[2] https://www.google.com/search?q=SFxT+Fightstick+Pro&tbm=isch

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
Reviewed-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - sort supported devices by USB ID
Benjamin Valentin [Sun, 7 May 2017 21:45:08 +0000 (14:45 -0700)]
Input: xpad - sort supported devices by USB ID

Some entries in the table of supported devices are out of order.
To not create a mess when adding new ones using a script, sort them first.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
Reviewed-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Tue, 2 May 2017 16:48:26 +0000 (09:48 -0700)]
Merge branch 'next' into for-linus

Prepare input updates for 4.12 merge window.

7 years agoInput: ar1021_i2c - use BIT to check for a bit
Martin Kepplinger [Mon, 1 May 2017 17:13:47 +0000 (10:13 -0700)]
Input: ar1021_i2c - use BIT to check for a bit

The MSB for the first byte of touch data transmission is always 1. Make
it a little more obvious we're testing this bit by using BIT(7).

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: twl4030-pwrbutton - use input_set_capability() helper
Sebastian Reichel [Fri, 28 Apr 2017 17:27:37 +0000 (10:27 -0700)]
Input: twl4030-pwrbutton - use input_set_capability() helper

Cleanup driver slightly by using input_set_capability() instead
of manually setting the required bits.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: twl4030-pwrbutton - use correct device for irq request
Sebastian Reichel [Fri, 28 Apr 2017 17:25:51 +0000 (10:25 -0700)]
Input: twl4030-pwrbutton - use correct device for irq request

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 <sebastian.reichel@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: ar1021_i2c - enable touch mode during open
Martin Kepplinger [Fri, 28 Apr 2017 16:58:12 +0000 (09:58 -0700)]
Input: ar1021_i2c - enable touch mode during open

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 <martin.kepplinger@ginzinger.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: add uinput documentation
Marcos Paulo de Souza [Mon, 24 Apr 2017 23:19:49 +0000 (16:19 -0700)]
Input: add uinput documentation

Add description of uinput module with a few examples.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: i8042 - add Clevo P650RS to the i8042 reset list
Dmitry Torokhov [Thu, 13 Apr 2017 22:36:31 +0000 (15:36 -0700)]
Input: i8042 - add Clevo P650RS to the i8042 reset list

Clevo P650RS and other similar devices require i8042 to be reset in order
to detect Synaptics touchpad.

Reported-by: Paweł Bylica <chfast@gmail.com>
Tested-by: Ed Bordin <edbordin@gmail.com>
Cc: stable@vger.kernel.org
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=190301
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agodt-bindings: input: add bindings document for ar1021_i2c driver
Martin Kepplinger [Thu, 20 Apr 2017 17:41:27 +0000 (10:41 -0700)]
dt-bindings: input: add bindings document for ar1021_i2c driver

Add a simple binding document describing the supported devices and the
I2C bus address.

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agodt-bindings: input: rotary-encoder: fix typo
Rahul Bedarkar [Thu, 20 Apr 2017 17:36:18 +0000 (10:36 -0700)]
dt-bindings: input: rotary-encoder: fix typo

s/rollove/rollover/

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xen-kbdfront - add module parameter for setting resolution
Juergen Gross [Wed, 19 Apr 2017 15:47:06 +0000 (08:47 -0700)]
Input: xen-kbdfront - add module parameter for setting resolution

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 <jgross@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: elantech - add Fujitsu Lifebook E547 to force crc_enabled
Thorsten Leemhuis [Tue, 18 Apr 2017 18:14:28 +0000 (11:14 -0700)]
Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled

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: stable@vger.kernel.org
Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info>
Reviewed-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoARM: pxa/raumfeld: fix compile error in rotary controller resources
Dmitry Torokhov [Tue, 18 Apr 2017 18:08:33 +0000 (11:08 -0700)]
ARM: pxa/raumfeld: fix compile error in rotary controller resources

When switching rotary controlelr from plain IRQ number to IRQ resource, I
messed up the syntax.

Fixes: d422be5f62ef ("Input: eeti_ts - expect platform code to set ... ")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - do not suggest writing to Dominic
Dmitry Torokhov [Tue, 18 Apr 2017 03:23:05 +0000 (20:23 -0700)]
Input: xpad - do not suggest writing to Dominic

Do not recommend people write to Dominic, rather everyone should be using
linux-input mailing list.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - don't use literal blocks inside footnotes
Mauro Carvalho Chehab [Tue, 18 Apr 2017 03:08:44 +0000 (20:08 -0700)]
Input: xpad - don't use literal blocks inside footnotes

Unfortunately, Sphinx (or LaTeX) can't handle literal blocks inside
footnotes. So, just use normal text for the two literal code-blocks that
documents the output of /sys/kernel/debug/usb/devices for xpad devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - note that usb/devices is now at /sys/kernel/debug/
Mauro Carvalho Chehab [Tue, 18 Apr 2017 03:07:42 +0000 (20:07 -0700)]
Input: xpad - note that usb/devices is now at /sys/kernel/debug/

The /proc/bus/usb/devices got moved to sysfs. It is now sitting at:

        /sys/kernel/debug/usb/devices

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: docs - freshen up introduction
Dmitry Torokhov [Sat, 15 Apr 2017 22:16:50 +0000 (15:16 -0700)]
Input: docs - freshen up introduction

Stop saying that API is experimental and that only USB is supported,
acknowledge that evdev is the preferred interface, and remove paragraph
encouraging people sending snail mail to Vojtech :) along with his email.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: docs - split input docs into kernel- and user-facing
Dmitry Torokhov [Fri, 7 Apr 2017 01:08:42 +0000 (18:08 -0700)]
Input: docs - split input docs into kernel- and user-facing

Split input documentation into several groups: kernel- and user-facing, and
notes about individual device drivers. Move device drivers docs into a
separate subdirectory.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: docs - note that MT-A protocol is obsolete
Dmitry Torokhov [Fri, 7 Apr 2017 00:23:39 +0000 (17:23 -0700)]
Input: docs - note that MT-A protocol is obsolete

Everyone should be using multitouch protocol B (slotted) now.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: docs - update joystick documentation a bit
Dmitry Torokhov [Thu, 6 Apr 2017 23:17:37 +0000 (16:17 -0700)]
Input: docs - update joystick documentation a bit

Consolidate use instructions and userspace API notes into the same chapter;
remove completely obsolete references, move into a separate subdirectory.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: docs - remove disclaimer/GPL notice
Dmitry Torokhov [Thu, 6 Apr 2017 21:49:23 +0000 (14:49 -0700)]
Input: docs - remove disclaimer/GPL notice

This is just a part of kernel documentation, it does not require explicit
license notice.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: fix "Game console" heading level in joystick documentation
Dmitry Torokhov [Thu, 6 Apr 2017 19:48:41 +0000 (12:48 -0700)]
Input: fix "Game console" heading level in joystick documentation

The heading level should be the same as for other devices.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: rotary-encoder - remove references to platform data from docs
Dmitry Torokhov [Thu, 6 Apr 2017 00:13:22 +0000 (17:13 -0700)]
Input: rotary-encoder - remove references to platform data from docs

The driver has been converted to use generic device properties, so
stop referring to platform data.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: move documentation for Amiga CD32
Dmitry Torokhov [Wed, 5 Apr 2017 23:28:55 +0000 (16:28 -0700)]
Input: move documentation for Amiga CD32

Move the documentation for Amiga CD32 together with other parallel port
joysticks.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: synaptics-rmi4 - enable IRQ operation in F34 V7
Nick Dyer [Fri, 14 Apr 2017 21:44:08 +0000 (14:44 -0700)]
Input: synaptics-rmi4 - enable IRQ operation in F34 V7

The polled firmware update proved unreliable when testing on S7817. Use
attention to signal commands are complete.

Signed-off-by: Nick Dyer <nick@shmanahar.org>
Tested-by: Chris Healy <cphealy@gmail.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: synaptics-rmi4 - change F12 clip to inactive border debug
Nick Dyer [Fri, 14 Apr 2017 21:43:25 +0000 (14:43 -0700)]
Input: synaptics-rmi4 - change F12 clip to inactive border debug

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 <nick@shmanahar.org>
Tested-by: Chris Healy <cphealy@gmail.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: synaptics-rmi4 - use dev_driver_string when registering interrupt
Nick Dyer [Fri, 14 Apr 2017 21:42:44 +0000 (14:42 -0700)]
Input: synaptics-rmi4 - use dev_driver_string when registering interrupt

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 <nick@shmanahar.org>
Tested-by: Chris Healy <cphealy@gmail.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: ar1021_i2c - highlight support for AR1020
Martin Kepplinger [Fri, 14 Apr 2017 17:14:06 +0000 (10:14 -0700)]
Input: ar1021_i2c - highlight support for AR1020

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 <martin.kepplinger@ginzinger.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: ar1021_i2c - do not force raising edge IRQ trigger
Dmitry Torokhov [Thu, 13 Apr 2017 23:36:42 +0000 (16:36 -0700)]
Input: ar1021_i2c - do not force raising edge IRQ trigger

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 <christian.gmeiner@gmail.com>
Tested-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: ar1021_i2c - fix too long name in driver's device table
Dmitry Torokhov [Mon, 12 Dec 2016 23:32:57 +0000 (15:32 -0800)]
Input: ar1021_i2c - fix too long name in driver's device table

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 <christian.gmeiner@gmail.com>
Tested-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: ar1021_i2c - coding style fixes
Martin Kepplinger [Wed, 12 Apr 2017 15:41:19 +0000 (08:41 -0700)]
Input: ar1021_i2c - coding style fixes

Use the common kernel coding style and corrently align parameters with
open parenthesis.

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: lpc32xx_ts - check for clk_prepare_enable() error
Fabio Estevam [Wed, 12 Apr 2017 15:34:03 +0000 (08:34 -0700)]
Input: lpc32xx_ts - check for clk_prepare_enable() error

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 <fabio.estevam@nxp.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: imx6ul_tsc - fix error handling
Fabio Estevam [Wed, 12 Apr 2017 15:33:50 +0000 (08:33 -0700)]
Input: imx6ul_tsc - fix error handling

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 <fabio.estevam@nxp.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: omap-keypad - fix error handling code
Christophe JAILLET [Tue, 11 Apr 2017 03:48:16 +0000 (20:48 -0700)]
Input: omap-keypad - fix error handling code

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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - add support for Razer Wildcat gamepad
Cameron Gutman [Tue, 11 Apr 2017 03:44:25 +0000 (20:44 -0700)]
Input: xpad - add support for Razer Wildcat gamepad

Cc: stable@vger.kernel.org
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - support some quirky Xbox One pads
Cameron Gutman [Tue, 11 Apr 2017 03:43:04 +0000 (20:43 -0700)]
Input: xpad - support some quirky Xbox One pads

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 <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: yealink - define packet offset __be16 instead of u16
Martin Kepplinger [Tue, 11 Apr 2017 03:39:22 +0000 (20:39 -0700)]
Input: yealink - define packet offset __be16 instead of u16

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 <martin.kepplinger@ginzinger.com>
Signed-off-by: Henk.Vergonet@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: turbografx - use setup_timer
Geliang Tang [Tue, 11 Apr 2017 03:38:30 +0000 (20:38 -0700)]
Input: turbografx - use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: locomokbd - use setup_timer
Geliang Tang [Tue, 11 Apr 2017 03:38:10 +0000 (20:38 -0700)]
Input: locomokbd - use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: gameport - use setup_timer
Geliang Tang [Tue, 11 Apr 2017 03:37:53 +0000 (20:37 -0700)]
Input: gameport - use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: db9 - use setup_timer
Geliang Tang [Tue, 11 Apr 2017 03:37:40 +0000 (20:37 -0700)]
Input: db9 - use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: soc_button_array - properly map usage 0x07/0xe3 to KEY_LEFTMETA
Hans de Goede [Tue, 11 Apr 2017 03:34:19 +0000 (20:34 -0700)]
Input: soc_button_array - properly map usage 0x07/0xe3 to KEY_LEFTMETA

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 <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: use svg files instead of xfig in force feedback documentation
Mauro Carvalho Chehab [Wed, 5 Apr 2017 04:42:54 +0000 (21:42 -0700)]
Input: use svg files instead of xfig in force feedback documentation

Now that the images got converted to svg, add them at the
ff.rst file.

NOTE: After merging upstream, the "figure" tag should be
replaced by the new "kernel-figure" tag, in order for the
SVG images to be included at the PDF files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: docs - convert interactive.fig from xfig to svg
Mauro Carvalho Chehab [Wed, 5 Apr 2017 04:44:14 +0000 (21:44 -0700)]
Input: docs - convert interactive.fig from xfig to svg

We're using svg as the standard format for vectorial images.

Convert it to .svg, in a way that it is easily editable.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: docs - convert shape.fig from xfig to svg
Mauro Carvalho Chehab [Wed, 5 Apr 2017 04:43:18 +0000 (21:43 -0700)]
Input: docs - convert shape.fig from xfig to svg

We're using svg as the standard format for vectorial images.

Convert shape.fig to .svg, in a way that it is easily editable.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: create a book with Linux Input documentation
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:51:04 +0000 (17:51 -0700)]
Input: create a book with Linux Input documentation

Now that all files under Documentation/input follows the ReST markup
language, rename them to *.rst and create a book for the Linux Input
subsystem.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: yealink - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:50:20 +0000 (17:50 -0700)]
Input: yealink - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: xpad - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:49:51 +0000 (17:49 -0700)]
Input: xpad - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: walkera0701 - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:49:22 +0000 (17:49 -0700)]
Input: walkera0701 - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: userio - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:48:53 +0000 (17:48 -0700)]
Input: userio - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: sentelic - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:48:24 +0000 (17:48 -0700)]
Input: sentelic - convert documentation into ReST format

This file has its own particular format that doesn't match any
markup one.

Manually change it to get something that would be readable
using ReST markup language.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: rotary-encoder - convert documentation into to ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:47:55 +0000 (17:47 -0700)]
Input: rotary-encoder - convert documentation into to ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: ntrig - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:47:27 +0000 (17:47 -0700)]
Input: ntrig - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: convert keyboard notifier docs into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:47:00 +0000 (17:47 -0700)]
Input: convert keyboard notifier docs into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: convert multi-touch protocol spec into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:46:28 +0000 (17:46 -0700)]
Input: convert multi-touch protocol spec into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: joystick-parport - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:45:49 +0000 (17:45 -0700)]
Input: joystick-parport - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: joystick - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:45:05 +0000 (17:45 -0700)]
Input: joystick - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: convert joystick-api doc into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:44:38 +0000 (17:44 -0700)]
Input: convert joystick-api doc into ReST format

This file require some adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: convert input-programming doc into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:44:04 +0000 (17:44 -0700)]
Input: convert input-programming doc into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: iforce - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:43:09 +0000 (17:43 -0700)]
Input: iforce - convert documentation into ReST format

This file seems to be using some other markup language, (maybe mediawiki?).
Manually convert it to ReST markup, with is the one we're using along the
Kernel documentaiton.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: gpio-tilt - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:42:27 +0000 (17:42 -0700)]
Input: gpio-tilt - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: convert gameport programming documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:41:40 +0000 (17:41 -0700)]
Input: convert gameport programming documentation into ReST format

This file require minimum adjustments to be a valid ReST.  Do it, in order
to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: convert gamepad specification into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:40:41 +0000 (17:40 -0700)]
Input: convert gamepad specification into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: convert force feedback documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:40:14 +0000 (17:40 -0700)]
Input: convert force feedback documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: convert event codes documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:39:30 +0000 (17:39 -0700)]
Input: convert event codes documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: elantech - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:38:54 +0000 (17:38 -0700)]
Input: elantech - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

We opted to remove section numbers, as this can be automatically
generated on Sphinx, by using :numbered: tag at index.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: cs461x - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:37:32 +0000 (17:37 -0700)]
Input: cs461x - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: cma3000_d0x - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:37:03 +0000 (17:37 -0700)]
Input: cma3000_d0x - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: db9/CD32 - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:35:09 +0000 (17:35 -0700)]
Input: db9/CD32 - convert documentation into ReST format

Currently, it misses a title, and the table is not valid for ReST. Adjust
them, in order for it to be able to parse on Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: bcm5974 - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:34:28 +0000 (17:34 -0700)]
Input: bcm5974 - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: atarikbd - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:32:51 +0000 (17:32 -0700)]
Input: atarikbd - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.

We opted to remove section numbers, as this can be automatically
generated on Sphinx, by using :numbered: tag at index.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: appletouch - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:32:22 +0000 (17:32 -0700)]
Input: appletouch - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.  Do it, in
order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: amijoy - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:31:40 +0000 (17:31 -0700)]
Input: amijoy - convert documentation into ReST format

This file contains lots of tables, but none formatted using the ReST
syntax. Adjust them to match the ReST syntax and add a title for the
document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: ALPS - convert documentation into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:30:06 +0000 (17:30 -0700)]
Input: ALPS - convert documentation into ReST format

Turn ALPS documentation into a valid ReST file, so it could be parsed with
Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: docs - convert input.txt into ReST format
Mauro Carvalho Chehab [Wed, 5 Apr 2017 00:29:06 +0000 (17:29 -0700)]
Input: docs - convert input.txt into ReST format

This file require minimum adjustments to be a valid ReST.

Do it, in order to be able to parse it with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: pm8xxx-vib - add support for pm8916's vibrator
Damien Riegel [Tue, 4 Apr 2017 23:29:59 +0000 (16:29 -0700)]
Input: pm8xxx-vib - add support for pm8916's vibrator

Add pm8xxx_regs for this PMIC and the device tree match table entry.

Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: pm8xxx-vib - handle separate enable register
Damien Riegel [Tue, 4 Apr 2017 23:27:36 +0000 (16:27 -0700)]
Input: pm8xxx-vib - handle separate enable register

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 <damien.riegel@savoirfairelinux.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: pm8xxx-vib - parametrize the driver
Damien Riegel [Tue, 4 Apr 2017 23:25:57 +0000 (16:25 -0700)]
Input: pm8xxx-vib - parametrize the driver

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 <damien.riegel@savoirfairelinux.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: pm8xxx-vib - reorder header alphabetically
Damien Riegel [Tue, 4 Apr 2017 23:25:42 +0000 (16:25 -0700)]
Input: pm8xxx-vib - reorder header alphabetically

Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: sur40 - fix bad endianness handling in sur40_poll
Martin Kepplinger [Tue, 4 Apr 2017 17:06:57 +0000 (10:06 -0700)]
Input: sur40 - fix bad endianness handling in sur40_poll

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 <martink@posteo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - switch to gpiod API
Dmitry Torokhov [Mon, 20 Feb 2017 01:21:56 +0000 (17:21 -0800)]
Input: eeti_ts - switch to gpiod API

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 <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - expect platform code to set interrupt trigger
Dmitry Torokhov [Mon, 20 Feb 2017 00:22:13 +0000 (16:22 -0800)]
Input: eeti_ts - expect platform code to set interrupt trigger

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 <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - switch to using threaded interrupt
Dmitry Torokhov [Mon, 20 Feb 2017 01:23:47 +0000 (17:23 -0800)]
Input: eeti_ts - switch to using threaded interrupt

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 <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - use gpio_get_value_cansleep
Dmitry Torokhov [Tue, 21 Feb 2017 07:13:45 +0000 (23:13 -0800)]
Input: eeti_ts - use gpio_get_value_cansleep

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 <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - respect interrupt set in client structure
Dmitry Torokhov [Mon, 20 Feb 2017 01:14:33 +0000 (17:14 -0800)]
Input: eeti_ts - respect interrupt set in client structure

Instead of expecting that GPIO is always interrupt source, let's use
interrupt specified in I2C client.

Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - switch to using managed resources
Dmitry Torokhov [Fri, 17 Feb 2017 23:54:22 +0000 (15:54 -0800)]
Input: eeti_ts - switch to using managed resources

Using devm_* APIs simpifies error handling and device teardown.

Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - use input_set_capability()
Dmitry Torokhov [Tue, 21 Feb 2017 05:53:51 +0000 (21:53 -0800)]
Input: eeti_ts - use input_set_capability()

Use input_set_capability() instead of manipulating evbit/keybit
masks directly.

Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - use get_unaligned_be16() to retrieve data
Dmitry Torokhov [Tue, 21 Feb 2017 05:50:13 +0000 (21:50 -0800)]
Input: eeti_ts - use get_unaligned_be16() to retrieve data

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 <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - use BIT(n)
Dmitry Torokhov [Tue, 21 Feb 2017 05:42:43 +0000 (21:42 -0800)]
Input: eeti_ts - use BIT(n)

Use idiomatic BIT(n) to form single-bit masks.

Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: eeti_ts - rename eeti_ts_priv to eeti_ts
Dmitry Torokhov [Mon, 20 Feb 2017 01:28:11 +0000 (17:28 -0800)]
Input: eeti_ts - rename eeti_ts_priv to eeti_ts

Also rename 'priv' variables to eeti.

Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: synaptics-rmi4 - when registering sensors do not call them "drivers"
Dmitry Torokhov [Fri, 24 Mar 2017 21:21:44 +0000 (14:21 -0700)]
Input: synaptics-rmi4 - when registering sensors do not call them "drivers"

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 <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: synaptics-rmi4 - cleanup SMbus mapping handling
Dmitry Torokhov [Fri, 24 Mar 2017 19:45:35 +0000 (12:45 -0700)]
Input: synaptics-rmi4 - cleanup SMbus mapping handling

There is no reason to copy structures field-by-filed when we can copy
elements at once.

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: synaptics-rmi4 - fix endianness issue in SMBus transport
Dmitry Torokhov [Fri, 24 Mar 2017 19:34:20 +0000 (12:34 -0700)]
Input: synaptics-rmi4 - fix endianness issue in SMBus transport

The mapping table holds address in LE form, so we should convert it
to CPU when comparing it.

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 years agoInput: synaptics-rmi4 - fix handling failures from rmi_enable_sensor
Dmitry Torokhov [Fri, 24 Mar 2017 21:28:28 +0000 (14:28 -0700)]
Input: synaptics-rmi4 - fix handling failures from rmi_enable_sensor

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 <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>