chromiumos/third_party/mtdev.git
3 years agoReturn EINVAL for invalid parameters on mtdev_init. 0.13.558.B 0.13.587.B 0.14.811.B 0.15.877.B 780.B factory-1020.B factory-1235.B factory-1284.B factory-1412.B factory-1987.B factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-980.B firmware-881-u-boot-v1 firmware-kiev-2.112.B firmware-link-2348.B firmware-u-boot-v1 firmware-uboot_v2-1299.B master release-1011.B release-R16-1193.B release-R17-1412.B release-R18-1660.B release-R19-2046.B release-R20-2268.B stabilize2 test-982.B
Peter Hutterer [Tue, 19 Apr 2011 09:45:45 +0000 (11:45 +0200)]
Return EINVAL for invalid parameters on mtdev_init.

[rydberg@euromail.se: minor cleanup]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agomtdev_close should ignore NULL devices.
Peter Hutterer [Tue, 19 Apr 2011 09:41:04 +0000 (11:41 +0200)]
mtdev_close should ignore NULL devices.

Saves us one goto label in mtdev_init.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agoRelease mtdev v1.1.0 0.11.257.B 0.11.257.B90
Henrik Rydberg [Wed, 22 Dec 2010 17:55:09 +0000 (18:55 +0100)]
Release mtdev v1.1.0

This version includes backwards-compatible API changes,
while keeping the ABI stable. Applications that want to
migrate to the new API, compile with -DMTDEV_NO_LEGACY_API.

3 years agomtdev-test: output MT event support
Henrik Rydberg [Wed, 22 Dec 2010 17:49:41 +0000 (18:49 +0100)]
mtdev-test: output MT event support

At startup, output the MT events supported by the device.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agoAdd support for ABS_MT_DISTANCE
Henrik Rydberg [Wed, 22 Dec 2010 17:35:53 +0000 (18:35 +0100)]
Add support for ABS_MT_DISTANCE

In the upcoming 2.6.38 kernel, support for hovering is introduced.
Add the ABS_MT_DISTANCE to the extended set of handled ABS_MT events.

The change is binary compatible with existing libraries.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agoIntroduce a stable ABI
Henrik Rydberg [Wed, 22 Dec 2010 17:29:00 +0000 (18:29 +0100)]
Introduce a stable ABI

The current mtdev is not ABI stable, and the upcoming additions
to the kernel api will break ABI. This patch starts the process
of keeping binary compatibility with old programs, by moving the
abi-specific parts under a special flag, MTDEV_NO_LEGACY_API,
and makes sure the internal parts compiles with MTDEV_NO_LEGACY_API
set. This way, older programs will still work, old programs will
still compile, and new programs will be able to use the additions.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agoAllow use in c++ applications
Henrik Rydberg [Mon, 20 Dec 2010 15:49:53 +0000 (16:49 +0100)]
Allow use in c++ applications

Reported-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agomtdev v1.0.11
Henrik Rydberg [Sun, 7 Nov 2010 17:07:07 +0000 (18:07 +0100)]
mtdev v1.0.11

3 years agoAdd and test a simple kernel matcher
Henrik Rydberg [Sun, 7 Nov 2010 17:04:46 +0000 (18:04 +0100)]
Add and test a simple kernel matcher

This matcher is for up to four fingers, and has these properties:

* Approximately 1.4 times faster at 4 fingers
* Approximately 4.0 times faster at 2 fingers
* Roughly 100 lines of code

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agoGenerate kernel matcher data
Henrik Rydberg [Sun, 7 Nov 2010 16:56:56 +0000 (17:56 +0100)]
Generate kernel matcher data

This application generates the matcher tables of the tracking
library in the linux kernel.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agoAdd mtdev-matching test program
Henrik Rydberg [Tue, 12 Oct 2010 15:13:45 +0000 (17:13 +0200)]
Add mtdev-matching test program

