1Kernel driver for CMA3000-D0x
2============================
3
4Supported chips:
5* VTI CMA3000-D0x
6Datasheet:
7  CMA3000-D0X Product Family Specification 8281000A.02.pdf
8  <http://www.vti.fi/en/>
9
10Author: Hemanth V <hemanthv@ti.com>
11
12
13Description
14-----------
15CMA3000 Tri-axis accelerometer supports Motion detect, Measurement and
16Free fall modes.
17
18Motion Detect Mode: Its the low power mode where interrupts are generated only
19when motion exceeds the defined thresholds.
20
21Measurement Mode: This mode is used to read the acceleration data on X,Y,Z
22axis and supports 400, 100, 40 Hz sample frequency.
23
24Free fall Mode: This mode is intended to save system resources.
25
26Threshold values: Chip supports defining threshold values for above modes
27which includes time and g value. Refer product specifications for more details.
28
29CMA3000 chip supports mutually exclusive I2C and SPI interfaces for
30communication, currently the driver supports I2C based communication only.
31Initial configuration for bus mode is set in non volatile memory and can later
32be modified through bus interface command.
33
34Driver reports acceleration data through input subsystem. It generates ABS_MISC
35event with value 1 when free fall is detected.
36
37Platform data need to be configured for initial default values.
38
39Platform Data
40-------------
41fuzz_x: Noise on X Axis
42
43fuzz_y: Noise on Y Axis
44
45fuzz_z: Noise on Z Axis
46
47g_range: G range in milli g i.e 2000 or 8000
48
49mode: Default Operating mode
50
51mdthr: Motion detect g range threshold value
52
53mdfftmr: Motion detect and free fall time threshold value
54
55ffthr: Free fall g range threshold value
56
57Input Interface
58--------------
59Input driver version is 1.0.0
60Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
61Input device name: "cma3000-accelerometer"
62Supported 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
87Register/Platform parameters Description
88----------------------------------------
89
90mode:
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
100grange:
101	2000: 2000 mg or 2G Range
102	8000: 8000 mg or 8G Range
103
104mdthr:
105	X: X * 71mg (8G Range)
106	X: X * 18mg (2G Range)
107
108mdfftmr:
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
113ffthr:
114       X: (X >> 2) * 18mg (2G Range)
115       X: (X & 0x0F) * 71 mg (8G Range)
116