Commit graph

575631 commits

Author SHA1 Message Date
Martin Kepplinger
1afca2b66a Input: add Pegasus Notetaker tablet driver
This adds a driver for the Pegasus Notetaker Pen. When connected,
this uses the Pen as an input tablet.

This device was sold in various different brandings, for example
 "Pegasus Mobile Notetaker M210",
 "Genie e-note The Notetaker",
 "Staedtler Digital ballpoint pen 990 01",
 "IRISnotes Express" or
 "NEWLink Digital Note Taker".

Here's an example, so that you know what we are talking about:
http://www.genie-online.de/genie-e-note-2/

https://pegatech.blogspot.com/ seems to be a remaining official resource.

This device can also transfer saved (offline recorded handwritten) data and
there are userspace programs that do this, see https://launchpad.net/m210
(Well, alternatively there are really fast scanners out there :)

It's *really* fun to use as an input tablet though! So let's support this
for everybody.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-06-02 10:00:17 -07:00
Andrew F. Davis
520d826777 Input: ti_am335x_tsc - use variable name for sizeof() operator
Fix the code formatting to use the kernel preferred style
of using the actual variables to determize the size using
the sizeof() operator.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-06-01 14:21:11 -07:00
KT Liao
0fd80a77e4 Input: update input_mt_report_pointer_emulation to support hovering
For devices that are incapable of reporting per-contact distance and can
only report ABS_DISTANCE, just distance is not enough for upper layers of
OS to determine whether contact is leaving the area or if it is continuing
hovering, we need BTN_TOOL_FINGER for that:

                                   Contact State
                    Inactive          Hovering            Active
                   (far away)    (inside hover area)  (touching surface)
BTN_TOUCH              0                 0                   1
BTN_TOOL_FINGER        0                 1                   1
ABS_DISTANCE          N/A                1                   0

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-06-01 14:21:10 -07:00
Dmitry Torokhov
cd467299c1 Input: raydium_i2c_ts - do not ignore EPROBE_DEFER from gpiod_get_optional
We should not be ignoring -EPROBE_DEFER reported by
devm_gpiod_get_optional(), but report it as any other error to the upper
layers. While we are at it simplify check for the presence of reset GPIO
and instead of using IS_ERR_OR_NULL just use boolean.

Also do not return -ENOMEM from suspend handler when the device in
bootloader mode as that does not make sense and switch to -EBUSY instead.

Reported-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-06-01 11:18:59 -07:00
Jeffrey Lin
48a2b78348 Input: add Raydium I2C touchscreen driver
This adds support for Raydium I2C touch controllers compatible with
RM32380.

Signed-off-by: Jeffrey Lin <jeffrey.lin@rad-ic.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-27 17:08:31 -07:00
Stephen Just
72fb4765ac Input: surface3_spi - add surface pen support for Surface 3
This change creates a second input device which will handle input from
a Surface Pen. The Surface Pen supplies a different packet header than
touch events, so it is simple to handle one or the other.

This patch handles both the newer Surface Pen with one button, and the
older variant with a second button to switch to Eraser mode.

Signed-off-by: Stephen Just <stephenjust@gmail.com>
Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-27 16:33:34 -07:00
Stephen Just
427ee20610 Input: surface3_spi - Prepare to add support for Surface Pen
Surface Pens can be supported by handling a second report type. Prepare
for this change.

Signed-off-by: Stephen Just <stephenjust@gmail.com>
Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-27 16:33:32 -07:00
Clifton Barnes
c95d6d966e Input: tc3589x-keypad - remove stray ')'
The end ')' needs to be removed if the macro is ever used or there
would be a compiler error as it does not have a matching '('.

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-25 17:37:15 -07:00
Benjamin Tissoires
4feacbc24e Input: add new driver for the Surface 3
This is a basic driver for the Surface 3. I am not so sure it will work
with any firmwares as most values are encoded, but given that I only have
access to my current device with its firmware and I don't have the
datasheet, it should be OK for now.

The Surface Pen is not supported (if it is supposed to be). I'll work on
this when I get one.

Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-19 09:35:19 -07:00
Dmitry Torokhov
b55eb29841 Input: feed more data into entropy pool
Commit 4369c64c79 ("Input: Send events one packet at a time")
significantly reduced amount of entropy input core was feeding to the rest
of the system, because only the very first event in the event block would
be used as source of entropy.