Measures matching speed and provides some historically difficult
test cases.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
3 years agomtdev v1.0.10
Henrik Rydberg [Tue, 7 Sep 2010 14:22:30 +0000 (16:22 +0200)]
mtdev v1.0.10

3 years agoFall back to single-touch position and pressure dimensions
Henrik Rydberg [Tue, 7 Sep 2010 13:54:27 +0000 (15:54 +0200)]
Fall back to single-touch position and pressure dimensions

In case mtdev is driving a non-MT device, basic dimensions are not set
properly. Fall back on ABS_X/Y and ABS_PRESSURE, such that basic
pointer operations can be supported through mtdev.

Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
3 years agoInstall mapping and plumbing header files
Henrik Rydberg [Tue, 7 Sep 2010 13:46:31 +0000 (15:46 +0200)]
Install mapping and plumbing header files

Applications may need to know the property mapping, and the plumbing
interface is actually supported, so install both headers.

Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
3 years agoComplete mtdev property mapping
Henrik Rydberg [Tue, 7 Sep 2010 13:38:19 +0000 (15:38 +0200)]
Complete mtdev property mapping

Add the missing property values to the mapgen output, and insert the
result in the mtdev mapping header file.

Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
4 years agomtdev v1.0.9
Henrik Rydberg [Wed, 18 Aug 2010 09:06:34 +0000 (11:06 +0200)]
mtdev v1.0.9

4 years agoCorrect logic for kernel MT slots devices
Henrik Rydberg [Wed, 18 Aug 2010 09:01:28 +0000 (11:01 +0200)]
Correct logic for kernel MT slots devices

This patch fixes the broken logic to detect the kernel MT slots protocol,
such that MT slots devices may pass through mtdev properly.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev v1.0.8
Henrik Rydberg [Sun, 1 Aug 2010 22:22:50 +0000 (00:22 +0200)]
mtdev v1.0.8

4 years agoRemove erroneous dependency on xorg macros
Henrik Rydberg [Sun, 1 Aug 2010 23:49:03 +0000 (01:49 +0200)]
Remove erroneous dependency on xorg macros

This package has no external dependencies and should not depend
on the xorg macros. This patch removes the dependency, adds a tailored
INSTALL file, and uses git to generate the ChangeLog.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev v1.0.7
Henrik Rydberg [Wed, 21 Jul 2010 08:09:12 +0000 (10:09 +0200)]
mtdev v1.0.7

4 years agoThe forthcoming 2.6.36 kernel does not define the MT_SLOT_ABS_EVENTS
Henrik Rydberg [Wed, 21 Jul 2010 08:08:40 +0000 (10:08 +0200)]
The forthcoming 2.6.36 kernel does not define the MT_SLOT_ABS_EVENTS
list, so make sure it is always defined in mtdev.h

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev v1.0.6
Henrik Rydberg [Mon, 19 Jul 2010 11:09:51 +0000 (13:09 +0200)]
mtdev v1.0.6

4 years agoChange test program name to mtdev-test
Henrik Rydberg [Mon, 19 Jul 2010 11:09:10 +0000 (13:09 +0200)]
Change test program name to mtdev-test

In order to simplify packaging, rename the current mtdev
device test program to mtdev-test.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev v1.0.5
Henrik Rydberg [Thu, 15 Jul 2010 12:51:55 +0000 (14:51 +0200)]
mtdev v1.0.5

4 years agoAdd missing header files to sources directive
Henrik Rydberg [Thu, 15 Jul 2010 12:51:04 +0000 (14:51 +0200)]
Add missing header files to sources directive

In order for make dist-gzip to work properly, all files needed
to build the system need to be listed. This patch adds the missing
header files to the sources directive.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev v1.0.4
Henrik Rydberg [Tue, 13 Jul 2010 07:14:35 +0000 (09:14 +0200)]
mtdev v1.0.4

4 years agoBuild test utilities unconditionally, do not install
Peter Hutterer [Mon, 5 Jul 2010 06:01:41 +0000 (08:01 +0200)]
Build test utilities unconditionally, do not install

