Commit Graph

3685 Commits

Author SHA1 Message Date
Dmitry Torokhov
ad7647d92f Input: ims-pcu - fix error unwinding path in application mode
We first create backlight and then input devices so we should destroy them
in opposite order when handling errors.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-12 15:09:40 -08:00
Benjamin Tissoires
e3480a61fc Input: uinput - add UI_GET_SYSNAME ioctl to retrieve the sysfs path
uinput is used in the xorg-integration-tests suite and in the wayland
test suite. These automated tests suites create many virtual input
devices and then hook something to read these newly created devices.

Currently, uinput does not provide the created input device, which means
that we rely on an heuristic to guess which input node was created.
The problem is that is heuristic is subjected to races between different
uinput devices or even with physical devices. Having a way to retrieve
the sysfs path allows us to find without any doubts the event node.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-12 15:00:34 -08:00
Benjamin Tisssoires
9d51e801db Input: uinput - breaks by goto out in uinput_ioctl_handler
The current implementation prevents us to add variable-length ioctl.
Use a bunch of gotos instead of break to allow us to do so.

No functional changes.

Signed-off-by: Benjamin Tisssoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-30 17:30:57 -08:00
Heiko Stübner
6f2e6c9b45 Input: zforce - add devicetree support
This makes the zforce driver usable on devicetree-based platforms too.

Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27 22:35:42 -08:00
Heiko Stübner
8727336481 Input: zforce - use internal pdata pointer instead of dev_get_platdata
Devicetree support will be creating its own platfprm data structure that
is not attached to the device. Let's use the internal pointer to the
pdata instead of re-fetching it with dev_get_platdata().

Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27 22:35:18 -08:00
Luis Ortega
d333b6062f Input: zforce - reduce stack memory allocated to frames
A frame is a u8 array with the following structure:
[PAYLOAD_HEADER, PAYLOAD_LENGTH, ...PAYLOAD_BODY...]

PAYLOAD_BODY can be at most 255 bytes long, as it's size is represented
by PAYLOAD_LENGTH. Therefore we can reduce the stack memory allocated to
payload_buffer[] roughly by half, from 512 to 257 bytes.

Signed-off-by: Luis Ortega <luiorpe1@upv.es>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de> - bq Cervantes (imx6sl)
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27 22:35:17 -08:00
Luis Ortega
5aee41a60c Input: zforce - remove unnecessary payload data checks
The function zforce_read_packet() reads 2 values (bytes) of payload
header, validates them and then proceeds to read the payload body.
The function stores all these in a u8 buffer.

The PAYLOAD_LENGTH check seems to be trying to detect an overflow error.
However, since we are just reading a u8 value from the buffer, these
checks are unnecessary and we should simply compare against zero.

Signed-off-by: Luis Ortega <luiorpe1@upv.es>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de> - bq Cervantes (imx6sl)
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27 22:35:17 -08:00
Luis Ortega
ad697b96e6 Input: zforce - fix lines exceeding 80 columns
Fixed lines exceeding 80 characters long wherever possible,
as per the coding style.

Signed-off-by: Luis Ortega <luiorpe1@upv.es>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27 22:35:16 -08:00
Luis Ortega
deb4981985 Input: zforce - fix spelling errors
Fixed a few spelling errors.

Signed-off-by: Luis Ortega <luiorpe1@upv.es>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27 22:35:00 -08:00
Alexey Khoroshilov
1f906f8376 Input: gtco - fix usb_dev leak
There is usb_get_dev() in gtco_probe(), but there is no usb_put_dev()
anywhere in the driver.

As pointed out by Dmitry Torokhov:
The lifetime of gtco structure is already directly tied to lifetime of
usb_dev: when destroying usb_dev driver core will call remove() function
of currently bound driver (in our case gtco) which will destroy gtco
memory. Taking additional reference is not needed here.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27 22:34:49 -08:00
Jakub Bogusz
11601a82d5 Input: wistron_btns - add FS AMILO Pro 8210 support
This adds Fujitsu-Siemens AMILO Pro 8210 support to wistron_btns driver.