With this change we will be calling add_input_randomness() for every event
that is not filtered by the input core as a duplicate. In addition, all
EV_SYN events are ignored.

Acked-by: Henrik Rydberg <rydberg@bitmath.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-19 09:35:18 -07:00
Nick Dyer
e9000b7978 Input: synaptics-rmi4 - fix spelling in defines
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Reviewed-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-19 09:35:16 -07:00
Arnd Bergmann
c32feb03ae Input: migor-ts - mark PM functions as __maybe_unused
The migor touchscreen driver is now available for COMPILE_TEST,
so we run into a harmless randconfig warning on ARM when CONFIG_PM
is disabled:

drivers/input/touchscreen/migor_ts.c:216:12: error: 'migor_ts_resume' defined but not used [-Werror=unused-function]
drivers/input/touchscreen/migor_ts.c:205:12: error: 'migor_ts_suspend' defined but not used [-Werror=unused-function]

This shuts up the warning by marking the two functions as __maybe_unused.
We could do the same thing by adding an #ifdef, but this version is
more reliable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-19 09:35:15 -07:00
Arnd Bergmann
14f935f9a4 Input: atmel_captouch - add dependence on i2c
The newly added Atmal captouch driver fails to build when CONFIG_I2C
is disabled:

drivers/input/misc/atmel_captouch.c: In function 'atmel_read':
drivers/input/misc/atmel_captouch.c:115:8: error: implicit declaration of function 'i2c_transfer' [-Werror=implicit-function-declaration]

This adds an explicit Kconfig dependency to prevent the broken
configuration.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: b06d43f7a3 ("Input: add Atmel Captouch Button driver")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-19 09:35:14 -07:00
Daniel Hung-yu Wu
b06d43f7a3 Input: add Atmel Captouch Button driver
Add I2C driver for Atmel Capacitive Touch Button device.

Signed-off-by: Hung-yu Wu <hywu@google.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-18 15:08:19 -07:00
Javier Martinez Canillas
db36ae8516 Input: migor-ts - allow driver to build if COMPILE_TEST is enabled
The driver only has runtime but no build time dependency with SH_MIGOR, so
it can be built for testing purposes if the COMPILE_TEST option is enabled.

This is useful to have more build coverage and make sure that drivers are
not affected by changes that could cause build regressions.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-18 15:08:18 -07:00
Javier Martinez Canillas
8f4decc307 Input: migor-ts - fix error for modular build
There is a typo in the driver for the I2C device table that is passed to
the MODULE_DEVICE_TABLE() macro, this leads to the following build error:

  CC [M]  drivers/input/touchscreen//migor_ts.o
drivers/input/touchscreen//migor_ts.c:233:21: error: 'migor_ts' undeclared here (not in a function)
 MODULE_DEVICE_TABLE(i2c, migor_ts);
                     ^
drivers/input/touchscreen//migor_ts.c:233:31: error: '__mod_i2c__migor_ts_device_table' aliased to undefined symbol 'migor_ts'
 MODULE_DEVICE_TABLE(i2c, migor_ts);
                               ^
