hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/input/mouse/elantech.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Elantech Touchpad driver (v6)
34 *
45 * Copyright (C) 2007-2009 Arjan Opmeer <arjan@opmeer.net>
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License version 2 as published
8
- * by the Free Software Foundation.
96 *
107 * Trademarks are the property of their respective owners.
118 */
....@@ -21,6 +18,7 @@
2118 #define ETP_CAPABILITIES_QUERY 0x02
2219 #define ETP_SAMPLE_QUERY 0x03
2320 #define ETP_RESOLUTION_QUERY 0x04
21
+#define ETP_ICBODY_QUERY 0x05
2422
2523 /*
2624 * Command values for register reading or writing
....@@ -143,9 +141,19 @@
143141 unsigned char samples[3];
144142 unsigned char debug;
145143 unsigned char hw_version;
144
+ unsigned char pattern;
146145 unsigned int fw_version;
146
+ unsigned int ic_version;
147
+ unsigned int product_id;
148
+ unsigned int x_min;
149
+ unsigned int y_min;
150
+ unsigned int x_max;
151
+ unsigned int y_max;
147152 unsigned int x_res;
148153 unsigned int y_res;
154
+ unsigned int x_traces;
155
+ unsigned int y_traces;
156
+ unsigned int width;
149157 unsigned int bus;
150158 bool paritycheck;
151159 bool jumpy_cursor;
....@@ -153,6 +161,7 @@
153161 bool crc_enabled;
154162 bool set_hw_resolution;
155163 bool has_trackpoint;
164
+ bool has_middle_button;
156165 int (*send_cmd)(struct psmouse *psmouse, unsigned char c,
157166 unsigned char *param);
158167 };
....@@ -179,32 +188,18 @@
179188 void (*original_set_rate)(struct psmouse *psmouse, unsigned int rate);
180189 };
181190
182
-#ifdef CONFIG_MOUSE_PS2_ELANTECH
183191 int elantech_detect(struct psmouse *psmouse, bool set_properties);
184192 int elantech_init_ps2(struct psmouse *psmouse);
193
+
194
+#ifdef CONFIG_MOUSE_PS2_ELANTECH
185195 int elantech_init(struct psmouse *psmouse);
186196 #else
187
-static inline int elantech_detect(struct psmouse *psmouse, bool set_properties)
188
-{
189
- return -ENOSYS;
190
-}
191197 static inline int elantech_init(struct psmouse *psmouse)
192
-{
193
- return -ENOSYS;
194
-}
195
-static inline int elantech_init_ps2(struct psmouse *psmouse)
196198 {
197199 return -ENOSYS;
198200 }
199201 #endif /* CONFIG_MOUSE_PS2_ELANTECH */
200202
201
-#if defined(CONFIG_MOUSE_PS2_ELANTECH_SMBUS)
202203 int elantech_init_smbus(struct psmouse *psmouse);
203
-#else
204
-static inline int elantech_init_smbus(struct psmouse *psmouse)
205
-{
206
- return -ENOSYS;
207
-}
208
-#endif /* CONFIG_MOUSE_PS2_ELANTECH_SMBUS */
209204
210205 #endif