blob: 3507d078bd8ec68d246c839ba9ac60cfd8385163 [file] [log] [blame]
rbandi127f7ad2018-09-06 16:28:40 -07001/*
2 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
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 and
6 * only version 2 as 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 */
14
15#ifndef HID_QVR_H_FILE
16#define HID_QVR_H_FILE
17
18#define USB_VENDOR_ID_QVR5 0x045e
19#define USB_DEVICE_ID_QVR5 0x0659
20#define QVR_EXTERNAL_SENSOR_REPORT_ID 0x1
21
22struct external_imu_format {
23 s16 temp0;
24 s16 temp1;
25 s16 temp2;
26 s16 temp3;
27 u64 gts0;
28 u64 gts1;
29 u64 gts2;
30 u64 gts3;
31 s16 gx0;
32 s16 gx1;
33 s16 gx2;
34 s16 gx3;
35 s16 gx4;
36 s16 gx5;
37 s16 gx6;
38 s16 gx7;
39 s16 gx8;
40 s16 gx9;
41 s16 gx10;
42 s16 gx11;
43 s16 gx12;
44 s16 gx13;
45 s16 gx14;
46 s16 gx15;
47 s16 gx16;
48 s16 gx17;
49 s16 gx18;
50 s16 gx19;
51 s16 gx20;
52 s16 gx21;
53 s16 gx22;
54 s16 gx23;
55 s16 gx24;
56 s16 gx25;
57 s16 gx26;
58 s16 gx27;
59 s16 gx28;
60 s16 gx29;
61 s16 gx30;
62 s16 gx31;
63 s16 gy0;
64 s16 gy1;
65 s16 gy2;
66 s16 gy3;
67 s16 gy4;
68 s16 gy5;
69 s16 gy6;
70 s16 gy7;
71 s16 gy8;
72 s16 gy9;
73 s16 gy10;
74 s16 gy11;
75 s16 gy12;
76 s16 gy13;
77 s16 gy14;
78 s16 gy15;
79 s16 gy16;
80 s16 gy17;
81 s16 gy18;
82 s16 gy19;
83 s16 gy20;
84 s16 gy21;
85 s16 gy22;
86 s16 gy23;
87 s16 gy24;
88 s16 gy25;
89 s16 gy26;
90 s16 gy27;
91 s16 gy28;
92 s16 gy29;
93 s16 gy30;
94 s16 gy31;
95 s16 gz0;
96 s16 gz1;
97 s16 gz2;
98 s16 gz3;
99 s16 gz4;
100 s16 gz5;
101 s16 gz6;
102 s16 gz7;
103 s16 gz8;
104 s16 gz9;
105 s16 gz10;
106 s16 gz11;
107 s16 gz12;
108 s16 gz13;
109 s16 gz14;
110 s16 gz15;
111 s16 gz16;
112 s16 gz17;
113 s16 gz18;
114 s16 gz19;
115 s16 gz20;
116 s16 gz21;
117 s16 gz22;
118 s16 gz23;
119 s16 gz24;
120 s16 gz25;
121 s16 gz26;
122 s16 gz27;
123 s16 gz28;
124 s16 gz29;
125 s16 gz30;
126 s16 gz31;
127 u64 ats0;
128 u64 ats1;
129 u64 ats2;
130 u64 ats3;
131 s32 ax0;
132 s32 ax1;
133 s32 ax2;
134 s32 ax3;
135 s32 ay0;
136 s32 ay1;
137 s32 ay2;
138 s32 ay3;
139 s32 az0;
140 s32 az1;
141 s32 az2;
142 s32 az3;
143 u64 mts0;
144 u64 mts1;
145 u64 mts2;
146 u64 mts3;
147 s16 mx0;
148 s16 mx1;
149 s16 mx2;
150 s16 mx3;
151 s16 my0;
152 s16 my1;
153 s16 my2;
154 s16 my3;
155 s16 mz0;
156 s16 mz1;
157 s16 mz2;
158 s16 mz3;//368 bytes
159};
160
161int qvr_send_package_wrap(u8 *message, int msize, struct hid_device *hid);
162void qvr_clear_def_parmeter(void);
163void qvr_init(struct hid_device *hdev);
164int qvr_input_init(void);
165void qvr_input_remove(void);
166
167#endif