| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 | /*
 * Copyright (c) 2012, Motorola, Inc. All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
#ifndef __M4SENSORHUB_IRQS_H__
#define __M4SENSORHUB_IRQS_H__
#define M4SH_IRQ_INT0_INDEX 0
#define M4SH_IRQ_INT1_INDEX 8
/* Keep name mapping in m4sensorhub-irq.c 'irq_name' synchronized */
enum m4sensorhub_irqs {
	/* 1st supported interrupt */
	M4SH_IRQ__START,
	/* INT0 0x01: Pressure interrupt */
	M4SH_IRQ_PRESSURE_DATA_READY = M4SH_IRQ_INT0_INDEX,
	/* INT0 0x02: Temperature interrupt */
	M4SH_IRQ_TMP_DATA_READY,
	/* INT0 0x04: Gyro interrupt */
	M4SH_IRQ_GYRO_DATA_READY,
	/* INT0 0x80: Pedometer interrupt */
	M4SH_IRQ_PEDOMETER_DATA_READY,
	/* INT0 0x10: Compass data interrupt */
	M4SH_IRQ_COMPASS_DATA_READY,
	/* INT0 0x20: Fusion data interrupt */
	M4SH_IRQ_FUSION_DATA_READY,
	/* INT0 0x40: Accel data interrupt */
	M4SH_IRQ_ACCEL_DATA_READY,
	/* INT0 0x80: Gesture interrupt */
	M4SH_IRQ_GESTURE_DETECTED,
	/* INT1 0x01 : still mode interrupt */
	M4SH_IRQ_STILL_DETECTED = M4SH_IRQ_INT1_INDEX,
	/* INT1 0x02 : motion detected interrupt */
	M4SH_IRQ_MOTION_DETECTED,
	/* INT1 0x04 : activity change interrupt */
	M4SH_IRQ_ACTIVITY_CHANGE,
	/* INT1 0x08 : download command complete interrupt */
	M4SH_IRQ_DLCMD_RESP_READY,
	/* INT1 0x10 : mic data ready interrupt */
	M4SH_IRQ_MIC_DATA_READY,
	/* INT1 0x20 : wrist command interrupt */
	M4SH_IRQ_WRIST_READY,
	/* INT1 0x40 : passive buffer full */
	M4SH_IRQ_PASSIVE_BUFFER_FULL,
	/* Number of allocated interrupts */
	M4SH_IRQ__NUM
};
#endif  /* __M4SENSORHUB_IRQS_H__ */
 |