Functions are very similar to already supported AMILO Pro 3505, but 8210
has WIFI led.

Such functionality is needed to enable WiFi under Linux on 8210 when it
cold boots with hardware rfkill enabled, without booting another operating
system or running custom utility that calls appropriate BIOS function.

Signed-off-by: Jakub Bogusz <qboosh@pld-linux.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27 22:34:42 -08:00
Ping Cheng
497ab1f290 Input: wacom - add support for DTU-1031
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-20 20:36:57 -08:00
Ping Cheng
713481620b Input: wacom - fix wacom->shared guards for dual input devices
features->quirks can have multiple bits set. For dual input, we only
need to check WACOM_QUIRK_MULTI_INPUT.

Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-20 20:36:57 -08:00
Lothar Waßmann
02300bd651 Input: edt_ft5x06 - use devm_* functions where appropriate
Simplify the error path and remove() function by using devm_*
functions for requesting gpios and irq and allocating the input
device.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-20 20:29:21 -08:00
K. Y. Srinivasan
c3c4d99485 Input: hyperv-keyboard - pass through 0xE1 prefix
Pass through the 0xE1 prefix so atkbd can properly parse the scancode
data.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-12 11:41:56 -08:00
Geert Uytterhoeven
25fd31768e Input: logips2pp - fix spelling s/reciver/receiver/
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-12 11:41:38 -08:00
Paul Gortmaker
bf9a9f8e51 Input: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-06 23:23:57 -08:00
Dmitry Torokhov
049f1cb2c1 Input: twl4030-keypad - convert to using managed resources
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Tested-by: Sebastian Reichel <sre@debian.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-06 23:20:45 -08:00
Dmitry Torokhov
32e573c479 Input: twl6040-vibra - remove unneeded check for CONFIG_OF
Since the driver requires DT now we do not need to check if CONFIG_OF is
defined.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-06 23:20:16 -08:00
Sebastian Reichel
7abf38d6d1 Input: twl4030-keypad - add device tree support
Add device tree support for twl4030 keypad driver.