scripts/Makefile.build:295: recipe for target 'drivers/input/touchscreen//migor_ts.o' failed
make[1]: *** [drivers/input/touchscreen//migor_ts.o] Error 1
Makefile:1446: recipe for target '_module_drivers/input/touchscreen/' failed
make: *** [_module_drivers/input/touchscreen/] Error 2

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-18 15:08:16 -07:00
Clifton Barnes
d96caf8c33 Input: rotary-encoder - fix bare use of 'unsigned'
fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of
'unsigned''

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-09 17:06:31 -07:00
Ming Lei
d144cf42ee Input: cm109 - spin_lock in complete() cleanup
Complete() will be run with interrupt enabled, so change to
spin_lock_irqsave().

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-04 16:01:42 -07:00
Florian Euchner
c90a0f08fe Input: cm109 - fix handling of volume and mute buttons
The CM109 driver reported key press events of volume up / down and
record / playback mute buttons, but no release events. Report those events
properly by handling volume and mute keys seperately. For the record and
playback mute buttons, only presses are registered by the CM109, therefore
simulate press-n-release. This fixes the volume control buttons of various
USB headsets.

Signed-off-by: Florian Euchner <florian.euchner@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-04 16:00:54 -07:00
Vladimir Zapolskiy
5ad629a82d Input: byd - don't wipe dynamically allocated memory twice
Since memory for a private data is allocated by kzalloc() there is no
need to fill it with zeroes immediately after the allocation.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-29 13:59:01 -07:00
Rui Teng
82ba0d8ba4 Input: twl4030 - fix unsafe macro definition
The bitwise shift operator has lower priority than plus operator. So the
values on macros should be enclosed in parentheses.

For example, "(1 << 4 + 1)" means "(1 << (4 + 1))", but it is not expected
by the macros.

And also fix other two coding style problems reported by
scripts/checkpatch.pl.

Signed-off-by: Rui Teng <rui.teng@linux.vnet.ibm.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-29 13:59:00 -07:00
H. Nikolaus Schaller
9e4cc255e6 Input: twl6040-vibra - remove mutex
The mutex does not seem to be needed. twl4030-vibra doesn't
use one either.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-25 14:06:56 -07:00
Geert Uytterhoeven
2d077d9f4e Input: bcm_iproc_tsc - DT spelling s/clock-name/clock-names/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-20 14:39:56 -07:00
Raveendra Padasalagi
74813cebd6 Input: bcm_iproc_tsc - use syscon to access shared registers
In Cygnus SOC touch screen controller registers are shared with ADC and
flex timer. Using readl/writel could lead to race condition. So touch
screen driver is enhanced to support register access using syscon framework
API's to take care of mutually exclusive access.

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-06 16:11:56 -07:00
Dmitry Torokhov
20aa787e45 Input: ti_am335x_tsc - use SIMPLE_DEV_PM_OPS
Instead of doing the dance with macro that either resolves to a pointer or
NULL, let's switch to using SIMPLE_DEV_PM_OPS().

Also let's mark suspend and resume methods as __maybe_unused instead of
guarding them with an #ifdef and rely on linker to drop unused code. Doing
so should allow better compile coverage.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-05 10:17:51 -07:00
Dmitry Torokhov
b5ca3ea327 Input: omap-keypad - remove set_col_gpio_val() and get_row_gpio_val()
Commit f799a3d8fe ("Input: omap-keypad:
Remove dependencies to mach includes") removed users of the above
functions, but left them in the code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-05 10:17:19 -07:00
Dmitry Torokhov
a56f9235c9 Input: omap-keypad - drop empty PM stubs
There is no reason to have empty suspend and resume stubs.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-05 10:17:18 -07:00
Dmitry Torokhov
9401668073 Input: omap-keypad - remove adjusting of scan delay
As of 35f8679f57 ("Input: omap-keypad -
remove dead check") we no longer declare keypresses as spurious, therefore
we can use constant delay between scans.

Suggested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-05 10:17:18 -07:00
Andreas Färber
7d8d862523 Input: gpio-keys - clean up device tree binding example
Drop #address-cells and #size-cells, which are not required by the
gpio-keys binding documentation, as button sub-nodes are not devices.

Rename sub-nodes to avoid new dtc unit address warnings when copied.

While at it, adopt the dashes convention for the node name.

Reported-by: Julien Chauveau <chauveau.julien@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Julien Chauveau <chauveau.julien@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-31 13:13:43 -07:00
Oliver Neukum
8f7292ed88 Input: kbtab - stop saving struct usb_device
The device can now easily be derived from the interface.
Stop leaving a private copy.

Signed-off-by: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-31 13:13:42 -07:00
Oliver Neukum
ed752e5dde Input: gtco - stop saving struct usb_device
The device can now easily be derived from the interface.
Stop leaving a private copy.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-31 13:13:41 -07:00
Oliver Neukum
c630901860 Input: aiptek - stop saving struct usb_device
The device can now easily be derived from the interface.
Stop leaving a private copy.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-31 13:13:40 -07:00
Oliver Neukum
7edf2c9c08 Input: acecad - stop saving struct usb_device
The device can now easily be derived from the interface.
Stop leaving a private copy.

Signed-off-by: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-31 13:13:39 -07:00
Oliver Neukum
d314e9e80c Input: sur40 - fix DMA on stack
During the initialisation the driver uses a buffer on the stack for DMA.
That violates the cache coherency rules. The fix is to allocate the buffer
with kmalloc().

Signed-off-by: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-23 17:29:30 -07:00
Vladis Dronov
950336ba3e Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
The ati_remote2 driver expects at least two interfaces with one
endpoint each. If given malicious descriptor that specify one
interface or no endpoints, it will crash in the probe function.
Ensure there is at least two interfaces and one endpoint for each
interface before using it.

The full disclosure: http://seclists.org/bugtraq/2016/Mar/90

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-23 17:29:29 -07:00
Benjamin Tissoires
82be788c96 Input: synaptics - handle spurious release of trackstick buttons, again
Looks like the fimware 8.2 still has the extra buttons spurious release
bug.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=114321
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-17 17:15:57 -07:00
Andrew Duggan
a1376d3de4 Input: synaptics-rmi4 - remove check of Non-NULL array
Originally the irq_mask member of rmi_function was a pointer. Then it was
switched to being a zero length array. However, the checks for a NULL
pointer where not removed.

Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-17 17:15:56 -07:00
Richard Pospesel
2d5f5611dd Input: byd - enable absolute mode
The Windows driver's settings dialog contains a visualization of the
regions for the hardware edge scrolling capability, which uses a
temporarily-enabled limited-resolution absolute mode.

This patch enables this during normal operation, and combines the
absolute packets with the existing relative packets to provide
accurate absolute position and touch reporting.

It also adds documentation for all known gesture packets and
initialization commands.

Reviewed-by: Chris Diamand <chris@diamand.org>
Signed-off-by: Richard Pospesel <pospeselr@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-17 17:04:54 -07:00
Oliver Neukum
a0ad220c96 Input: ims-pcu - sanity check against missing interfaces
A malicious device missing interface can make the driver oops.
Add sanity checking.

Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-17 14:16:57 -07:00
Sangwon Jee
9aa40426a4 Input: melfas_mip4 - add hw_version sysfs attribute
Add hw_version sysfs attribute for retrieving hardware information
from firmware.

Signed-off-by: Sangwon Jee <jeesw@melfas.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-16 16:25:41 -07:00
Arnd Bergmann
4d2508a559 ARM: pxa/raumfeld: use PROPERTY_ENTRY_INTEGER to define props
gcc-6.0 notices that the use of the property_entry in this file that
was recently introduced cannot work right, as we initialize the wrong
field:

raumfeld.c:387:3: error: the address of 'raumfeld_rotary_encoder_steps' will always evaluate as 'true' [-Werror=address]
   DEV_PROP_U32, 1, &raumfeld_rotary_encoder_steps, },
   ^~~~~~~~~~~~
raumfeld.c:389:3: error: the address of 'raumfeld_rotary_encoder_axis' will always evaluate as 'true' [-Werror=address]
   DEV_PROP_U32, 1, &raumfeld_rotary_encoder_axis, },
   ^~~~~~~~~~~~
raumfeld.c:391:3: error: the address of 'raumfeld_rotary_encoder_relative_axis' will always evaluate as 'true' [-Werror=address]
   DEV_PROP_U32, 1, &raumfeld_rotary_encoder_relative_axis, },
   ^~~~~~~~~~~~

