Mark Brown [Thu, 28 Apr 2011 06:08:34 +0000 (23:08 -0700)]
Input: wm831x-ts - fix races with IRQ management
If the WM831x pen down and data IRQs run in parallel it is possible for the
data and pen down IRQs to deadlock themselves as one is part way through
disabling its operation while the other is part way through enabling. Fix
this by always disabling the pen down interrupt while data is active and
vice versa. When a changeover is required we disable the IRQ that is to
be stopped then schedule work that will enable the new IRQ.
We need to handle the data flow in the data IRQ as the readback from the
device needs to be ordered correctly with the IRQ for robust operation.
This also fixes an issue when using the built in IRQs due to enable_irq()
not being valid from interrupt context on an interrupt controller with bus
operations like the built in IRQ controller - this issue may also have
affected other interrupt controllers. We can't rely on having the data
and pen down IRQs available via GPIOs on the CPU on every system.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Igor Mammedov [Mon, 18 Apr 2011 17:17:17 +0000 (10:17 -0700)]
Input: xen-kbdfront - fix mouse getting stuck after save/restore
Mouse gets "stuck" after restore of PV guest but buttons are in working
condition.
If driver has been configured for ABS coordinates at start it will get
XENKBD_TYPE_POS events and then suddenly after restore it'll start getting
XENKBD_TYPE_MOTION events, that will be dropped later and they won't get
into user-space.
Regression was introduced by hunk 5 and 6 of 5ea5254aa0ad269cfbd2875c973ef25ab5b5e9db
("Input: xen-kbdfront - advertise either absolute or relative
coordinates").
Driver on restore should ask xen for request-abs-pointer again if it is
available. So restore parts that did it before 5ea5254.
Acked-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
[v1: Expanded the commit description] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Jeff Brown [Wed, 13 Apr 2011 06:29:38 +0000 (23:29 -0700)]
Input: evdev - indicate buffer overrun with SYN_DROPPED
Add a new EV_SYN code, SYN_DROPPED, to inform the client when input
events have been dropped from the evdev input buffer due to a
buffer overrun. The client should use this event as a hint to
reset its state or ignore all following events until the next
packet begins.
Signed-off-by: Jeff Brown <jeffbrown@android.com>
[dtor@mail.ru: Implement Henrik's suggestion and drop old events in
case of overflow.] Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Chase Douglas [Wed, 13 Apr 2011 06:29:07 +0000 (23:29 -0700)]
Input: document event types and codes and their intended use
This commit adds the file Documentation/input/event-codes.txt.
Acked-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Jarod Wilson [Wed, 13 Apr 2011 06:13:08 +0000 (23:13 -0700)]
Input: add KEY_IMAGES specifically for AL Image Browser
Many media center remotes have buttons intended for jumping straight to
one type of media browser or another -- commonly, images/photos/pictures,
audio/music, television, and movies. At present, remotes with an images
or photos or pictures button use any number of different keycodes which
sort of maybe fit. I've seen at least KEY_MEDIA, KEY_CAMERA,
KEY_GRAPHICSEDITOR and KEY_PRESENTATION. None of those seem quite right.
In my mind, KEY_MEDIA should be something more like a media center
application launcher (and I'd like to standardize on that for things
like the windows media center button on the mce remotes). KEY_CAMERA is
used in a lot of webcams, and typically means "take a picture now".
KEY_GRAPHICSEDITOR implies an editor, not a browser. KEY_PRESENTATION
might be the closest fit here, if you think "photo slide show", but it
may well be more intended for "run application in full-screen
presentation mode" or to launch something like magicpoint, I dunno.
And thus, I'd like to have a KEY_IMAGES, which matches the HID Usage AL
Image Browser, the meaning of which I think is crystal-clear. I believe
AL Audio Browser is already covered by KEY_AUDIO, and AL Movie Browser
by KEY_VIDEO, so I'm also adding appropriate comments next to those
keys.
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Paul Bolle [Thu, 31 Mar 2011 07:11:48 +0000 (00:11 -0700)]
Input: i8042 - downgrade selftest error message to dbg()
On a "really fragile" laptop I noticed a single
i8042.c: i8042 controller selftest failed. (0x1 != 0x55)
error in the log. But there's no reason to print this message at
KERN_ERR level each time that loop fails, especially since the message
telling about the overall selftest failure is printed at KERN_INFO level
(on X86).
Add an actual error message for non-X86 systems, where a selftest
failure is (apparently) more serious. Remove a space in an another error
message.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Jan Beulich [Thu, 31 Mar 2011 07:01:58 +0000 (00:01 -0700)]
Input: synaptics - fix crash in synaptics_module_init()
'struct dmi_system_id' arrays must always have a terminator to keep
dmi_check_system() from looking at data (and possibly crashing) it
isn't supposed to look at.
Peter Hutterer [Thu, 31 Mar 2011 05:25:34 +0000 (22:25 -0700)]
Input: uinput - allow for 0/0 min/max on absolute axes.
Some devices provide absolute axes with min/max of 0/0 (e.g. wacom's
ABS_MISC axis). Current uinput restrictions do not allow duplication of
these devices and require hacks in userspace to work around this.
If the kernel accepts physical devices with a min/max of 0/0, uinput
shouldn't disallow the same range.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Ping Cheng [Sun, 27 Mar 2011 04:16:05 +0000 (21:16 -0700)]
Input: wacom - report resolution for pen devices
Touch resolution is reported to the userland by retrieving the value
from the HID descriptor. But pen resolution is not since it can not
be retrieved. The current Wacom X driver has a resolution table.
To centralize the source of these values, the resolution entries are
added in the wacom_features struct for x and y coordinates respectively.
The values are then reported to the userland.
Aaro Koskinen [Thu, 24 Mar 2011 06:48:19 +0000 (23:48 -0700)]
Input: tsc2005 - fix locking issue
Commit 0b950d3 (Input: tsc2005 - add open/close) introduced a
locking issue with the ESD watchdog: __tsc2005_disable() is calling
cancel_delayed_work_sync() with mutex held, and the work also needs the
same mutex.
Fix the problem by using mutex_trylock() in tsc2005_esd_work(). If the
mutex is taken, we know we are in the middle of disable or enable and
the watchdog check can be skipped.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: tsc2005 - driver should depend on GENERIC_HARDIRQS
drivers/input/touchscreen/tsc2005.c: In function ‘tsc2005_probe’:
drivers/input/touchscreen/tsc2005.c:666: error: implicit declaration of function ‘set_irq_wake’
In addition, migrate from set_irq_wake() (marked "do not use" as of commit a0cd9ca2b907d7ee26575e7b63ac92dad768a75e ("genirq: Namespace cleanup")) to
irq_set_irq_wake().
Dmitry Torokhov [Thu, 17 Mar 2011 05:11:41 +0000 (22:11 -0700)]
Input: tsc2005 - remove 'disable' sysfs attribute
I believe that enable/disable functionality should not be implemented on
the individual driver level but rather in device core, potentially
reusing parts of PM framework. Therefore the driver-specific "disable"
attribute is removed from the mainline driver.
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Thu, 17 Mar 2011 05:11:34 +0000 (22:11 -0700)]
Input: tsc2005 - add open/close
Introduce open and close methods for the input device to keep the device
powered down when it is not in use. Also rework interaction between
interrupt thread and starting/shutting off/resetting the device: instead
of taking a mutex in the intterrupt thread and elsewhere disable interrupts
before transitioning the device in a new state.
The ESD handling is also separated from the IRQ thread; we poll regularly
at a given interval and simply skip reads if we see that valid interrupt
happened not so long ago. This allows us not cancel and reschedule ESD
work from interrupt context all the time.
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Thu, 17 Mar 2011 05:11:08 +0000 (22:11 -0700)]
Input: tsc2005 - don't use work for 'pen up' handling
We do not need process context to send input events so let's switch to
a regular timer. I am going to get rid of taking ts->mutex in
tsc2005_irq_thread() later.
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Thu, 17 Mar 2011 05:10:52 +0000 (22:10 -0700)]
Input: tsc2005 - do not use 0 in place of NULL
Sparse in unhappy when people use 0 instead of NULL for pointers so
let's rework the way we initialize spi_transfer structure in
tsc2005_cmd() and tsc2005_write().
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Thu, 17 Mar 2011 05:10:37 +0000 (22:10 -0700)]
Input: tsc2005 - hide selftest attribute if we can't reset
If implementation to perform self-test/reset has not been provided by the
platform code hide 'selftest' sysfs attribute instead of returning error
when someone tries to use it.
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Thu, 17 Mar 2011 05:08:08 +0000 (22:08 -0700)]
Input: tsc2005 - use spi_get/set_drvdata()
Instead of peeking into underlying device and using dev_get/set_drvdata(),
let's use SPI layer's implementation to access driver-private data
(which may be different from driver-core private data).
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Introduce a driver for the Texas Instruments TSC2005 touchscreen
controller (http://focus.ti.com/docs/prod/folders/print/tsc2005.html).
The patch is based on a driver by Lauri Leukkunen, with modifications
by David Brownell, Phil Carmody, Imre Deak, Hiroshi DOYU, Ari Kauppi,
Tony Lindgren, Jarkko Nikula, Eero Nurkkala and Roman Tereshonkov.
Signed-off-by: Lauri Leukkunen <lauri.leukkunen@nokia.com>
[aaro.koskinen@nokia.com: patch description, rebasing & cleanup] Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
[ext-srikar.1.bhavanarayana@nokia.com: various fixes] Signed-off-by: Srikar <ext-srikar.1.bhavanarayana@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Daniel De Graaf [Thu, 17 Mar 2011 05:52:42 +0000 (22:52 -0700)]
Input: xen-kbdfront - add grant reference for shared page
Without a grant reference, full access to the domain's memory is
required to use the shared page. Add an additional parameter in
xenstore to allow grant mapping to be used.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Olaf Hering [Thu, 17 Mar 2011 05:11:46 +0000 (22:11 -0700)]
Input: xen-kbdfront - advertise either absolute or relative coordinates
A virtualized display device is usually viewed with the vncviewer
application, either by 'xm vnc domU' or with vncviewer localhost:port.
vncviewer and the RFB protocol provides absolute coordinates to the
virtual display. These coordinates are either passed through to a PV
guest or converted to relative coordinates for a HVM guest.
A PV guest receives these coordinates and passes them to the kernels
evdev driver. There it can be picked up by applications such as the
xorg-input drivers. Using absolute coordinates avoids issues such as
guest mouse pointer not tracking host mouse pointer due to wrong mouse
acceleration settings in the guests X display.
Advertise either absolute or relative coordinates to the input system
and the evdev driver, depending on what dom0 provides. The xorg-input
driver prefers relative coordinates even if a devices provides both.
Ping Cheng [Sun, 13 Mar 2011 04:34:42 +0000 (20:34 -0800)]
Input: wacom - support one finger touch the touchscreen way
There are two types of 1FGT devices supported in wacom_wac.c.
Changing them to follow the existing touchscreen format, i.e.,
only report BTN_TOUCH as a valid tool type.
Touch data will be ignored if pen is in proximity. This requires
a touch up event sent if touch was down when pen comes in. The
touch up event should be sent before any pen events are emitted.
Otherwise, two pointers would race for the cursor.
However, we can not send a touch up inside wacom_tpc_pen since
pen and touch are on different logical port. That is why we
have to check if touch is up before sending pen events.
Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Peter Korsgaard [Fri, 25 Feb 2011 17:30:46 +0000 (09:30 -0800)]
Input: evdev - fix evdev_write return value on partial writes
As was recently brought up on the busybox list
(http://lists.busybox.net/pipermail/busybox/2011-January/074565.html),
evdev_write doesn't properly check the count argument, which will
lead to a return value > count on partial writes if the remaining bytes
are accessible - causing userspace confusion.
Fix it by only handling each full input_event structure and return -EINVAL
if less than 1 struct was written, similar to how it is done in evdev_read.
Reported-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Iiro Valkonen [Thu, 24 Feb 2011 05:07:20 +0000 (21:07 -0800)]
Input: atmel_mxt_ts - remove matrix size check
The mxt_check_matrix_size() is currently setting the CTE mode to match
xline/yline information that is in the platform data, but it does not
take into account for example the fact that we could have a key array
in use too (key array would use some x/y lines as well).
It would be better to simply rely on the configuration data, and make
sure that the CTE mode set in there matches the touch object (touchscreen,
key array, proximity) configuration (which are set in the config data too).
HeungJun Kim [Thu, 24 Feb 2011 05:42:49 +0000 (21:42 -0800)]
Input: mcs_touchkey - add shutdown handler
The MCS50XX series has a HW bug that requires explicit chip power down.
If chip is not powered down before shutting the system down the control
pins (powerup, interrupt) are pulled up and residue current continues
flowing into the chips making them continue consuming power.
Signed-off-by: Heungjun Kim <riverful.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Abraham Arce [Wed, 23 Feb 2011 06:25:59 +0000 (22:25 -0800)]
Input: omap4-keypad - wire up runtime PM handling
Enable Runtime PM functionality in OMAP4 driver based on the following
assumptions:
- keyboard controller in wakeup domain so it is always on and power
impact is minimal;
- in OMAP4 the device control is at module/device level and ick/fclk
level control is difficult so cutting of clocks will prevent
interrupts.
Signed-off-by: Abraham Arce <x0066660@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Wed, 23 Feb 2011 16:51:28 +0000 (08:51 -0800)]
Input: serio/gameport - use 'long' system workqueue
Commit 8ee294cd9def0004887da7f44b80563493b0a097 converted serio
subsystem event handling from using a dedicated thread to using
common workqueue. Unfortunately, this regressed our boot times,
due to the fact that serio jobs take long time to execute. While
the new concurrency managed workqueue code manages long-playing
works just fine and schedules additional workers as needed, such
works wreck havoc among remaining users of flush_scheduled_work().
To solve this problem let's move serio/gameport works from system_wq
to system_long_wq which nobody tries to flush.
Dmitry Torokhov [Wed, 23 Feb 2011 04:15:07 +0000 (20:15 -0800)]
Input: synaptics - document 0x0c query
Since Synaptics technical writers department is a bit slow releasing updated
Synaptics interface guide, let's add some new bits (with their blessing)
to the code so that they don't get lost.
Iiro Valkonen [Tue, 15 Feb 2011 21:36:52 +0000 (13:36 -0800)]
Input: atmel_mxt_ts - allow board code to suppliy controller config
As there is no common configuration settings that would work in every
situation, remove the fixed config data from driver code and add
config data to platform data.
Mark Brown [Fri, 11 Feb 2011 16:53:33 +0000 (08:53 -0800)]
Input: synaptics_i2c - convert to dev_pm_ops
There is a general move to convert drivers to dev_pm_ops rather than bus
specific PM ops in order to facilitate core development. Do this converison
for synaptics-i2c.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Mark Brown [Fri, 11 Feb 2011 16:53:04 +0000 (08:53 -0800)]
Input: adxl34x - fix references to adx134x
The adxl34x SPI driver has what appears to be a typo referring to the
device as adx134x with the numeral 1 rather than letter l. This appears
to be an error so convert.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Mark Brown [Fri, 11 Feb 2011 17:22:40 +0000 (09:22 -0800)]
Input: adxl34x-spi - convert to dev_pm_ops
There is a general move to convert drivers to use dev_pm_ops rather than
bus specific ones in order to facilitate core development. Do this
conversion for adxl34x-spi.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Mark Brown [Fri, 11 Feb 2011 16:51:52 +0000 (08:51 -0800)]
Input: adxl34x-i2c - convert to dev_pm_ops
There is a general move to convert drivers to use dev_pm_ops rather than
bus specific ones in order to facilitate core development. Do this
conversion for adxl34x-i2c.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Mark Brown [Fri, 11 Feb 2011 16:50:37 +0000 (08:50 -0800)]
Input: lm8323 - convert to dev_pm_ops
There is a general move away from bus specific PM operations to using
dev_pm_ops in order to facilicate core improvements. Update lm8323 to
the new model.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Mark Brown [Fri, 11 Feb 2011 16:49:37 +0000 (08:49 -0800)]
Input: ad714x-spi - convert to dev_pm_ops
There is a general move to convert drivers to use dev_pm_ops rather than
bus specific PM operations in order to facilitate core work. Do this
conversion for ad714x-spi.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Mark Brown [Fri, 11 Feb 2011 16:49:05 +0000 (08:49 -0800)]
Input: ad714x-i2c - convert to dev_pm_ops
There is a general move to convert drivers to use dev_pm_ops rather than
bus specific PM operations in order to facilitate core work. Do this
conversion for ad714x-i2c.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Fri, 11 Feb 2011 09:10:45 +0000 (01:10 -0800)]
Input: uinput - use memdup_user() and friends
Instead of open-coding copying of data structures from userspace use
memdup_user() and strndup_user(). Note that this introduces change in
behavior because driver used to truncate 'phys' longer than 1024 bytes,
but now it will refuse to set 'phys' that long. Arguably trying to set
such 'phys' is suspect anyways.
David Herrmann [Fri, 11 Feb 2011 09:10:44 +0000 (01:10 -0800)]
Input: uinput - fix setting up device name
The check for non-empty device name was botched since we tried to account
for extra space for the terminating zero at the same time. Convert to
kstrndup() to avoid this problem.
Dmitry Torokhov [Fri, 4 Feb 2011 08:37:26 +0000 (00:37 -0800)]
Input: ads7846 - check proper condition when freeing gpio
When driver uses custom pendown detection method gpio_pendown is not
set up and so we should not try to free it, otherwise we are presented
with:
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:1258 gpio_free+0x100/0x12c()
Modules linked in:
[<c0061208>] (unwind_backtrace+0x0/0xe4) from [<c0091f58>](warn_slowpath_common+0x4c/0x64)
[<c0091f58>] (warn_slowpath_common+0x4c/0x64) from [<c0091f88>](warn_slowpath_null+0x18/0x1c)
[<c0091f88>] (warn_slowpath_null+0x18/0x1c) from [<c024e610>](gpio_free+0x100/0x12c)
[<c024e610>] (gpio_free+0x100/0x12c) from [<c03e9fbc>](ads7846_probe+0xa38/0xc5c)
[<c03e9fbc>] (ads7846_probe+0xa38/0xc5c) from [<c02cff14>](spi_drv_probe+0x18/0x1c)
[<c02cff14>] (spi_drv_probe+0x18/0x1c) from [<c028bca4>](driver_probe_device+0xc8/0x184)
[<c028bca4>] (driver_probe_device+0xc8/0x184) from [<c028bdc8>](__driver_attach+0x68/0x8c)
[<c028bdc8>] (__driver_attach+0x68/0x8c) from [<c028b4c8>](bus_for_each_dev+0x48/0x74)
[<c028b4c8>] (bus_for_each_dev+0x48/0x74) from [<c028ae08>](bus_add_driver+0xa0/0x220)
[<c028ae08>] (bus_add_driver+0xa0/0x220) from [<c028c0c0>](driver_register+0xa8/0x134)
[<c028c0c0>] (driver_register+0xa8/0x134) from [<c0050550>](do_one_initcall+0xcc/0x1a4)
[<c0050550>] (do_one_initcall+0xcc/0x1a4) from [<c00084e4>](kernel_init+0x14c/0x214)
[<c00084e4>] (kernel_init+0x14c/0x214) from [<c005b494>](kernel_thread_exit+0x0/0x8)
---[ end trace 4053287f8a5ec18f ]---
Also rearrange ads7846_setup_pendown() to have only one exit point
returning success.
Reported-by: Sourav Poddar <sourav.poddar@ti.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Reviewed-by: Charulatha V <charu@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Apparently there exist userspace programs that expect to be able to
"loop back" and distribute to readers events written into
/dev/input/eventX and this change made for the benefit of SysRq
handler broke them. Now that SysRq uses alternative method to suppress
filtering of the events it re-injects we can safely revert this change.
Dmitry Torokhov [Thu, 3 Feb 2011 06:59:54 +0000 (22:59 -0800)]
Input: sysrq - rework re-inject logic
Internally 'disable' the filter when re-injecting Alt-SysRq instead
of relying on input core to suppress delivery of injected events
to the originating handler.
This allows to revert commit 5fdbe44d033d059cc56c2803e6b4dbd8cb4e5e39
which causes problems with existing userspace programs trying to
loopback the events via evdev.
Duncan Laurie [Thu, 3 Feb 2011 06:59:54 +0000 (22:59 -0800)]
Input: serio - clear pending rescans after sysfs driver rebind
When rebinding a serio driver via sysfs drvctl interface it is
possible for an interrupt to trigger after the disconnect of the
existing driver and before the binding of the new driver. This will
cause the serio interrupt handler to queue a rescan event which will
disconnect the new driver immediately after it is attached.
This change removes pending rescans from the serio event queue after
processing the drvctl request but before releasing the serio mutex.
Reproduction involves issuing a rebind of device port from psmouse
driver to serio_raw driver while generating input to trigger
interrupts. Then checking to see if the corresponding
i8042/serio4/driver is correctly attached to the serio_raw driver
instead of psmouse.
Ping Cheng [Tue, 1 Feb 2011 05:06:38 +0000 (21:06 -0800)]
Input: wacom_w8001 - report resolution to userland
Serial devices send both pen and touch data through the same logical
port. Since we scaled touch to pen maximum, we use pen resolution
for touch as well here.
This is under the assumption that pen and touch share the same physical
surface. In the case when a small physical dimensional difference occurs
between pen and touch, we assume the tolerance for touch point precision
is higher than pen and the difference is within touch point tolerance.
A per-MT tool based resolution mechanism should be introduced if the
above assumption does not hold true for the pen and touch devices any
more.
Mark Brown [Tue, 1 Feb 2011 05:09:25 +0000 (21:09 -0800)]
Input: wm831x-ts - remove use of ternary operator
While being applied the driver was modified to add use of the ternary
operator. Write the conditionals out longhand as I find it terribly
unhelpful for legibility.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>