- 19 Sep, 2012 5 commits
-
-
Henrik Rydberg authored
On heavy event loads, such as a multitouch driver, the irqsoff latency can be as high as 250 us. By accumulating a frame worth of data before passing it on, the latency can be dramatically reduced. As a side effect, the special EV_SYN handling can be removed, since the frame is now atomic. This patch adds the events() handler callback and uses it if it exists. The latency is improved by 50 us even without the callback. Cc: Daniel Kurtz <djkurtz@chromium.org> Tested-by:
Benjamin Tissoires <benjamin.tissoires@enac.fr> Tested-by:
Ping Cheng <pingc@wacom.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Acked-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
Henrik Rydberg authored
Preparing to split event filtering and event passing, move the autorepeat function to the point where the event is actually passed. Tested-by:
Benjamin Tissoires <benjamin.tissoires@enac.fr> Tested-by:
Ping Cheng <pingc@wacom.com> Acked-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
Henrik Rydberg authored
For some EV_KEY types, sending a larger-than-one value causes the input state to oscillate. This patch makes sure this cannot happen, clearing up the autorepeat bypass logic in the process. Tested-by:
Benjamin Tissoires <benjamin.tissoires@enac.fr> Tested-by:
Ping Cheng <pingc@wacom.com> Acked-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
Henrik Rydberg authored
The events-per-packet estimate has so far been used by MT devices only. This patch adjusts the packet buffer size to also accomodate the KEY and MSC events. Keyboards normally send one or two keys at a time. MT devices normally send a number of button keys along with the MT information. The buffer size chosen here covers those cases, and matches the default buffer size in evdev. Since the input estimate is now preferred, remove the special input-mt estimate. Reviewed-and-tested-by:
Ping Cheng <pingc@wacom.com> Tested-by:
Benjamin Tissoires <benjamin.tissoires@enac.fr> Acked-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
Henrik Rydberg authored
Move all MT-related things to a separate place. This saves some bytes for non-mt input devices, and prepares for new MT features. Reviewed-and-tested-by:
Benjamin Tissoires <benjamin.tissoires@enac.fr> Tested-by:
Ping Cheng <pingc@wacom.com> Acked-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
- 02 Feb, 2012 1 commit
-
-
Henrik Rydberg authored
The current MT accessor function does not distinguish between the MT values and the slot specification event. Add an accessor function for the values only, and use it where appropriate. Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
- 04 Jan, 2012 1 commit
-
-
Al Viro authored
both callers of device_get_devnode() are only interested in lower 16bits and nobody tries to return anything wider than 16bit anyway. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 25 May, 2011 1 commit
-
-
Hans Petter Selasky authored
[dtor@mail.ru: added mousedev changes] Signed-off-by:
Hans Petter Selasky <hselasky@c2i.net> Cc: stable@kernel.org Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 12 May, 2011 1 commit
-
-
Eric Dumazet authored
There is no need to call synchronize_rcu() after a list insertion, or a NULL->ptr assignment. However, the reverse operations do need this call. Signed-off-by:
Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 18 Apr, 2011 1 commit
-
-
Jeff Brown authored
Calculate a default based on the number of ABS axes, REL axes, and MT slots for the device during input device registration. Signed-off-by:
Jeff Brown <jeffbrown@android.com> Reviewed-by:
Henrik Rydberg <rydberg@euromail.se> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 03 Feb, 2011 1 commit
-
-
Dmitry Torokhov authored
This reverts commit 5fdbe44d . 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. Reported-by:
Kristen Carlson Accardi <kristen@linux.intel.com> Cc: stable@kernel.org Signed-off-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 01 Feb, 2011 1 commit
-
-
Dmitry Torokhov authored
All users of old style get/setkeycode methids have been converted so it is time to retire them. Acked-by:
Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by:
Jiri Kosina <jkosina@suse.cz> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 20 Dec, 2010 2 commits
-
-
Henrik Rydberg authored
Looking at the uevent stream for input devices, all properties are on the form "A=B" except the bitmap values, which are on the form "A==B". This bug has been around at least since 2007, and the input uevent code has been untouched since. The recent addition of device properties suggests this is a good time for a remedy. Acked-by:
Dmitry Torokhov <dtor@mail.ru> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
Henrik Rydberg authored
Today, userspace sets up an input device based on the data it emits. This is not always enough; a tablet and a touchscreen may emit exactly the same data, for instance, but the former should be set up with a pointer whereas the latter does not need to. Recently, a new type of touchpad has emerged where the buttons are under the pad, which changes logic without changing the emitted data. This patch introduces a new ioctl, EVIOCGPROP, which enables user access to a set of device properties useful during setup. The properties are given as a bitmap in the same fashion as the event types, and are also made available via sysfs, uevent and /proc/bus/input/devices. Acked-by:
Ping Cheng <pingc@wacom.com> Acked-by:
Chase Douglas <chase.douglas@canonical.com> Acked-by:
Dmitry Torokhov <dtor@mail.ru> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
- 16 Dec, 2010 1 commit
-
-
Henrik Rydberg authored
In preparation for common code to handle a larger set of MT slots devices, move the slots handling over to a separate file. Signed-off-by:
Henrik Rydberg <rydberg@euromail.se>
-
- 01 Dec, 2010 1 commit
-
-
Joe Perches authored
Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 18 Nov, 2010 1 commit
-
-
Mattia Dongili authored
Check the input_keymap_entry keycode size (u32) instead of the device's (void*) when validating that keycode value can be stored in the keymap. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722 Signed-off-by:
Mattia Dongili <malattia@linux.it> Tested-by:
Norbert Preining <preining@logic.at> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 17 Nov, 2010 1 commit
-
-
Arnd Bergmann authored
The big kernel lock has been removed from all these files at some point, leaving only the #include. Remove this too as a cleanup. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 11 Nov, 2010 1 commit
-
-
Dmitry Torokhov authored
Sometimes input handlers (as opposed to input devices) have a need to inject (or re-inject) events back into input core. For example sysrq filter may want to inject previously suppressed Alt-SysRq so that user can take a screen print. In this case we do not want to pass such events back to the same same handler that injected them to avoid loops. Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 03 Nov, 2010 1 commit
-
-
Dmitry Torokhov authored
KGDB, much like the resume process, needs to be able to mark all keys that were pressed at the time we dropped into the debuggers as "released", since it is unlikely that the keys stay pressed for the entire duration of the debug session. Also we need to make sure that input_reset_device() and input_dev_suspend() only attempt to change state of currenlt opened devices since closed devices may not be ready to accept IO requests. Tested-by:
Jason Wessel <jason.wessel@windriver.com> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 15 Oct, 2010 1 commit
-
-
Arnd Bergmann authored
All file_operations should get a .llseek operation so we can make nonseekable_open the default for future file operations without a .llseek pointer. The three cases that we can automatically detect are no_llseek, seq_lseek and default_llseek. For cases where we can we can automatically prove that the file offset is always ignored, we use noop_llseek, which maintains the current behavior of not returning an error from a seek. New drivers should normally not use noop_llseek but instead use no_llseek and call nonseekable_open at open time. Existing drivers can be converted to do the same when the maintainer knows for certain that no user code relies on calling seek on the device file. The generated code is often incorrectly indented and right now contains comments that clarify for each added line why a specific variant was chosen. In the version that gets submitted upstream, the comments will be gone and I will manually fix the indentation, because there does not see...
-
- 10 Sep, 2010 1 commit
-
-
Mauro Carvalho Chehab authored
Several devices use a high number of bits for scancodes. One important group is the Remote Controllers. Some new protocols like RC-6 define a scancode space of 64 bits. The current EVIO[CS]GKEYCODE ioctls allow replace the scancode/keycode translation tables, but it is limited to up to 32 bits for scancode. Also, if userspace wants to clean the existing table, replacing it by a new one, it needs to run a loop calling the ioctls over the entire sparse scancode space. To solve those problems, this patch extends the ioctls to allow drivers handle scancodes up to 32 bytes long (the length could be extended in the future should such need arise) and allow userspace to query and set scancode to keycode mappings not only by scancode but also by index. Compatibility code were also added to handle the old format of EVIO[CS]GKEYCODE ioctls. Folded fixes by: - Dan Carpenter: locking fixes for the original implementation - Jarod Wilson: fix crash when setting keycode and wiring up get/set handlers in original implementation. - Dmitry Torokhov: rework to consolidate old and new scancode handling, provide options to act either by index or scancode. Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by:
Dan Carpenter <error27@gmail.com> Signed-off-by:
Jarod Wilson <jarod@redhat.com> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 05 Sep, 2010 1 commit
-
-
Dmitry Torokhov authored
Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 29 Aug, 2010 1 commit
-
-
Henrik Rydberg authored
For MT slots, the ABS_MT_TRACKING_ID determines whether a slot is in use, but currently leaves initialization up to the drivers. This patch sets the slot state to unused upon creation. Signed-off-by:
Henrik Rydberg <rydberg@euromail.se> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 03 Aug, 2010 2 commits
-
-
Daniel Mack authored
As all callers are now changed to only use the input_abs_*() access helpers, switching over to dynamically allocated ABS information is easy. This reduces size of struct input_dev from 3152 to 1640 on 64 bit architectures. Signed-off-by:
Daniel Mack <daniel@caiaq.de> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
Daniel Mack authored
Change all call sites in drivers/input to not access the ABS axis information directly anymore. Make them use the access helpers instead. Also use input_set_abs_params() when possible. Did some code refactoring as I was on it. Signed-off-by:
Daniel Mack <daniel@caiaq.de> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 16 Jul, 2010 2 commits
-
-
Dmitry Torokhov authored
Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
Henrik Rydberg authored
With the rapidly increasing number of intelligent multi-contact and multi-user devices, the need to send digested, filtered information from a set of different sources within the same device is imminent. This patch adds the concept of slots to the MT protocol. The slots enumerate a set of identified sources, such that all MT events can be passed independently and selectively per identified source. The protocol works like this: Instead of sending a SYN_MT_REPORT event immediately after the contact data, one sends an ABS_MT_SLOT event immediately before the contact data. The input core will only emit events for slots with modified MT events. It is assumed that the same slot is used for the duration of an initiated contact. Acked-by:
Ping Cheng <pingc@wacom.com> Acked-by:
Chase Douglas <chase.douglas@canonical.com> Acked-by:
Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 14 Jul, 2010 1 commit
-
-
Dmitry Torokhov authored
The dev->getkeycode() method expects unsigned argument. Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 03 Jul, 2010 1 commit
-
-
Oliver Neukum authored
As the kernel has no way to know whether a key was released while the system was asleep, keys need to be reported released as the system is resumed, lest autorepeat set in. Signed-off-by:
Oliver Neukum <oneukum@suse.de> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 30 Mar, 2010 1 commit
-
-
Tejun Heo authored
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include bloc...
-
- 22 Mar, 2010 1 commit
-
-
Dmitry Torokhov authored
Allow calling sparse_keymap_free() before unregistering input device whithout risk of racing with EVIOCGETKEYCODE and EVIOCSETKEYCODE. This makes life of drivers writers easier. Acked-by:
Yong Wang <yong.y.wang@intel.com> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 10 Mar, 2010 1 commit
-
-
Arnd Bergmann authored
Holding the BKL in input_open_file seems pointless because it does not protect against updates of input_table, and all open functions from the underlying drivers have proper mutex locking. This makes input_open_file take the input_mutex when accessing the table and no lock when calling into the lower function. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 09 Mar, 2010 1 commit
-
-
Dmitry Torokhov authored
The HID layer has some scan codes of the form 0xffbc0000 for logitech devices which do not work if scancode is typed as signed int, so we need to switch to unsigned it instead. While at it keycode being signed does not make much sense either. Acked-by:
Márton Németh <nm127@freemail.hu> Acked-by:
Matthew Garrett <mjg@redhat.com> Acked-by:
Jiri Kosina <jkosina@suse.cz> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 04 Feb, 2010 1 commit
-
-
Dmitry Torokhov authored
Get rid of blacklist in input handler structure and instead allow handlers to define their own match() method to perform fine-grained filtering of supported devices. Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 30 Jan, 2010 1 commit
-
-
Dmitry Torokhov authored
Sometimes it is desirable to suppress certain events from reaching input handlers and thus user space. One such example is Mac mouse button emulation code which catches certain key presses and converts them into button clicks as if they were emitted by a virtual mouse. The original key press events should be completely suppressed, otherwise user space will be confused, and while keyboard driver does it on its own evdev is blissfully unaware of this arrangement. This patch adds notion of 'filter' to the standard input handlers, which may flag event as filtered thus preventing it from reaching other input handlers. Filters don't (nor will they ever) have a notion of priority relative to each other, input core will run all of them first and any one of them may mark event as filtered. This patch is inspired by similar patch by Matthew Garret but the implementation and intended usage are quite different. Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 29 Jan, 2010 1 commit
-
-
Henrik Rydberg authored
For pressure-based multi-touch devices, a direct way to send sensor intensity data per finger is needed. This patch adds the ABS_MT_PRESSURE event to the MT protocol. Requested-by:
Yoonyoung Shim <jy0922.shim@samsung.com> Requested-by:
Mika Kuoppala <mika.kuoppala@nokia.com> Requested-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Henrik Rydberg <rydberg@euromail.se> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 12 Jan, 2010 1 commit
-
-
Dmitry Torokhov authored
Input core displays capabilities bitmasks in form of one or more longs printed in hex form and separated by spaces. Unfortunately it does not work well for 32-bit applications running on 64-bit kernels since applications expect that number is "worth" only 32 bits when kernel advances by 64 bits. Fix that by ensuring that output produced for compat tasks uses 32-bit units. Reported-and-tested-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
- 06 Jan, 2010 2 commits
-
-
Dmitry Torokhov authored
To avoid showing garbage in capability bits, zero out bitmasks absent from dev->evbit in case driver inadvertently leaves some garbage there. Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-
Dmitry Torokhov authored
KEY_RESERVED is not supposed to be reported to userspace but rather to mark unused entries in keymaps. Acked-by:
Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by:
Dmitry Torokhov <dtor@mail.ru>
-