The test programs in the package are command-line utilities which can
be used to generate MT code mappings for header files, and debug
hardware problems, and should not be installed. With this patch, tests
are built unconditionally, but not installed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoREADME: add URL and email for patches.
Peter Hutterer [Fri, 2 Jul 2010 01:53:41 +0000 (11:53 +1000)]
README: add URL and email for patches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agotest: fix out-of-tree builds.
Peter Hutterer [Fri, 2 Jul 2010 01:51:08 +0000 (11:51 +1000)]
test: fix out-of-tree builds.

Libraries are in builddir, not sourcedir.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev v1.0.3
Henrik Rydberg [Thu, 24 Jun 2010 19:03:42 +0000 (21:03 +0200)]
mtdev v1.0.3

4 years agoAdd a CREDITS file
Henrik Rydberg [Thu, 24 Jun 2010 09:39:08 +0000 (11:39 +0200)]
Add a CREDITS file

This patch adds a CREDITS file, which keeps track of historical
contributions affecting this library.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agogitignore: Ignore the patches directory
Henrik Rydberg [Tue, 22 Jun 2010 21:25:58 +0000 (23:25 +0200)]
gitignore: Ignore the patches directory

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev v1.0.2
Henrik Rydberg [Tue, 22 Jun 2010 20:42:22 +0000 (22:42 +0200)]
mtdev v1.0.2

4 years agoUpdate defuzz() credits
Henrik Rydberg [Tue, 22 Jun 2010 20:38:58 +0000 (22:38 +0200)]
Update defuzz() credits

Correct the credits for the defuzz() function. Used under the MIT
license with permission from Vojtech Pavlik.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoSearch for libmtdev in src/ directory during a clean build
Chase Douglas [Tue, 22 Jun 2010 20:06:38 +0000 (16:06 -0400)]
Search for libmtdev in src/ directory during a clean build

If mtdev hasn't already been installed, the test binaries will fail to
compile because they can't find libmtdev. Point them to the src
directory build output.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
4 years agomtdev v1.0.1
Henrik Rydberg [Tue, 22 Jun 2010 09:55:38 +0000 (11:55 +0200)]
mtdev v1.0.1

4 years agoApply new package title to all files
Henrik Rydberg [Tue, 22 Jun 2010 09:55:04 +0000 (11:55 +0200)]
Apply new package title to all files

This patch changes the package description title in all relevant
files, and touches up the README. All systems go.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoBuild test tools also under autoconf
Henrik Rydberg [Tue, 22 Jun 2010 09:45:17 +0000 (11:45 +0200)]
Build test tools also under autoconf

The tests can be disabled by using --enable-test=no in configure.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agojanitor: fix compiler warnings
Henrik Rydberg [Tue, 22 Jun 2010 09:44:36 +0000 (11:44 +0200)]
janitor: fix compiler warnings

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoMove to autotools
Chase Douglas [Tue, 22 Jun 2010 01:08:51 +0000 (21:08 -0400)]
Move to autotools

[rydberg@euromail.se: minor fixups]
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomatch: conform to mtdev namespace
Henrik Rydberg [Tue, 22 Jun 2010 07:19:50 +0000 (09:19 +0200)]
match: conform to mtdev namespace

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev v1.0.0
Henrik Rydberg [Mon, 21 Jun 2010 22:52:26 +0000 (00:52 +0200)]
mtdev v1.0.0

4 years agoUnused slot is denoted by MT_TRACKING_ID == -1
Henrik Rydberg [Mon, 21 Jun 2010 20:43:58 +0000 (22:43 +0200)]
Unused slot is denoted by MT_TRACKING_ID == -1

