xref: /openbmc/linux/include/linux/input/adxl34x.h (revision 5eb9f900)
1e27c7292SMichael Hennerich /*
2e27c7292SMichael Hennerich  * include/linux/input/adxl34x.h
3e27c7292SMichael Hennerich  *
4e27c7292SMichael Hennerich  * Digital Accelerometer characteristics are highly application specific
5e27c7292SMichael Hennerich  * and may vary between boards and models. The platform_data for the
6e27c7292SMichael Hennerich  * device's "struct device" holds this information.
7e27c7292SMichael Hennerich  *
8e27c7292SMichael Hennerich  * Copyright 2009 Analog Devices Inc.
9e27c7292SMichael Hennerich  *
10e27c7292SMichael Hennerich  * Licensed under the GPL-2 or later.
11e27c7292SMichael Hennerich  */
12e27c7292SMichael Hennerich 
13e27c7292SMichael Hennerich #ifndef __LINUX_INPUT_ADXL34X_H__
14e27c7292SMichael Hennerich #define __LINUX_INPUT_ADXL34X_H__
15e27c7292SMichael Hennerich 
16e27c7292SMichael Hennerich struct adxl34x_platform_data {
17e27c7292SMichael Hennerich 
18e27c7292SMichael Hennerich 	/*
19e27c7292SMichael Hennerich 	 * X,Y,Z Axis Offset:
20e27c7292SMichael Hennerich 	 * offer user offset adjustments in twoscompliment
21e27c7292SMichael Hennerich 	 * form with a scale factor of 15.6 mg/LSB (i.e. 0x7F = +2 g)
22e27c7292SMichael Hennerich 	 */
23e27c7292SMichael Hennerich 
24e27c7292SMichael Hennerich 	s8 x_axis_offset;
25e27c7292SMichael Hennerich 	s8 y_axis_offset;
26e27c7292SMichael Hennerich 	s8 z_axis_offset;
27e27c7292SMichael Hennerich 
28e27c7292SMichael Hennerich 	/*
29e27c7292SMichael Hennerich 	 * TAP_X/Y/Z Enable: Setting TAP_X, Y, or Z Enable enables X,
30e27c7292SMichael Hennerich 	 * Y, or Z participation in Tap detection. A '0' excludes the
31e27c7292SMichael Hennerich 	 * selected axis from participation in Tap detection.
32e27c7292SMichael Hennerich 	 * Setting the SUPPRESS bit suppresses Double Tap detection if
335eb9f900SMichael Tandy 	 * acceleration greater than tap_threshold is present during the
345eb9f900SMichael Tandy 	 * tap_latency period, i.e. after the first tap but before the
355eb9f900SMichael Tandy 	 * opening of the second tap window.
36e27c7292SMichael Hennerich 	 */
37e27c7292SMichael Hennerich 
38e27c7292SMichael Hennerich #define ADXL_SUPPRESS	(1 << 3)
39e27c7292SMichael Hennerich #define ADXL_TAP_X_EN	(1 << 2)
40e27c7292SMichael Hennerich #define ADXL_TAP_Y_EN	(1 << 1)
41e27c7292SMichael Hennerich #define ADXL_TAP_Z_EN	(1 << 0)
42e27c7292SMichael Hennerich 
43e27c7292SMichael Hennerich 	u8 tap_axis_control;
44e27c7292SMichael Hennerich 
45e27c7292SMichael Hennerich 	/*
46e27c7292SMichael Hennerich 	 * tap_threshold:
47e27c7292SMichael Hennerich 	 * holds the threshold value for tap detection/interrupts.
48e27c7292SMichael Hennerich 	 * The data format is unsigned. The scale factor is 62.5 mg/LSB
49e27c7292SMichael Hennerich 	 * (i.e. 0xFF = +16 g). A zero value may result in undesirable
50e27c7292SMichael Hennerich 	 * behavior if Tap/Double Tap is enabled.
51e27c7292SMichael Hennerich 	 */
52e27c7292SMichael Hennerich 
53e27c7292SMichael Hennerich 	u8 tap_threshold;
54e27c7292SMichael Hennerich 
55e27c7292SMichael Hennerich 	/*
56e27c7292SMichael Hennerich 	 * tap_duration:
57e27c7292SMichael Hennerich 	 * is an unsigned time value representing the maximum
58e27c7292SMichael Hennerich 	 * time that an event must be above the tap_threshold threshold
59e27c7292SMichael Hennerich 	 * to qualify as a tap event. The scale factor is 625 us/LSB. A zero
60e27c7292SMichael Hennerich 	 * value will prevent Tap/Double Tap functions from working.
61e27c7292SMichael Hennerich 	 */
62e27c7292SMichael Hennerich 
63e27c7292SMichael Hennerich 	u8 tap_duration;
64e27c7292SMichael Hennerich 
65e27c7292SMichael Hennerich 	/*
66e27c7292SMichael Hennerich 	 * tap_latency:
67e27c7292SMichael Hennerich 	 * is an unsigned time value representing the wait time
68e27c7292SMichael Hennerich 	 * from the detection of a tap event to the opening of the time
69e27c7292SMichael Hennerich 	 * window tap_window for a possible second tap event. The scale
70e27c7292SMichael Hennerich 	 * factor is 1.25 ms/LSB. A zero value will disable the Double Tap
71e27c7292SMichael Hennerich 	 * function.
72e27c7292SMichael Hennerich 	 */
73e27c7292SMichael Hennerich 
74e27c7292SMichael Hennerich 	u8 tap_latency;
75e27c7292SMichael Hennerich 
76e27c7292SMichael Hennerich 	/*
77e27c7292SMichael Hennerich 	 * tap_window:
78e27c7292SMichael Hennerich 	 * is an unsigned time value representing the amount
79e27c7292SMichael Hennerich 	 * of time after the expiration of tap_latency during which a second
80e27c7292SMichael Hennerich 	 * tap can begin. The scale factor is 1.25 ms/LSB. A zero value will
81e27c7292SMichael Hennerich 	 * disable the Double Tap function.
82e27c7292SMichael Hennerich 	 */
83e27c7292SMichael Hennerich 
84e27c7292SMichael Hennerich 	u8 tap_window;
85e27c7292SMichael Hennerich 
86e27c7292SMichael Hennerich 	/*
87e27c7292SMichael Hennerich 	 * act_axis_control:
88e27c7292SMichael Hennerich 	 * X/Y/Z Enable: A '1' enables X, Y, or Z participation in activity
89e27c7292SMichael Hennerich 	 * or inactivity detection. A '0' excludes the selected axis from
90e27c7292SMichael Hennerich 	 * participation. If all of the axes are excluded, the function is
91e27c7292SMichael Hennerich 	 * disabled.
92e27c7292SMichael Hennerich 	 * AC/DC: A '0' = DC coupled operation and a '1' = AC coupled
93e27c7292SMichael Hennerich 	 * operation. In DC coupled operation, the current acceleration is
94e27c7292SMichael Hennerich 	 * compared with activity_threshold and inactivity_threshold directly
95e27c7292SMichael Hennerich 	 * to determine whether activity or inactivity is detected. In AC
96e27c7292SMichael Hennerich 	 * coupled operation for activity detection, the acceleration value
97e27c7292SMichael Hennerich 	 * at the start of activity detection is taken as a reference value.
98e27c7292SMichael Hennerich 	 * New samples of acceleration are then compared to this
99e27c7292SMichael Hennerich 	 * reference value and if the magnitude of the difference exceeds
100e27c7292SMichael Hennerich 	 * activity_threshold the device will trigger an activity interrupt. In
101e27c7292SMichael Hennerich 	 * AC coupled operation for inactivity detection, a reference value
102e27c7292SMichael Hennerich 	 * is used again for comparison and is updated whenever the
103e27c7292SMichael Hennerich 	 * device exceeds the inactivity threshold. Once the reference
104e27c7292SMichael Hennerich 	 * value is selected, the device compares the magnitude of the
105e27c7292SMichael Hennerich 	 * difference between the reference value and the current
106e27c7292SMichael Hennerich 	 * acceleration with inactivity_threshold. If the difference is below
107e27c7292SMichael Hennerich 	 * inactivity_threshold for a total of inactivity_time, the device is
108e27c7292SMichael Hennerich 	 * considered inactive and the inactivity interrupt is triggered.
109e27c7292SMichael Hennerich 	 */
110e27c7292SMichael Hennerich 
111e27c7292SMichael Hennerich #define ADXL_ACT_ACDC		(1 << 7)
112e27c7292SMichael Hennerich #define ADXL_ACT_X_EN		(1 << 6)
113e27c7292SMichael Hennerich #define ADXL_ACT_Y_EN		(1 << 5)
114e27c7292SMichael Hennerich #define ADXL_ACT_Z_EN		(1 << 4)
115e27c7292SMichael Hennerich #define ADXL_INACT_ACDC		(1 << 3)
116e27c7292SMichael Hennerich #define ADXL_INACT_X_EN		(1 << 2)
117e27c7292SMichael Hennerich #define ADXL_INACT_Y_EN		(1 << 1)
118e27c7292SMichael Hennerich #define ADXL_INACT_Z_EN		(1 << 0)
119e27c7292SMichael Hennerich 
120e27c7292SMichael Hennerich 	u8 act_axis_control;
121e27c7292SMichael Hennerich 
122e27c7292SMichael Hennerich 	/*
123e27c7292SMichael Hennerich 	 * activity_threshold:
124e27c7292SMichael Hennerich 	 * holds the threshold value for activity detection.
125e27c7292SMichael Hennerich 	 * The data format is unsigned. The scale factor is
126e27c7292SMichael Hennerich 	 * 62.5 mg/LSB. A zero value may result in undesirable behavior if
127e27c7292SMichael Hennerich 	 * Activity interrupt is enabled.
128e27c7292SMichael Hennerich 	 */
129e27c7292SMichael Hennerich 
130e27c7292SMichael Hennerich 	u8 activity_threshold;
131e27c7292SMichael Hennerich 
132e27c7292SMichael Hennerich 	/*
133e27c7292SMichael Hennerich 	 * inactivity_threshold:
134e27c7292SMichael Hennerich 	 * holds the threshold value for inactivity
135e27c7292SMichael Hennerich 	 * detection. The data format is unsigned. The scale
136e27c7292SMichael Hennerich 	 * factor is 62.5 mg/LSB. A zero value may result in undesirable
137e27c7292SMichael Hennerich 	 * behavior if Inactivity interrupt is enabled.
138e27c7292SMichael Hennerich 	 */
139e27c7292SMichael Hennerich 
140e27c7292SMichael Hennerich 	u8 inactivity_threshold;
141e27c7292SMichael Hennerich 
142e27c7292SMichael Hennerich 	/*
143e27c7292SMichael Hennerich 	 * inactivity_time:
144e27c7292SMichael Hennerich 	 * is an unsigned time value representing the
145e27c7292SMichael Hennerich 	 * amount of time that acceleration must be below the value in
146e27c7292SMichael Hennerich 	 * inactivity_threshold for inactivity to be declared. The scale factor
147e27c7292SMichael Hennerich 	 * is 1 second/LSB. Unlike the other interrupt functions, which
148e27c7292SMichael Hennerich 	 * operate on unfiltered data, the inactivity function operates on the
149e27c7292SMichael Hennerich 	 * filtered output data. At least one output sample must be
150e27c7292SMichael Hennerich 	 * generated for the inactivity interrupt to be triggered. This will
151e27c7292SMichael Hennerich 	 * result in the function appearing un-responsive if the
152e27c7292SMichael Hennerich 	 * inactivity_time register is set with a value less than the time
153e27c7292SMichael Hennerich 	 * constant of the Output Data Rate. A zero value will result in an
154e27c7292SMichael Hennerich 	 * interrupt when the output data is below inactivity_threshold.
155e27c7292SMichael Hennerich 	 */
156e27c7292SMichael Hennerich 
157e27c7292SMichael Hennerich 	u8 inactivity_time;
158e27c7292SMichael Hennerich 
159e27c7292SMichael Hennerich 	/*
160e27c7292SMichael Hennerich 	 * free_fall_threshold:
161e27c7292SMichael Hennerich 	 * holds the threshold value for Free-Fall detection.
162e27c7292SMichael Hennerich 	 * The data format is unsigned. The root-sum-square(RSS) value
163e27c7292SMichael Hennerich 	 * of all axes is calculated and compared to the value in
164e27c7292SMichael Hennerich 	 * free_fall_threshold to determine if a free fall event may be
165e27c7292SMichael Hennerich 	 * occurring.  The scale factor is 62.5 mg/LSB. A zero value may
166e27c7292SMichael Hennerich 	 * result in undesirable behavior if Free-Fall interrupt is
167e27c7292SMichael Hennerich 	 * enabled. Values between 300 and 600 mg (0x05 to 0x09) are
168e27c7292SMichael Hennerich 	 * recommended.
169e27c7292SMichael Hennerich 	 */
170e27c7292SMichael Hennerich 
171e27c7292SMichael Hennerich 	u8 free_fall_threshold;
172e27c7292SMichael Hennerich 
173e27c7292SMichael Hennerich 	/*
174e27c7292SMichael Hennerich 	 * free_fall_time:
175e27c7292SMichael Hennerich 	 * is an unsigned time value representing the minimum
176e27c7292SMichael Hennerich 	 * time that the RSS value of all axes must be less than
177e27c7292SMichael Hennerich 	 * free_fall_threshold to generate a Free-Fall interrupt. The
178e27c7292SMichael Hennerich 	 * scale factor is 5 ms/LSB. A zero value may result in
179e27c7292SMichael Hennerich 	 * undesirable behavior if Free-Fall interrupt is enabled.
180e27c7292SMichael Hennerich 	 * Values between 100 to 350 ms (0x14 to 0x46) are recommended.
181e27c7292SMichael Hennerich 	 */
182e27c7292SMichael Hennerich 
183e27c7292SMichael Hennerich 	u8 free_fall_time;
184e27c7292SMichael Hennerich 
185e27c7292SMichael Hennerich 	/*
186e27c7292SMichael Hennerich 	 * data_rate:
187e27c7292SMichael Hennerich 	 * Selects device bandwidth and output data rate.
188e27c7292SMichael Hennerich 	 * RATE = 3200 Hz / (2^(15 - x)). Default value is 0x0A, or 100 Hz
189e27c7292SMichael Hennerich 	 * Output Data Rate. An Output Data Rate should be selected that
190e27c7292SMichael Hennerich 	 * is appropriate for the communication protocol and frequency
191e27c7292SMichael Hennerich 	 * selected. Selecting too high of an Output Data Rate with a low
192e27c7292SMichael Hennerich 	 * communication speed will result in samples being discarded.
193e27c7292SMichael Hennerich 	 */
194e27c7292SMichael Hennerich 
195e27c7292SMichael Hennerich 	u8 data_rate;
196e27c7292SMichael Hennerich 
197e27c7292SMichael Hennerich 	/*
198e27c7292SMichael Hennerich 	 * data_range:
199e27c7292SMichael Hennerich 	 * FULL_RES: When this bit is set with the device is
200e27c7292SMichael Hennerich 	 * in Full-Resolution Mode, where the output resolution increases
201e27c7292SMichael Hennerich 	 * with RANGE to maintain a 4 mg/LSB scale factor. When this
202e27c7292SMichael Hennerich 	 * bit is cleared the device is in 10-bit Mode and RANGE determine the
203e27c7292SMichael Hennerich 	 * maximum g-Range and scale factor.
204e27c7292SMichael Hennerich 	 */
205e27c7292SMichael Hennerich 
206e27c7292SMichael Hennerich #define ADXL_FULL_RES		(1 << 3)
207e27c7292SMichael Hennerich #define ADXL_RANGE_PM_2g	0
208e27c7292SMichael Hennerich #define ADXL_RANGE_PM_4g	1
209e27c7292SMichael Hennerich #define ADXL_RANGE_PM_8g	2
210e27c7292SMichael Hennerich #define ADXL_RANGE_PM_16g	3
211e27c7292SMichael Hennerich 
212e27c7292SMichael Hennerich 	u8 data_range;
213e27c7292SMichael Hennerich 
214e27c7292SMichael Hennerich 	/*
215e27c7292SMichael Hennerich 	 * low_power_mode:
216e27c7292SMichael Hennerich 	 * A '0' = Normal operation and a '1' = Reduced
217e27c7292SMichael Hennerich 	 * power operation with somewhat higher noise.
218e27c7292SMichael Hennerich 	 */
219e27c7292SMichael Hennerich 
220e27c7292SMichael Hennerich 	u8 low_power_mode;
221e27c7292SMichael Hennerich 
222e27c7292SMichael Hennerich 	/*
223e27c7292SMichael Hennerich 	 * power_mode:
224e27c7292SMichael Hennerich 	 * LINK: A '1' with both the activity and inactivity functions
225e27c7292SMichael Hennerich 	 * enabled will delay the start of the activity function until
226e27c7292SMichael Hennerich 	 * inactivity is detected. Once activity is detected, inactivity
227e27c7292SMichael Hennerich 	 * detection will begin and prevent the detection of activity. This
228e27c7292SMichael Hennerich 	 * bit serially links the activity and inactivity functions. When '0'
229e27c7292SMichael Hennerich 	 * the inactivity and activity functions are concurrent. Additional
2305eb9f900SMichael Tandy 	 * information can be found in the ADXL34x datasheet's Application
2315eb9f900SMichael Tandy 	 * section under Link Mode.
232e27c7292SMichael Hennerich 	 * AUTO_SLEEP: A '1' sets the ADXL34x to switch to Sleep Mode
233e27c7292SMichael Hennerich 	 * when inactivity (acceleration has been below inactivity_threshold
234e27c7292SMichael Hennerich 	 * for at least inactivity_time) is detected and the LINK bit is set.
2355eb9f900SMichael Tandy 	 * A '0' disables automatic switching to Sleep Mode. See the
2365eb9f900SMichael Tandy 	 * Sleep Bit section of the ADXL34x datasheet for more information.
237e27c7292SMichael Hennerich 	 */
238e27c7292SMichael Hennerich 
239e27c7292SMichael Hennerich #define ADXL_LINK	(1 << 5)
240e27c7292SMichael Hennerich #define ADXL_AUTO_SLEEP	(1 << 4)
241e27c7292SMichael Hennerich 
242e27c7292SMichael Hennerich 	u8 power_mode;
243e27c7292SMichael Hennerich 
244e27c7292SMichael Hennerich 	/*
245e27c7292SMichael Hennerich 	 * fifo_mode:
246e27c7292SMichael Hennerich 	 * BYPASS The FIFO is bypassed
247e27c7292SMichael Hennerich 	 * FIFO   FIFO collects up to 32 values then stops collecting data
248e27c7292SMichael Hennerich 	 * STREAM FIFO holds the last 32 data values. Once full, the FIFO's
249e27c7292SMichael Hennerich 	 *        oldest data is lost as it is replaced with newer data
250e27c7292SMichael Hennerich 	 *
251e27c7292SMichael Hennerich 	 * DEFAULT should be ADXL_FIFO_STREAM
252e27c7292SMichael Hennerich 	 */
253e27c7292SMichael Hennerich 
254e27c7292SMichael Hennerich #define ADXL_FIFO_BYPASS	0
255e27c7292SMichael Hennerich #define ADXL_FIFO_FIFO		1
256e27c7292SMichael Hennerich #define ADXL_FIFO_STREAM	2
257e27c7292SMichael Hennerich 
258e27c7292SMichael Hennerich 	u8 fifo_mode;
259e27c7292SMichael Hennerich 
260e27c7292SMichael Hennerich 	/*
261e27c7292SMichael Hennerich 	 * watermark:
262e27c7292SMichael Hennerich 	 * The Watermark feature can be used to reduce the interrupt load
263e27c7292SMichael Hennerich 	 * of the system. The FIFO fills up to the value stored in watermark
264e27c7292SMichael Hennerich 	 * [1..32] and then generates an interrupt.
265e27c7292SMichael Hennerich 	 * A '0' disables the watermark feature.
266e27c7292SMichael Hennerich 	 */
267e27c7292SMichael Hennerich 
268e27c7292SMichael Hennerich 	u8 watermark;
269e27c7292SMichael Hennerich 
2705eb9f900SMichael Tandy 	/*
2715eb9f900SMichael Tandy 	 * When acceleration measurements are received from the ADXL34x
2725eb9f900SMichael Tandy 	 * events are sent to the event subsystem. The following settings
2735eb9f900SMichael Tandy 	 * select the event type and event code for new x, y and z axis data
2745eb9f900SMichael Tandy 	 * respectively.
2755eb9f900SMichael Tandy 	 */
276e27c7292SMichael Hennerich 	u32 ev_type;	/* EV_ABS or EV_REL */
277e27c7292SMichael Hennerich 
278e27c7292SMichael Hennerich 	u32 ev_code_x;	/* ABS_X,Y,Z or REL_X,Y,Z */
279e27c7292SMichael Hennerich 	u32 ev_code_y;	/* ABS_X,Y,Z or REL_X,Y,Z */
280e27c7292SMichael Hennerich 	u32 ev_code_z;	/* ABS_X,Y,Z or REL_X,Y,Z */
281e27c7292SMichael Hennerich 
282e27c7292SMichael Hennerich 	/*
283e27c7292SMichael Hennerich 	 * A valid BTN or KEY Code; use tap_axis_control to disable
284e27c7292SMichael Hennerich 	 * event reporting
285e27c7292SMichael Hennerich 	 */
286e27c7292SMichael Hennerich 
287e27c7292SMichael Hennerich 	u32 ev_code_tap[3];	/* EV_KEY {X-Axis, Y-Axis, Z-Axis} */
288e27c7292SMichael Hennerich 
289e27c7292SMichael Hennerich 	/*
290e27c7292SMichael Hennerich 	 * A valid BTN or KEY Code for Free-Fall or Activity enables
291e27c7292SMichael Hennerich 	 * input event reporting. A '0' disables the Free-Fall or
292e27c7292SMichael Hennerich 	 * Activity reporting.
293e27c7292SMichael Hennerich 	 */
294e27c7292SMichael Hennerich 
295e27c7292SMichael Hennerich 	u32 ev_code_ff;	/* EV_KEY */
296e27c7292SMichael Hennerich 	u32 ev_code_act_inactivity;	/* EV_KEY */
297e27c7292SMichael Hennerich 
298671386bbSMichael Hennerich 	/*
2995eb9f900SMichael Tandy 	 * Use ADXL34x INT2 pin instead of INT1 pin for interrupt output
300671386bbSMichael Hennerich 	 */
301e27c7292SMichael Hennerich 	u8 use_int2;
302671386bbSMichael Hennerich 
303671386bbSMichael Hennerich 	/*
304671386bbSMichael Hennerich 	 * ADXL346 only ORIENTATION SENSING feature
305671386bbSMichael Hennerich 	 * The orientation function of the ADXL346 reports both 2-D and
306671386bbSMichael Hennerich 	 * 3-D orientation concurrently.
307671386bbSMichael Hennerich 	 */
308671386bbSMichael Hennerich 
309671386bbSMichael Hennerich #define ADXL_EN_ORIENTATION_2D		1
310671386bbSMichael Hennerich #define ADXL_EN_ORIENTATION_3D		2
311671386bbSMichael Hennerich #define ADXL_EN_ORIENTATION_2D_3D	3
312671386bbSMichael Hennerich 
313671386bbSMichael Hennerich 	u8 orientation_enable;
314671386bbSMichael Hennerich 
315671386bbSMichael Hennerich 	/*
316671386bbSMichael Hennerich 	 * The width of the deadzone region between two or more
317671386bbSMichael Hennerich 	 * orientation positions is determined by setting the Deadzone
318671386bbSMichael Hennerich 	 * value. The deadzone region size can be specified with a
319671386bbSMichael Hennerich 	 * resolution of 3.6deg. The deadzone angle represents the total
320671386bbSMichael Hennerich 	 * angle where the orientation is considered invalid.
321671386bbSMichael Hennerich 	 */
322671386bbSMichael Hennerich 
323671386bbSMichael Hennerich #define ADXL_DEADZONE_ANGLE_0p0		0	/* !!!0.0 [deg] */
324671386bbSMichael Hennerich #define ADXL_DEADZONE_ANGLE_3p6		1	/* 3.6 [deg] */
325671386bbSMichael Hennerich #define ADXL_DEADZONE_ANGLE_7p2		2	/* 7.2 [deg] */
326671386bbSMichael Hennerich #define ADXL_DEADZONE_ANGLE_10p8	3	/* 10.8 [deg] */
327671386bbSMichael Hennerich #define ADXL_DEADZONE_ANGLE_14p4	4	/* 14.4 [deg] */
328671386bbSMichael Hennerich #define ADXL_DEADZONE_ANGLE_18p0	5	/* 18.0 [deg] */
329671386bbSMichael Hennerich #define ADXL_DEADZONE_ANGLE_21p6	6	/* 21.6 [deg] */
330671386bbSMichael Hennerich #define ADXL_DEADZONE_ANGLE_25p2	7	/* 25.2 [deg] */
331671386bbSMichael Hennerich 
332671386bbSMichael Hennerich 	u8 deadzone_angle;
333671386bbSMichael Hennerich 
334671386bbSMichael Hennerich 	/*
335671386bbSMichael Hennerich 	 * To eliminate most human motion such as walking or shaking,
336671386bbSMichael Hennerich 	 * a Divisor value should be selected to effectively limit the
337671386bbSMichael Hennerich 	 * orientation bandwidth. Set the depth of the filter used to
338671386bbSMichael Hennerich 	 * low-pass filter the measured acceleration for stable
339671386bbSMichael Hennerich 	 * orientation sensing
340671386bbSMichael Hennerich 	 */
341671386bbSMichael Hennerich 
342671386bbSMichael Hennerich #define ADXL_LP_FILTER_DIVISOR_2	0
343671386bbSMichael Hennerich #define ADXL_LP_FILTER_DIVISOR_4	1
344671386bbSMichael Hennerich #define ADXL_LP_FILTER_DIVISOR_8	2
345671386bbSMichael Hennerich #define ADXL_LP_FILTER_DIVISOR_16	3
346671386bbSMichael Hennerich #define ADXL_LP_FILTER_DIVISOR_32	4
347671386bbSMichael Hennerich #define ADXL_LP_FILTER_DIVISOR_64	5
348671386bbSMichael Hennerich #define ADXL_LP_FILTER_DIVISOR_128	6
349671386bbSMichael Hennerich #define ADXL_LP_FILTER_DIVISOR_256	7
350671386bbSMichael Hennerich 
351671386bbSMichael Hennerich 	u8 divisor_length;
352671386bbSMichael Hennerich 
353671386bbSMichael Hennerich 	u32 ev_codes_orient_2d[4];	/* EV_KEY {+X, -X, +Y, -Y} */
354671386bbSMichael Hennerich 	u32 ev_codes_orient_3d[6];	/* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
355e27c7292SMichael Hennerich };
356e27c7292SMichael Hennerich #endif
357