The problem appears to stem from relying on an old definition of
'struct property', but it has changed several times since the code
could have last been correct.

This changes the code to use the PROPERTY_ENTRY_INTEGER() macro instead,
which works fine for the current definition and is a safer way of doing
the initialization.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: a9e340dce3 ("Input: rotary_encoder - move away from platform data structure")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-15 16:56:46 -07:00
Dmitry Torokhov
245f0db0de Linux 4.5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJW5j4RAAoJEHm+PkMAQRiGhVEH/0qZbM1J+WnCK92bm9+inCnB
 JO2JViGIuCQB5BxljVMil2dzrw85D+dC7+fryr0wVBhhBlr0lXPJGSYCYYTEaI20
 Wco5YlTmjRirUwmxWzBXvB5kvTdIaNfNYDcFch6lbsaLUNgqydNKtk08ckO/4k0D
 AmaShW8swBiXE/RmHuj8H41ksHsnY8W62dlczEaAIfr4kluPX/kKnyXpmpvmZm1j
 sM4fskPlq+Jz5pOXXFsFfrhiBgpSUnwSj1tNwK5+DkmaVnWOkPuwkqLBWqpy4pzm
 GTeDBdf5/ixGxgNsZ2VWtbPnc2wEP7SIcu45MU7QFw5kqwDN2nN63BRVXI5Z5qY=
 =RFx2
 -----END PGP SIGNATURE-----

