Merge branch 'android-tegra-2.6.36' into android-tegra-moto-2.6.36
[firefly-linux-kernel-4.4.55.git] / include / linux / l3g4200d.h
1 /*
2  * Copyright (C) 2010 Motorola, Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
16  * 02111-1307, USA
17  */
18
19 #ifndef __L3G4200D_H__
20 #define __L3G4200D_H__
21
22 #include <linux/ioctl.h>  /* For IOCTL macros */
23
24 #define L3G4200D_NAME   "l3g4200d"
25
26 #define L3G4200D_IOCTL_BASE 77
27 /** The following define the IOCTL command values via the ioctl macros */
28 #define L3G4200D_IOCTL_SET_DELAY        _IOW(L3G4200D_IOCTL_BASE, 0, int)
29 #define L3G4200D_IOCTL_GET_DELAY        _IOR(L3G4200D_IOCTL_BASE, 1, int)
30 #define L3G4200D_IOCTL_SET_ENABLE       _IOW(L3G4200D_IOCTL_BASE, 2, int)
31 #define L3G4200D_IOCTL_GET_ENABLE       _IOR(L3G4200D_IOCTL_BASE, 3, int)
32
33 #ifdef __KERNEL__
34
35 struct l3g4200d_platform_data {
36         int poll_interval;
37         unsigned gpio_drdy;
38
39         u8 ctrl_reg1;
40         u8 ctrl_reg2;
41         u8 ctrl_reg3;
42         u8 ctrl_reg4;
43         u8 ctrl_reg5;
44
45         u8 reference;
46
47         u8 fifo_ctrl_reg;
48
49         u8 int1_cfg;
50
51         u8 int1_tsh_xh;
52         u8 int1_tsh_xl;
53         u8 int1_tsh_yh;
54         u8 int1_tsh_yl;
55         u8 int1_tsh_zh;
56         u8 int1_tsh_zl;
57         u8 int1_duration;
58 };
59 #endif /* __KERNEL__ */
60
61 #endif  /* __L3G4200D_H__ */
62