Tested on Nokia N900.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-04 00:47:37 -08:00
Libo Chen
f048dd1725 Input: twl6040-vibra - add missing of_node_put
We should drop reference to twl6040_core_node device_node once we are done
using it.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-04 00:47:36 -08:00
Libo Chen
a9e1d3c04a Input: twl4030-vibra - add missing of_node_put
We should drop reference to twl6040_core_node device_node once we are done
using it.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-04 00:47:36 -08:00
Mark Salter
5cd3f8f89c Input: i8042 - cleanup SERIO_I8042 dependencies
Remove messy dependencies from SERIO_I8042 by having it depend on one
Kconfig symbol (ARCH_MIGHT_HAVE_PC_SERIO) and having architectures
which need it select ARCH_MIGHT_HAVE_PC_SERIO in arch/*/Kconfig.
New architectures are unlikely to need SERIO_I8042, so this avoids
having an ever growing list of architectures to exclude.

Signed-off-by: Mark Salter <msalter@redhat.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-02 15:48:22 -08:00
Doug Anderson
64757eba62 Input: cros_ec_keyb - fix problems with backslash
The driver can't deal with two entries its keymap having the same keycode.
When this happens it will get confused about whether the key is down or up
and will cause some screwy behavior.

We need to have two entries for KEY_BACKSLASH to handle US and UK
keyboards. Specifically:
* On the US keyboard the backslash key (above enter) is r3 c11 and is
  supposed to be reported as BACKSLASH.
* On the UK keyboard the # key (left of enter) is r4 c10 and is
  supposed to be reported as BACKSLASH.
* On the UK keyboard the \ key (left of Z) is r2 c7 and is supposed to
  be reported as KEY_102ND.

Note that both keyboards (US and UK) have only one physical backslash
key so the constraint that each physical key should have its own keycode
still stands.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-31 10:45:29 -08:00
Dmitry Torokhov
eb735d3b84 Input: pmic8xxx-pwrkey - switch to using managed resources
This simplifies error handling and device removal paths.

Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-27 17:18:29 -08:00
Wei Yongjun
e77a715ac3 Input: pmic8xxx-pwrkey - pass correct device identity to free_irq()
free_irq() in the error handling case is missing when change
pass input device directly to interrupt.

Fixes: b27f8fee4965('Input: pmic8xxx-pwrkey - pass input device directly to interrupt')

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-27 17:18:23 -08:00
Yunkang Tang
ee65d4b36d Input: ALPS - add support for "Dolphin" devices
This adds support for another flavor of ALPS protocol used in newer
"Dolphin" devices.

Signed-off-by: Yunkang Tang <yunkang.tang@cn.alps.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-26 15:44:39 -08:00
Wei Yongjun
3c4396b434 Input: zforce - fix error return code in zforce_start()
The error code was not set if unable to set config, so the error
condition wasn't reflected in the return value. Fix to return a
negative error code from the error handling case instead of 0.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-18 08:47:39 -08:00
Hans de Goede
c15bdfd5b9 Input: elantech - improve clickpad detection
The current assumption in the elantech driver that hw version 3 touchpads
are never clickpads and hw version 4 touchpads are always clickpads is
wrong.

There are several bug reports for this, ie:
https://bugzilla.redhat.com/show_bug.cgi?id=1030802
http://superuser.com/questions/619582/right-elantech-touchpad-button-not-working-in-linux

I've spend a couple of hours wading through various bugzillas, launchpads
and forum posts to create a list of fw-versions and capabilities for
different laptop models to find a good method to differentiate between
clickpads and versions with separate hardware buttons.

Which shows that a device being a clickpad is reliable indicated by bit 12
being set in the fw_version. I've included the gathered list inside the
driver, so that we've this info at hand if we need to revisit this later.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-18 08:47:29 -08:00
Aleksej Makarov
768d9aa557 Input: don't call input_dev_release_keys() in resume
When waking up the platform by pressing a specific key, sending a
release on that key makes it impossible to react on the event in
user-space. This is fixed by moving the input_reset_device() call to
resume instead.

[dmitry.torokhov@gmail.com: make sure we still restore LED/sound state
after resume, handle hibernation properly]

Signed-off-by: Aleksej Makarov <aleksej.makarov@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-16 02:19:10 -08:00
Guenter Roeck
e585c40ba1 Input: ads7846 - convert to hwmon_device_register_with_groups()
Simplify the code and create mandatory 'name' attribute by using
new hwmon API.

Also use is_visible to determine visible attributes instead of creating
several different attribute groups.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-16 02:13:26 -08:00
Ping Cheng
961794a00e Input: wacom - add reporting of SW_MUTE_DEVICE events
New Intuos series models added a hardware switch to turn touch
data on/off. The state of the switch is reported periodically
from the tablet. To report the state the driver will emit SW_MUTE_DEVICE
events.

Reviewed_by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-16 02:12:32 -08:00
Dmitry Torokhov
348324c5b1 Linux 3.13-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSrhGrAAoJEHm+PkMAQRiGsNoH/jIK3CsQ2lbW7yRLXmfgtbzz
 i2Kep6D4SDvmaLpLYOVC8xNYTiE8jtTbSXHomwP5wMZ63MQDhBfnEWsEWqeZ9+D9
 3Q46p0QWuoBgYu2VGkoxTfygkT6hhSpwWIi3SeImbY4fg57OHiUil/+YGhORM4Qc
 K4549OCTY3sIrgmWL77gzqjRUo+pQ4C73NKqZ3+5nlOmYBZC1yugk8mFwEpQkwhK
 4NRNU760Fo+XIht/bINqRiPMddzC15p0mxvJy3cDW8bZa1tFSS9SB7AQUULBbcHL
 +2dFlFOEb5SV1sNiNPrJ0W+h2qUh2e7kPB0F8epaBppgbwVdyQoC2u4uuLV2ZN0=
 =lI2r
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc4' into next

Synchronize with mainline to bring in the new keycode definitions and
new hwmon API.
2013-12-16 02:04:49 -08:00
Stephen Boyd
1e63bd9cc4 Input: pmic8xxx-pwrkey - migrate to regmap APIs
Use the regmap APIs for this driver instead of custom pm8xxx
APIs. This breaks this driver's dependency on the pm8xxx APIs and
allows us to easily port it to other bus protocols in the future.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-15 03:59:41 -08:00
Stephen Boyd
b27f8fee49 Input: pmic8xxx-pwrkey - pass input device directly to interrupt
Instead of passing the pointer to the container structure just
pass the input device here. This saves a dereference in the fast
path.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-15 03:58:56 -08:00
Stephen Boyd
21014b8025 Input: pm8xxx-vibrator - migrate to regmap APIs
Use the regmap APIs for this driver instead of custom pm8xxx
APIs. This breaks this driver's dependency on the pm8xxx APIs and
allows us to easily port it to other bus protocols in the future.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-15 03:58:38 -08:00
Stephen Boyd
12a5a8fdfb Input: pm8xxx-vibrator - switch to using managed resources
Simplify the error paths and reduce the lines of code in this
driver by using the devm_* APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-15 03:58:31 -08:00
Rashika Kheria
9222d8069d Input: cyttsp - include appropriate header file in cyttsp_i2c_common.c
Include cyttsp4_core.h in cyttsp_i2c_common.c to ensure that implementation
of cyttsp_i2c_read_block_data() and cyttsp_i2c_write_block_data()
match what the rest of the driver expects.

Thus, it also eliminates the following warning in cyttsp_i2c_common.c:
drivers/input/touchscreen/cyttsp_i2c_common.c:34:5: warning: no previous prototype for ‘cyttsp_i2c_read_block_data’ [-Wmissing-prototypes]
drivers/input/touchscreen/cyttsp_i2c_common.c:64:5: warning: no previous prototype for ‘cyttsp_i2c_write_block_data’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-15 02:54:04 -08:00
Michael Hennerich
241ecf1ce5 Input: adxl34x - Fix bug in definition of ADXL346_2D_ORIENT
Coverity report pointet out by Dmitry

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-09 22:23:31 -08:00
Dmitry Torokhov
e696c68363 Input: serio - fix sysfs layout
Restore previous layout of sysfs attributes that was broken by commit
3778a2129b (input: serio: remove bus usage of
dev_attrs) which moved all serio device attributes into 'id' group, when
only 'type', 'proto', 'id', and 'extra' should be in 'id' group and the
rest of attributes should be attached directly to the device.

Reported-by: Thomas Hellstrom <thellstrom@vmware.com>
Tested-by: Thomas Hellstrom <thellstrom@vmware.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-09 22:23:26 -08:00
Dmitry Torokhov
5d43889c07 Linux 3.13-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSogqUAAoJEHm+PkMAQRiGM2MIAJrr5KEXEWuuAR4+JkkWBK7A
 +dVT4n1MM4wP/aCIyriSlq7kgT03Wxk4Q4wKsj2wZvDQkNgEQjrctgIihc75jqi5
 126nmT3YXJLwgDpFA3RHZUWve3j3vfUG53rRuk7K9Xx1sGWU3Ls7BuInvQZ//+QS
 6UB4UuEAalmose5U8ToXQfMqZhjwreZKeb64TEZwFvu2klv4cnka1L/zHbmQGgRg
 2Pfv+aUrjsYE8s9lkEKX8MIQsDn28Q5Lsv7XIEQwo2at4rYbJaxX6usuC1OI0MQ5
 BLUn1GgtvOidq6FzSg6kXiA/MJYH3J0S+p4uULWAprxA+KeJRbWNRroM94W1qAk=
 =1Wcq
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc3' into for-linus

Merging with the mainline to sync up on changes to serio core.
2013-12-09 22:22:40 -08:00
Dmitry Torokhov
670d20725e Input: samsung-keypad - favor platform data if present
We should be able to override firmware-provided parameters with in-kernel
data, if needed. To that effect favor platform data, if present, over
devicetree data.

Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-07 02:20:41 -08:00
Jingoo Han
c838cb3d47 Input: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-06 02:06:29 -08:00
Laurent Pinchart
54f05e9513 Input: sh_keysc - restrict non-COMPILE_TEST compilation
Hardware supported by the driver is only found on SUPERH or
ARCH_SHMOBILE platforms. Restrict non-COMPILE_TEST compilation to them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-05 12:51:21 -08:00
Yunkang Tang
95f75e9158 Input: ALPS - add support for DualPoint device on Dell XT2 model
The device uses special MPU controller that necessitates the new
initialization sequence for the device. We also define a new protocol for
the trackpad that allows reporting better resolution than older V2
protocol.

Signed-off-by: Yunkang Tang <yunkang.tang@cn.alps.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-05 12:50:18 -08:00
Matt Walker
9cb80b965e Input: elantech - add support for newer (August 2013) devices
Added detection for newer Elantech touchpads, so that kernel doesn't
fall-back to default PS/2 driver. Supports touchpads released after
~August 2013.  Fixes bug:
https://lists.launchpad.net/kernel-packages/msg18481.html

Tested on an Acer Aspire S7-392-6302.

Signed-off by: Matt Walker <matt.g.d.walker@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-05 12:49:49 -08:00
Christian Engelmayer
4ef38351d7 Input: usbtouchscreen - separate report and transmit buffer size handling
This patch supports the separate handling of the USB transfer buffer length
and the length of the buffer used for multi packet support. For devices
supporting multiple report or diagnostic packets, the USB transfer size is now
limited to the USB endpoints wMaxPacketSize - otherwise it defaults to the
configured report packet size as before.

This fixes an issue where event reporting can be delayed for an arbitrary
time for multi packet devices. For instance the report size for eGalax devices
is defined to the 16 byte maximum diagnostic packet size as opposed to the 5
byte report packet size. In case the driver requests 16 byte from the USB
interrupt endpoint, the USB host controller driver needs to split up the
request into 2 accesses according to the endpoints wMaxPacketSize of 8 byte.
When the first transfer is answered by the eGalax device with not less than
the full 8 byte requested, the host controller has got no way of knowing
whether the touch controller has got additional data queued and will issue
the second transfer. If per example a liftoff event finishes at such a
wMaxPacketSize boundary, the data will not be available to the usbtouch driver
until a further event is triggered and transfered to the host. From user
perspective the BTN_TOUCH release event in this case is stuck until the next
touch down event.

Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-01 22:18:04 -08:00
Dmitry Torokhov
b884eb8c85 Input: sur40 - suppress false uninitialized variable warning
We will never use packet_id before initializing it as we start with
"need_blobs == -1" and will set packet_id there.

Also use le32_to_cpu when fetching header->packet_id.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-01 22:17:35 -08:00
Fabio Estevam
c52b4fc781 Input: ads7846 - use IS_ENABLED() macro
Using the IS_ENABLED() macro can make the code shorter and simpler

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-01 22:16:44 -08:00
Alexander Shiyan
976358e234 Input: add a new driver for GPIO beeper
This patch adds a new driver for the beeper controlled via GPIO pin.
The driver does not depend on the architecture and is positioned as
a replacement for the specific drivers that are used for this function.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-26 15:54:49 -08:00