diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DocBook/device-drivers.tmpl | 4 | ||||
-rw-r--r-- | Documentation/input/cma3000_d0x.txt | 115 | ||||
-rw-r--r-- | Documentation/input/multi-touch-protocol.txt | 53 |
3 files changed, 153 insertions, 19 deletions
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 22edcbb9ddaf..35447e081736 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -304,6 +304,10 @@ X!Idrivers/video/console/fonts.c | |||
304 | !Edrivers/input/ff-core.c | 304 | !Edrivers/input/ff-core.c |
305 | !Edrivers/input/ff-memless.c | 305 | !Edrivers/input/ff-memless.c |
306 | </sect1> | 306 | </sect1> |
307 | <sect1><title>Multitouch Library</title> | ||
308 | !Iinclude/linux/input/mt.h | ||
309 | !Edrivers/input/input-mt.c | ||
310 | </sect1> | ||
307 | <sect1><title>Polled input devices</title> | 311 | <sect1><title>Polled input devices</title> |
308 | !Iinclude/linux/input-polldev.h | 312 | !Iinclude/linux/input-polldev.h |
309 | !Edrivers/input/input-polldev.c | 313 | !Edrivers/input/input-polldev.c |
diff --git a/Documentation/input/cma3000_d0x.txt b/Documentation/input/cma3000_d0x.txt new file mode 100644 index 000000000000..29d088db4afd --- /dev/null +++ b/Documentation/input/cma3000_d0x.txt | |||
@@ -0,0 +1,115 @@ | |||
1 | Kernel driver for CMA3000-D0x | ||
2 | ============================ | ||
3 | |||
4 | Supported chips: | ||
5 | * VTI CMA3000-D0x | ||
6 | Datasheet: | ||
7 | CMA3000-D0X Product Family Specification 8281000A.02.pdf | ||
8 | <http://www.vti.fi/en/> | ||
9 | |||
10 | Author: Hemanth V <hemanthv@ti.com> | ||
11 | |||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | CMA3000 Tri-axis accelerometer supports Motion detect, Measurement and | ||
16 | Free fall modes. | ||
17 | |||
18 | Motion Detect Mode: Its the low power mode where interrupts are generated only | ||
19 | when motion exceeds the defined thresholds. | ||
20 | |||
21 | Measurement Mode: This mode is used to read the acceleration data on X,Y,Z | ||
22 | axis and supports 400, 100, 40 Hz sample frequency. | ||
23 | |||
24 | Free fall Mode: This mode is intended to save system resources. | ||
25 | |||
26 | Threshold values: Chip supports defining threshold values for above modes | ||
27 | which includes time and g value. Refer product specifications for more details. | ||
28 | |||
29 | CMA3000 chip supports mutually exclusive I2C and SPI interfaces for | ||
30 | communication, currently the driver supports I2C based communication only. | ||
31 | Initial configuration for bus mode is set in non volatile memory and can later | ||
32 | be modified through bus interface command. | ||
33 | |||
34 | Driver reports acceleration data through input subsystem. It generates ABS_MISC | ||
35 | event with value 1 when free fall is detected. | ||
36 | |||
37 | Platform data need to be configured for initial default values. | ||
38 | |||
39 | Platform Data | ||
40 | ------------- | ||
41 | fuzz_x: Noise on X Axis | ||
42 | |||
43 | fuzz_y: Noise on Y Axis | ||
44 | |||
45 | fuzz_z: Noise on Z Axis | ||
46 | |||
47 | g_range: G range in milli g i.e 2000 or 8000 | ||
48 | |||
49 | mode: Default Operating mode | ||
50 | |||
51 | mdthr: Motion detect g range threshold value | ||
52 | |||
53 | mdfftmr: Motion detect and free fall time threshold value | ||
54 | |||
55 | ffthr: Free fall g range threshold value | ||
56 | |||
57 | Input Interface | ||
58 | -------------- | ||
59 | Input driver version is 1.0.0 | ||
60 | Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0 | ||
61 | Input device name: "cma3000-accelerometer" | ||
62 | Supported events: | ||
63 | Event type 0 (Sync) | ||
64 | Event type 3 (Absolute) | ||
65 | Event code 0 (X) | ||
66 | Value 47 | ||
67 | Min -8000 | ||
68 | Max 8000 | ||
69 | Fuzz 200 | ||
70 | Event code 1 (Y) | ||
71 | Value -28 | ||
72 | Min -8000 | ||
73 | Max 8000 | ||
74 | Fuzz 200 | ||
75 | Event code 2 (Z) | ||
76 | Value 905 | ||
77 | Min -8000 | ||
78 | Max 8000 | ||
79 | Fuzz 200 | ||
80 | Event code 40 (Misc) | ||
81 | Value 0 | ||
82 | Min 0 | ||
83 | Max 1 | ||
84 | Event type 4 (Misc) | ||
85 | |||
86 | |||
87 | Register/Platform parameters Description | ||
88 | ---------------------------------------- | ||
89 | |||
90 | mode: | ||
91 | 0: power down mode | ||
92 | 1: 100 Hz Measurement mode | ||
93 | 2: 400 Hz Measurement mode | ||
94 | 3: 40 Hz Measurement mode | ||
95 | 4: Motion Detect mode (default) | ||
96 | 5: 100 Hz Free fall mode | ||
97 | 6: 40 Hz Free fall mode | ||
98 | 7: Power off mode | ||
99 | |||
100 | grange: | ||
101 | 2000: 2000 mg or 2G Range | ||
102 | 8000: 8000 mg or 8G Range | ||
103 | |||
104 | mdthr: | ||
105 | X: X * 71mg (8G Range) | ||
106 | X: X * 18mg (2G Range) | ||
107 | |||
108 | mdfftmr: | ||
109 | X: (X & 0x70) * 100 ms (MDTMR) | ||
110 | (X & 0x0F) * 2.5 ms (FFTMR 400 Hz) | ||
111 | (X & 0x0F) * 10 ms (FFTMR 100 Hz) | ||
112 | |||
113 | ffthr: | ||
114 | X: (X >> 2) * 18mg (2G Range) | ||
115 | X: (X & 0x0F) * 71 mg (8G Range) | ||
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index bdcba154b83e..71536e78406f 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | Multi-touch (MT) Protocol | 1 | Multi-touch (MT) Protocol |
2 | ------------------------- | 2 | ------------------------- |
3 | Copyright (C) 2009 Henrik Rydberg <rydberg@euromail.se> | 3 | Copyright (C) 2009-2010 Henrik Rydberg <rydberg@euromail.se> |
4 | 4 | ||
5 | 5 | ||
6 | Introduction | 6 | Introduction |
@@ -161,19 +161,24 @@ against the glass. The inner region will increase, and in general, the | |||
161 | ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than | 161 | ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than |
162 | unity, is related to the contact pressure. For pressure-based devices, | 162 | unity, is related to the contact pressure. For pressure-based devices, |
163 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area | 163 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area |
164 | instead. | 164 | instead. Devices capable of contact hovering can use ABS_MT_DISTANCE to |
165 | indicate the distance between the contact and the surface. | ||
165 | 166 | ||
166 | In addition to the MAJOR parameters, the oval shape of the contact can be | 167 | In addition to the MAJOR parameters, the oval shape of the contact can be |
167 | described by adding the MINOR parameters, such that MAJOR and MINOR are the | 168 | described by adding the MINOR parameters, such that MAJOR and MINOR are the |
168 | major and minor axis of an ellipse. Finally, the orientation of the oval | 169 | major and minor axis of an ellipse. Finally, the orientation of the oval |
169 | shape can be describe with the ORIENTATION parameter. | 170 | shape can be describe with the ORIENTATION parameter. |
170 | 171 | ||
172 | For type A devices, further specification of the touch shape is possible | ||
173 | via ABS_MT_BLOB_ID. | ||
174 | |||
171 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a | 175 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a |
172 | contact or a pen or something else. Devices with more granular information | 176 | finger or a pen or something else. Finally, the ABS_MT_TRACKING_ID event |
173 | may specify general shapes as blobs, i.e., as a sequence of rectangular | 177 | may be used to track identified contacts over time [5]. |
174 | shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices | 178 | |
175 | that currently support it, the ABS_MT_TRACKING_ID event may be used to | 179 | In the type B protocol, ABS_MT_TOOL_TYPE and ABS_MT_TRACKING_ID are |
176 | report contact tracking from hardware [5]. | 180 | implicitly handled by input core; drivers should instead call |
181 | input_mt_report_slot_state(). | ||
177 | 182 | ||
178 | 183 | ||
179 | Event Semantics | 184 | Event Semantics |
@@ -213,6 +218,12 @@ The pressure, in arbitrary units, on the contact area. May be used instead | |||
213 | of TOUCH and WIDTH for pressure-based devices or any device with a spatial | 218 | of TOUCH and WIDTH for pressure-based devices or any device with a spatial |
214 | signal intensity distribution. | 219 | signal intensity distribution. |
215 | 220 | ||
221 | ABS_MT_DISTANCE | ||
222 | |||
223 | The distance, in surface units, between the contact and the surface. Zero | ||
224 | distance means the contact is touching the surface. A positive number means | ||
225 | the contact is hovering above the surface. | ||
226 | |||
216 | ABS_MT_ORIENTATION | 227 | ABS_MT_ORIENTATION |
217 | 228 | ||
218 | The orientation of the ellipse. The value should describe a signed quarter | 229 | The orientation of the ellipse. The value should describe a signed quarter |
@@ -240,21 +251,24 @@ ABS_MT_TOOL_TYPE | |||
240 | The type of approaching tool. A lot of kernel drivers cannot distinguish | 251 | The type of approaching tool. A lot of kernel drivers cannot distinguish |
241 | between different tool types, such as a finger or a pen. In such cases, the | 252 | between different tool types, such as a finger or a pen. In such cases, the |
242 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and | 253 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and |
243 | MT_TOOL_PEN [2]. | 254 | MT_TOOL_PEN [2]. For type B devices, this event is handled by input core; |
255 | drivers should instead use input_mt_report_slot_state(). | ||
244 | 256 | ||
245 | ABS_MT_BLOB_ID | 257 | ABS_MT_BLOB_ID |
246 | 258 | ||
247 | The BLOB_ID groups several packets together into one arbitrarily shaped | 259 | The BLOB_ID groups several packets together into one arbitrarily shaped |
248 | contact. This is a low-level anonymous grouping for type A devices, and | 260 | contact. The sequence of points forms a polygon which defines the shape of |
261 | the contact. This is a low-level anonymous grouping for type A devices, and | ||
249 | should not be confused with the high-level trackingID [5]. Most type A | 262 | should not be confused with the high-level trackingID [5]. Most type A |
250 | devices do not have blob capability, so drivers can safely omit this event. | 263 | devices do not have blob capability, so drivers can safely omit this event. |
251 | 264 | ||
252 | ABS_MT_TRACKING_ID | 265 | ABS_MT_TRACKING_ID |
253 | 266 | ||
254 | The TRACKING_ID identifies an initiated contact throughout its life cycle | 267 | The TRACKING_ID identifies an initiated contact throughout its life cycle |
255 | [5]. This event is mandatory for type B devices. The value range of the | 268 | [5]. The value range of the TRACKING_ID should be large enough to ensure |
256 | TRACKING_ID should be large enough to ensure unique identification of a | 269 | unique identification of a contact maintained over an extended period of |
257 | contact maintained over an extended period of time. | 270 | time. For type B devices, this event is handled by input core; drivers |
271 | should instead use input_mt_report_slot_state(). | ||
258 | 272 | ||
259 | 273 | ||
260 | Event Computation | 274 | Event Computation |
@@ -301,18 +315,19 @@ and with ORIENTATION, one can detect twisting of fingers. | |||
301 | Notes | 315 | Notes |
302 | ----- | 316 | ----- |
303 | 317 | ||
304 | In order to stay compatible with existing applications, the data | 318 | In order to stay compatible with existing applications, the data reported |
305 | reported in a finger packet must not be recognized as single-touch | 319 | in a finger packet must not be recognized as single-touch events. |
306 | events. In addition, all finger data must bypass input filtering, | 320 | |
307 | since subsequent events of the same type refer to different fingers. | 321 | For type A devices, all finger data bypasses input filtering, since |
322 | subsequent events of the same type refer to different fingers. | ||
308 | 323 | ||
309 | The first kernel driver to utilize the MT protocol is the bcm5974 driver, | 324 | For example usage of the type A protocol, see the bcm5974 driver. For |
310 | where examples can be found. | 325 | example usage of the type B protocol, see the hid-egalax driver. |
311 | 326 | ||
312 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the | 327 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the |
313 | difference between the contact position and the approaching tool position | 328 | difference between the contact position and the approaching tool position |
314 | could be used to derive tilt. | 329 | could be used to derive tilt. |
315 | [2] The list can of course be extended. | 330 | [2] The list can of course be extended. |
316 | [3] Multitouch X driver project: http://bitmath.org/code/multitouch/. | 331 | [3] The mtdev project: http://bitmath.org/code/mtdev/. |
317 | [4] See the section on event computation. | 332 | [4] See the section on event computation. |
318 | [5] See the section on finger tracking. | 333 | [5] See the section on finger tracking. |