The current MT slot protocol allows any tracking id outside the range
specified by the device to denote an unused slot. This is difficult to
handle in userspace, since the valid range is unknown. This patch
tightens the definition of a valid tracking id to always lie in the
range [0, MT_ID_MAX], and uses the value -1 to denote an unused slot.

Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomtdev_get: return number of retrieved events if error occurs
Chase Douglas [Mon, 21 Jun 2010 13:57:56 +0000 (09:57 -0400)]
mtdev_get: return number of retrieved events if error occurs

Otherwise, we pull events, but return -1. We should send the events we
were able to retrieve for now.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoInstall and uninstall all relevant files
Henrik Rydberg [Sat, 19 Jun 2010 12:21:55 +0000 (14:21 +0200)]
Install and uninstall all relevant files

Useful for testing as a standalong package.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoRestructure mtdev api
Henrik Rydberg [Sat, 19 Jun 2010 10:10:27 +0000 (12:10 +0200)]
Restructure mtdev api

Split the api into plumbing and porcelain layers and move the
plumbing part to its own optional header file.

The main usecase is to fetch events from the device, route them
through the converter and extract the processed events. To simplify
the API, replace the intermediate mtdev_pull() function by the
higher-level mtdev_get(). This function does all the required steps,
and has the same semantics as read().

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoChange the matching code to the MIT license
Henrik Rydberg [Fri, 18 Jun 2010 09:51:54 +0000 (11:51 +0200)]
Change the matching code to the MIT license

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoUse a non-blocking example in test/mtdev
Henrik Rydberg [Fri, 18 Jun 2010 09:28:55 +0000 (11:28 +0200)]
Use a non-blocking example in test/mtdev

The non-blocking case is more interesting for X applications.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoCorrect minor semantic documentation error in mtdev_close()
Henrik Rydberg [Fri, 18 Jun 2010 09:24:24 +0000 (11:24 +0200)]
Correct minor semantic documentation error in mtdev_close()

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agojanitor: fix spelling error
Henrik Rydberg [Thu, 17 Jun 2010 23:41:14 +0000 (01:41 +0200)]
janitor: fix spelling error

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoCorrect semantic error in mtdev_idle
Henrik Rydberg [Thu, 17 Jun 2010 23:39:40 +0000 (01:39 +0200)]
Correct semantic error in mtdev_idle

The current semantics, that a non-empty conversion pipe means
the device is not idle, is not very useful. This patch changes
the semantics to simply checking if the fetch buffer is empty,
and if there are no events to fetch from the device.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoAllow max_events to be zero in mtdev_pull()
Henrik Rydberg [Thu, 17 Jun 2010 23:35:28 +0000 (01:35 +0200)]
Allow max_events to be zero in mtdev_pull()

When reading from non-blocking devices, it makes sense to read
all events available. This patch lets a zero max_events achieve that.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoRectify argument order in mtdev_fetch
Henrik Rydberg [Thu, 17 Jun 2010 23:32:43 +0000 (01:32 +0200)]
Rectify argument order in mtdev_fetch

The argument order in mtdev_fetch() differs from all other
usages involved the file descriptor. Fixed with this patch.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agomake: Correct bad library name
Henrik Rydberg [Thu, 17 Jun 2010 23:28:43 +0000 (01:28 +0200)]
make: Correct bad library name

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoOutput both a static and a dynamic library
Henrik Rydberg [Thu, 17 Jun 2010 19:41:26 +0000 (21:41 +0200)]
Output both a static and a dynamic library

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoAdd idle function
Henrik Rydberg [Thu, 17 Jun 2010 18:15:44 +0000 (20:15 +0200)]
Add idle function

This patch adds the mtdev_idle() function, which checks the kernel
device for activity. Useful when implementing timing logic.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoName dynamic library correctly
Henrik Rydberg [Thu, 17 Jun 2010 16:18:22 +0000 (18:18 +0200)]
Name dynamic library correctly

To simplify dynamic library usage, name the libary correctly
and put it in /usr/lib/.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
4 years agoInitial load of mtdev project
Henrik Rydberg [Thu, 17 Jun 2010 16:12:58 +0000 (18:12 +0200)]
Initial load of mtdev project

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>