summaryrefslogtreecommitdiff
path: root/include/linux/input.h
AgeCommit message (Collapse)Author
2011-01-31Input: switch completely over to the new versions of get/setkeycodeDmitry Torokhov
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>
2011-01-13Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: add SW_ROTATE_LOCK switch type Input: fix force feedback capability query example Input: wacom_w8001 - add single-touch support Input: add Austria Microsystem AS5011 joystick driver Input: remove aaed2000 keyboard driver Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13 Input: cy8ctmg110_ts - Convert to dev_pm_ops Input: migor_ts - convert to dev_pm_ops Input: mcs5000_ts - convert to dev_pm_ops Input: eeti_ts - convert to dev_pm_ops Input: ad7879 - convert I2C to dev_pm_ops
2011-01-11Merge branch 'next' into for-linusDmitry Torokhov
2011-01-11Input: add SW_ROTATE_LOCK switch typeJekyll Lai
This switch is used to signal that user want to disable screen transitions from portrait to landscape mode and back. Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-07Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (58 commits) Input: wacom_w8001 - support pen or touch only devices Input: wacom_w8001 - use __set_bit to set keybits Input: bu21013_ts - fix misuse of logical operation in place of bitop Input: i8042 - add Acer Aspire 5100 to the Dritek list Input: wacom - add support for digitizer in Lenovo W700 Input: psmouse - disable the synaptics extension on OLPC machines Input: psmouse - fix up Synaptics comment Input: synaptics - ignore bogus mt packet Input: synaptics - add multi-finger and semi-mt support Input: synaptics - report clickpad property input: mt: Document interface updates Input: fix double equality sign in uevent Input: introduce device properties hid: egalax: Add support for Wetab (726b) Input: include MT library as source for kerneldoc MAINTAINERS: Update input-mt entry hid: egalax: Add support for Samsung NB30 netbook hid: egalax: Document the new devices in Kconfig hid: egalax: Add support for Wetab hid: egalax: Convert to MT slots ... Fixed up trivial conflict in drivers/input/keyboard/Kconfig
2011-01-06Merge branch 'next' into for-linusDmitry Torokhov
Conflicts: include/linux/input.h
2010-12-29[media] Fix rc-tbs-nec table after converting the cx88 driver to ir-coreMariusz Białończyk
The patch fixes the rc-tbs-nec table after converting drivers/media/video/cx88 to ir-core (commit ba7e90c9f878e0ac3c0614a5446fe5c62ccc33ec). It is also adds two missing buttons (10- and 10+) with its definition (KEY_10CHANNELSUP and KEY_10CHANNELSDOWN). [mchehab@redhat.com: move keycode numbers to 0x1b8/0x1b9 as requested by the input Maintainer] Signed-off-by: Mariusz Białończyk <manio@skyboo.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-27Merge branch 'next' of ↵Dmitry Torokhov
git://git.kernel.org/pub/scm/linux/kernel/git/rydberg/input-mt into next
2010-12-20Input: introduce device propertiesHenrik Rydberg
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>
2010-12-16Merge branch 'next' of ↵Dmitry Torokhov
git://git.kernel.org/pub/scm/linux/kernel/git/rydberg/input-mt into next Conflicts: drivers/input/Makefile
2010-12-16input: mt: Add hovering distance axisHenrik Rydberg
Touch devices capable of hovering, i.e., fingers detected a distance from the surface, are not supported by the current input MT protocol. This patch adds ABS_MT_DISTANCE, which may be used to indicate the distance between the contact and the surface. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2010-12-16input: mt: Move tracking and pointer emulation to input-mtHenrik Rydberg
The drivers using the type B protocol all report tracking information the same way. The contact id is semantically equivalent to ABS_MT_SLOT, and the handling of ABS_MT_TRACKING_ID only complicates the driver. The situation can be improved upon by providing a common pointer emulation code, thereby removing the need for the tracking id in the driver. This patch moves all tracking event handling over to the input core, simplifying both the existing drivers and the ones currently in preparation. Acked-by: Ping Cheng <pingc@wacom.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2010-12-16input: mt: Break out slots handlingHenrik Rydberg
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>
2010-12-14Input: define separate EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2Dmitry Torokhov
The desire to keep old names for the EVIOCGKEYCODE/EVIOCSKEYCODE while extending them to support large scancodes was a mistake. While we tried to keep ABI intact (and we succeeded in doing that, programs compiled on older kernels will work on newer ones) there is still a problem with recompiling existing software with newer kernel headers. New kernel headers will supply updated ioctl numbers and kernel will expect that userspace will use struct input_keymap_entry to set and retrieve keymap data. But since the names of ioctls are still the same userspace will happily compile even if not adjusted to make use of the new structure and will start miraculously fail in the field. To avoid this issue let's revert EVIOCGKEYCODE/EVIOCSKEYCODE definitions and add EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2 so that userspace can explicitly select the style of ioctls it wants to employ. Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Jarod Wilson <jarod@redhat.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: document struct input_absinfoDmitry Torokhov
Add documentation for struct input_absinfo that is used in EVIOCGABS and EVIOCSABS ioctl and specify units of measure used for reporting resolution for an axis. Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: add keycodes for touchpad on/off keysBastien Nocera
Some laptops will have a "touchpad toggle" soft button, which expects user-space to turn off the touchpad themselves, some other devices will do this in hardware, but send key events telling us that the touchpad has been turned off/on. KEY_TOUCHPAD_ON/KEY_TOUCHPAD_OFF will be used by user-space to show a popup with the status of the touchpad. Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-03Input: export input_reset_device() for use in KGDBDmitry Torokhov
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>
2010-10-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (75 commits) Input: wacom - specify Cinitq supported tools Input: ab8500-ponkey - fix IRQ freeing in error path Input: adp5588-keys - use more obvious i2c_device_id name string Input: ad7877 - switch to using threaded IRQ Input: ad7877 - use attribute group to control visibility of attributes Input: serio - add support for PS2Mult multiplexer protocol Input: wacom - properly enable runtime PM Input: ad7877 - filter events where pressure is beyond the maximum Input: ad7877 - implement EV_KEY:BTN_TOUCH reporting Input: ad7877 - implement specified chip select behavior Input: hp680_ts_input - use cancel_delayed_work_sync() Input: mousedev - correct lockdep annotation Input: ads7846 - switch to using threaded IRQ Input: serio - support multiple child devices per single parent Input: synaptics - simplify pass-through port handling Input: add ROHM BU21013 touch panel controller support Input: omap4-keypad - wake-up on events & long presses Input: omap4-keypad - fix interrupt line configuration Input: omap4-keypad - SYSCONFIG register configuration Input: omap4-keypad - use platform device helpers ...
2010-09-09Input: add support for large scancodesMauro Carvalho Chehab
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>
2010-09-05Input: fix a few typosDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-08-19input: __rcu annotationsArnd Bergmann
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2010-08-02Input: dynamically allocate ABS informationDaniel Mack
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>
2010-08-02Input: add static inline accessors for ABS propertiesDaniel Mack
In preparation for dynamically allocated ABS axis, introduce a number of static inline access helpers. This should make the transition less painful. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-15Input: change input handlers to use bool when possibleDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-15Input: introduce MT event slotsHenrik Rydberg
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>
2010-06-23Input: evdev - use driver hint to compute size of event bufferHenrik Rydberg
Some devices, in particular MT devices, produce a lot of data. This may lead to overflowing of the event queues in evdev driver, which by default are fairly small. Let the drivers hint the average number of events per packet generated by the device, and use that information when computing the buffer size evdev should use for the device. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-20Input: use ABS_CNT rather than (ABS_MAX + 1)Daniel Mack
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-04-13Input: add Analog Devices AD714x captouch input driverBryan Wu
AD7142 and AD7147 are integrated capacitance-to-digital converters (CDCs) with on-chip environmental calibration for use in systems requiring a novel user input method. The AD7142 and AD7147 can interface to external capacitance sensors implementing functions such as buttons, scrollwheels, sliders, touchpads and so on. The chips don't restrict the specific usage. Depending on the hardware connection, one special target board can include one or several these components. The platform_data for the device's "struct device" holds these information. The data-struct defined in head file descript the hardware feature of button/scrollwheel/slider/touchpad components on target boards, which need be filled in the arch/mach-/. As the result, the driver is independent of boards. It gets the components layout from the platform_data, registers related devices, fullfills the algorithms and state machines for these components and report related input events to up level. Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-03-08Input: scancode in get/set_keycodes should be unsignedDmitry Torokhov
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>
2010-03-01Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (62 commits) Input: atkbd - release previously reserved keycodes 248 - 254 Input: add KEY_WPS_BUTTON definition Input: ads7846 - add regulator support Input: winbond-cir - fix suspend/resume Input: gamecon - use pr_err() and friends Input: gamecon - constify some of the setup structures Input: gamecon - simplify pad type handling Input: gamecon - simplify coordinate calculation for PSX Input: gamecon - fix some formatting issues Input: gamecon - add rumble support for N64 pads Input: wacom - add device type to device name string Input: s3c24xx_ts - report touch only when stylus is down Input: s3c24xx_ts - re-enable IRQ on resume Input: wacom - constify product features data Input: wacom - use per-device instance of wacom_features Input: sh_keysc - enable building on SH-Mobile ARM Input: wacom - get features from driver info Input: rotary-encoder - set gpio direction for each requested gpio Input: sh_keysc - update the driver with mode 6 Input: sh_keysc - switch to using bitmaps ...
2010-02-28Merge branch 'next' into for-linusDmitry Torokhov
2010-02-26Input: atkbd - release previously reserved keycodes 248 - 254Dmitry Torokhov
Keycodes in 248 - 254 range were reserved for special needs (scrolling) of atkbd driver. Now that the driver has been switched to use unsigned short keycodes instead of unsigned char we can release this range back into pull. We keep code 255 (ATKBD_KEY_NULL) reserved since users may have been using it to silence keys they do not care about since atkbd silently drops scancodes mapped to this keycode. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-26Input: add KEY_WPS_BUTTON definitionDmitry Torokhov
The new key definition is supposed to be used for buttons that initiate WiFi Protected setup sequence: http://en.wikipedia.org/wiki/Wi-Fi_Protected_Setup Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (41 commits) HID: usbhid: initialize interface pointers early enough HID: extend mask for BUTTON usage page HID: hid-ntrig: Single touch mode tap HID: hid-ntrig: multitouch cleanup and fix HID: n-trig: remove unnecessary tool switching HID: hid-ntrig add multi input quirk and clean up HID: usbhid: introduce timeout for stuck ctrl/out URBs HID: magicmouse: coding style and probe failure fixes HID: remove MODULE_VERSION from new drivers HID: fix up Kconfig entry for MagicMouse HID: add a device driver for the Apple Magic Mouse. HID: Export hid_register_report HID: Support for MosArt multitouch panel HID: add pressure support for the Stantum multitouch panel HID: fixed bug in single-touch emulation on the stantum panel HID: fix typo in error message HID: add mapping for "AL Network Chat" usage HID: use multi input quirk for TouchPack touchscreen HID: make full-fledged hid-bus drivers properly selectable HID: make Wacom modesetting failures non-fatal ...
2010-02-18Input: add KEY_RFKILLMatthew Garrett
Most laptops have keys that are intended to toggle all device state, not just wifi. These are currently generally mapped to KEY_WLAN. As a result, rfkill will only kill or enable wifi in response to the key press. This confuses users and can make it difficult for them to enable bluetooth and wwan devices. This patch adds a new keycode, KEY_RFKILL. It indicates that the system should toggle the state of all rfkillable devices. Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04Input: add match() method to input hanldersDmitry Torokhov
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>
2010-02-02Merge branch 'master' into upstreamJiri Kosina
Conflicts: drivers/hid/hid-ids.h
2010-01-30Input: implement input filtersDmitry Torokhov
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>
2010-01-28Input: add the ABS_MT_PRESSURE eventHenrik Rydberg
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>
2010-01-04HID: handle joysticks with large number of buttonsJiri Kosina
Current HID code doesn't properly handle HID joysticks which have larger number of buttons than what fits into current range reserved for BTN_JOYSTICK. One such joystick reported to not work properly is Saitek X52 Pro Flight System. We can't extend the range to fit more buttons in, because of backwards compatibility reasons. Therefore this patch introduces a new BTN_TRIGGER_HAPPY range, and uses these to map the buttons which are over BTN_JOYSTICK limit. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [for the input.h part] Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-02Merge commit 'v2.6.32' into nextDmitry Torokhov
2009-12-01Input: keyboard - fix lack of locking when traversing handler->h_listDmitry Torokhov
Keyboard handler should not attempt to traverse handler->h_list on its own, without any locking, otherwise it races with registering and unregistering of input handles which leads to crashes. Introduce input_handler_for_each_handle() helper that allows safely iterate over all handles attached to a particular handler and switch keyboard handler to use it. Reported-by: Jim Paradis <jparadis@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-20Input: input-polldev, matrix-keypad - include in kernel docDmitry Torokhov
Make sure that polled input device and matrix keypad APIs are included with the rest of input API when generating kernel documentation. Also description of absres was missing as well. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-10Input: fix locking in memoryless force-feedback devicesDmitry Torokhov
Now that input core acquires dev->event_lock spinlock and disables interrupts when propagating input events, using spin_lock_bh() in ff-memless driver is not allowed. Actually, the timer_lock itself is not needed anymore, we should simply use dev->event_lock as well. Also do a small cleanup in force-feedback core. Reported-by: kerneloops.org Reported-by: http://www.kerneloops.org/searchweek.php?search=ml_ff_set_gain Reported-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-05Input: add new keycodes useful in mobile devicesJani Nikula
Add new codes for camera focus key, and camera lens cover, keypad slide, front proximity switches. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-02Input: mark custom_data in ff_periodic_effect as __userDmitry Torokhov
The custom_data pointer in ff_periodict_effect structure is a userspace pointer and should be marked as such. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-09-17Input: add generic suspend and resume for input devicesDmitry Torokhov
Automatically turn off leds and sound effects as part of suspend process and restore led state, sounds and repeat rate at resume. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-06-19Input: synaptics - add support for reporting x/y resolutionTero Saarni
Synaptics uses anisotropic coordinate system. On some wide touchpads vertical resolution can be twice as high as horizontal which causes unequal sensitivity on x/y directions. Add support for reading the resolution with EVIOCGABS ioctl. Signed-off-by: Tero Saarni <tero.saarni@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-05-23Input: multitouch - add tracking ID to the protocolHenrik Rydberg
There are a few multi-touch devices that support finger tracking well in hardware, Stantum being the prime example. By exposing the tracking ID in the MT protocol, evdev bandwidth and cpu usage in user space can be reduced. This patch adds the ABS_MT_TRACKING_ID to the MT protocol. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Tested-by: Stéphane Chatty <chatty@enac.fr> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: add detailed multi-touch finger data report protocolHenrik Rydberg
In order to utilize the full power of the new multi-touch devices, a way to report detailed finger data to user space is needed. This patch adds a multi-touch (MT) protocol which allows drivers to report details for an arbitrary number of fingers. The driver sends a SYN_MT_REPORT event via the input_mt_sync() function when a complete finger has been reported. In order to stay compatible with existing applications, the data reported in a finger packet must not be recognized as single-touch events. In addition, all finger data must bypass input filtering, since subsequent events of the same type refer to different fingers. A set of ABS_MT events with the desired properties are defined. The events are divided into categories, to allow for partial implementation. The minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked. If the device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide the size of the approaching finger. Anisotropy and direction may be specified with ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and ABS_MT_ORIENTATION. Devices with more granular information may specify general shapes as blobs, i.e., as a sequence of rectangular shapes grouped together by a ABS_MT_BLOB_ID. Finally, the ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a finger or a pen. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>