Merge tag 'v4.5' into next

Merge with Linux 4.5 to get PROPERTY_ENTRY_INTEGER() that is needed to
fix pxa/raumfeld rotary encoder properties.
2016-03-15 16:54:45 -07:00
Dan Carpenter
24672bdfb3 Input: synaptics-rmi4 - using logical instead of bitwise AND
There is a typo so we have && instead of &.

Fixes: ff8f83708b ('Input: synaptics-rmi4 - add support for 2D sensors and F11')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-15 16:54:22 -07:00
Josh Boyer
9c6ba45671 Input: powermate - fix oops with malicious USB descriptors
The powermate driver expects at least one valid USB endpoint in its
probe function.  If given malicious descriptors that specify 0 for
the number of endpoints, it will crash.  Validate the number of
endpoints on the interface before using them.

The full report for this issue can be found here:
http://seclists.org/bugtraq/2016/Mar/85

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-14 09:36:49 -07:00
Linus Torvalds
b562e44f50 Linux 4.5 2016-03-13 21:28:54 -07:00
Linus Torvalds
a265554988 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle:
 "Another round of MIPS fixes for 4.5:

   - Fix JZ4780 build with DEBUG_ZBOOT and MACH_JZ4780
   - Fix build with DEBUG_ZBOOT and MACH_JZ4780
   - Fix issue with uninitialised temp_foreign_map
   - Fix awk regex compile failure with certain versions of awk.  At
     this time, the sole user, ld-ifversion, is only used on MIPS"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: smp.c: Fix uninitialised temp_foreign_map
  MIPS: Fix build error when SMP is used without GIC
  ld-version: Fix awk regex compile failure
  MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4780
2016-03-13 13:04:46 -07:00
James Hogan
d825c06bfe MIPS: smp.c: Fix uninitialised temp_foreign_map
When calculate_cpu_foreign_map() recalculates the cpu_foreign_map
cpumask it uses the local variable temp_foreign_map without initialising
it to zero. Since the calculation only ever sets bits in this cpumask
any existing bits at that memory location will remain set and find their
way into cpu_foreign_map too. This could potentially lead to cache
operations suboptimally doing smp calls to multiple VPEs in the same
core, even though the VPEs share primary caches.

Therefore initialise temp_foreign_map using cpumask_clear() before use.

Fixes: cccf34e941 ("MIPS: c-r4k: Fix cache flushing for MT cores")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12759/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-03-13 10:59:19 +01:00
Hauke Mehrtens
7a50e4688d MIPS: Fix build error when SMP is used without GIC
The MIPS_GIC_IPI should only be selected when MIPS_GIC is also
selected, otherwise it results in a compile error. smp-gic.c uses some
functions from include/linux/irqchip/mips-gic.h like
plat_ipi_call_int_xlate() which are only added to the header file when
MIPS_GIC is set. The Lantiq SoC does not use the GIC, but supports SMP.
The calls top the functions from smp-gic.c are already protected by
some #ifdefs

The first part of this was introduced in commit 72e20142b2 ("MIPS:
Move GIC IPI functions out of smp-cmp.c")

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: stable@vger.kernel.org # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12774/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-03-13 10:56:48 +01:00
James Hogan
4b7b1ef2c2 ld-version: Fix awk regex compile failure
The ld-version.sh script fails on some versions of awk with the
following error, resulting in build failures for MIPS:

awk: scripts/ld-version.sh: line 4: regular expression compile failed (missing '(')

This is due to the regular expression ".*)", meant to strip off the
beginning of the ld version string up to the close bracket, however
brackets have a meaning in regular expressions, so lets escape it so
that awk doesn't expect a corresponding open bracket.

Fixes: ccbef1674a ("Kbuild, lto: add ld-version and ld-ifversion ...")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Tested-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Cc: Michal Marek <mmarek@suse.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org # 4.4.x-
Patchwork: https://patchwork.linux-mips.org/patch/12838/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-03-13 10:54:42 +01:00
Aaro Koskinen
ba9e72c229 MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4780
Ingenic SoC declares ZBOOT support, but debug definitions are missing
for MACH_JZ4780 resulting in a build failure when DEBUG_ZBOOT is set.
The UART addresses are same as with JZ4740, so fix by covering JZ4780
with those as well.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12830/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-03-13 10:50:46 +01:00