alps.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. /*
  2. * ALPS touchpad PS/2 mouse driver
  3. *
  4. * Copyright (c) 2003 Neil Brown <neilb@cse.unsw.edu.au>
  5. * Copyright (c) 2003-2005 Peter Osterlund <petero2@telia.com>
  6. * Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
  7. * Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz>
  8. *
  9. * ALPS detection, tap switching and status querying info is taken from
  10. * tpconfig utility (by C. Scott Ananian and Bruce Kall).
  11. *
  12. * This program is free software; you can redistribute it and/or modify it
  13. * under the terms of the GNU General Public License version 2 as published by
  14. * the Free Software Foundation.
  15. */
  16. #include <linux/input.h>
  17. #include <linux/serio.h>
  18. #include <linux/libps2.h>
  19. #include "psmouse.h"
  20. #include "alps.h"
  21. #undef DEBUG
  22. #ifdef DEBUG
  23. #define dbg(format, arg...) printk(KERN_INFO "alps.c: " format "\n", ## arg)
  24. #else
  25. #define dbg(format, arg...) do {} while (0)
  26. #endif
  27. #define ALPS_DUALPOINT 0x01
  28. #define ALPS_WHEEL 0x02
  29. #define ALPS_FW_BK_1 0x04
  30. #define ALPS_4BTN 0x08
  31. #define ALPS_OLDPROTO 0x10
  32. #define ALPS_PASS 0x20
  33. #define ALPS_FW_BK_2 0x40
  34. static const struct alps_model_info alps_model_data[] = {
  35. { { 0x33, 0x02, 0x0a }, 0x88, 0xf8, ALPS_OLDPROTO }, /* UMAX-530T */
  36. { { 0x53, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
  37. { { 0x53, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
  38. { { 0x60, 0x03, 0xc8 }, 0xf8, 0xf8, 0 }, /* HP ze1115 */
  39. { { 0x63, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
  40. { { 0x63, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
  41. { { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
  42. { { 0x63, 0x02, 0x3c }, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
  43. { { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
  44. { { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 },
  45. { { 0x63, 0x03, 0xc8 }, 0xf8, 0xf8, ALPS_PASS }, /* Dell Latitude D800 */
  46. { { 0x73, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
  47. { { 0x73, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */
  48. { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
  49. { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
  50. { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
  51. { { 0x73, 0x02, 0x50 }, 0xcf, 0xff, ALPS_FW_BK_1 } /* Dell Vostro 1400 */
  52. };
  53. /*
  54. * XXX - this entry is suspicious. First byte has zero lower nibble,
  55. * which is what a normal mouse would report. Also, the value 0x0e
  56. * isn't valid per PS/2 spec.
  57. */
  58. /*
  59. * ALPS abolute Mode - new format
  60. *
  61. * byte 0: 1 ? ? ? 1 ? ? ?
  62. * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
  63. * byte 2: 0 x10 x9 x8 x7 ? fin ges
  64. * byte 3: 0 y9 y8 y7 1 M R L
  65. * byte 4: 0 y6 y5 y4 y3 y2 y1 y0
  66. * byte 5: 0 z6 z5 z4 z3 z2 z1 z0
  67. *
  68. * ?'s can have different meanings on different models,
  69. * such as wheel rotation, extra buttons, stick buttons
  70. * on a dualpoint, etc.
  71. */
  72. static void alps_process_packet(struct psmouse *psmouse)
  73. {
  74. struct alps_data *priv = psmouse->private;
  75. unsigned char *packet = psmouse->packet;
  76. struct input_dev *dev = psmouse->dev;
  77. struct input_dev *dev2 = priv->dev2;
  78. int x, y, z, ges, fin, left, right, middle;
  79. int back = 0, forward = 0;
  80. if ((packet[0] & 0xc8) == 0x08) { /* 3-byte PS/2 packet */
  81. input_report_key(dev2, BTN_LEFT, packet[0] & 1);
  82. input_report_key(dev2, BTN_RIGHT, packet[0] & 2);
  83. input_report_key(dev2, BTN_MIDDLE, packet[0] & 4);
  84. input_report_rel(dev2, REL_X,
  85. packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0);
  86. input_report_rel(dev2, REL_Y,
  87. packet[2] ? ((packet[0] << 3) & 0x100) - packet[2] : 0);
  88. input_sync(dev2);
  89. return;
  90. }
  91. if (priv->i->flags & ALPS_OLDPROTO) {
  92. left = packet[2] & 0x10;
  93. right = packet[2] & 0x08;
  94. middle = 0;
  95. x = packet[1] | ((packet[0] & 0x07) << 7);
  96. y = packet[4] | ((packet[3] & 0x07) << 7);
  97. z = packet[5];
  98. } else {
  99. left = packet[3] & 1;
  100. right = packet[3] & 2;
  101. middle = packet[3] & 4;
  102. x = packet[1] | ((packet[2] & 0x78) << (7 - 3));
  103. y = packet[4] | ((packet[3] & 0x70) << (7 - 4));
  104. z = packet[5];
  105. }
  106. if (priv->i->flags & ALPS_FW_BK_1) {
  107. back = packet[2] & 4;
  108. forward = packet[0] & 0x10;
  109. }
  110. if (priv->i->flags & ALPS_FW_BK_2) {
  111. back = packet[3] & 4;
  112. forward = packet[2] & 4;
  113. if ((middle = forward && back))
  114. forward = back = 0;
  115. }
  116. ges = packet[2] & 1;
  117. fin = packet[2] & 2;
  118. input_report_key(dev, BTN_LEFT, left);
  119. input_report_key(dev, BTN_RIGHT, right);
  120. input_report_key(dev, BTN_MIDDLE, middle);
  121. if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) {
  122. input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x));
  123. input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y));
  124. input_sync(dev);
  125. input_sync(dev2);
  126. return;
  127. }
  128. /* Convert hardware tap to a reasonable Z value */
  129. if (ges && !fin) z = 40;
  130. /*
  131. * A "tap and drag" operation is reported by the hardware as a transition
  132. * from (!fin && ges) to (fin && ges). This should be translated to the
  133. * sequence Z>0, Z==0, Z>0, so the Z==0 event has to be generated manually.
  134. */
  135. if (ges && fin && !priv->prev_fin) {
  136. input_report_abs(dev, ABS_X, x);
  137. input_report_abs(dev, ABS_Y, y);
  138. input_report_abs(dev, ABS_PRESSURE, 0);
  139. input_report_key(dev, BTN_TOOL_FINGER, 0);
  140. input_sync(dev);
  141. }
  142. priv->prev_fin = fin;
  143. if (z > 30) input_report_key(dev, BTN_TOUCH, 1);
  144. if (z < 25) input_report_key(dev, BTN_TOUCH, 0);
  145. if (z > 0) {
  146. input_report_abs(dev, ABS_X, x);
  147. input_report_abs(dev, ABS_Y, y);
  148. }
  149. input_report_abs(dev, ABS_PRESSURE, z);
  150. input_report_key(dev, BTN_TOOL_FINGER, z > 0);
  151. if (priv->i->flags & ALPS_WHEEL)
  152. input_report_rel(dev, REL_WHEEL, ((packet[2] << 1) & 0x08) - ((packet[0] >> 4) & 0x07));
  153. if (priv->i->flags & (ALPS_FW_BK_1 | ALPS_FW_BK_2)) {
  154. input_report_key(dev, BTN_FORWARD, forward);
  155. input_report_key(dev, BTN_BACK, back);
  156. }
  157. input_sync(dev);
  158. }
  159. static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
  160. {
  161. struct alps_data *priv = psmouse->private;
  162. if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */
  163. if (psmouse->pktcnt == 3) {
  164. alps_process_packet(psmouse);
  165. return PSMOUSE_FULL_PACKET;
  166. }
  167. return PSMOUSE_GOOD_DATA;
  168. }
  169. if ((psmouse->packet[0] & priv->i->mask0) != priv->i->byte0)
  170. return PSMOUSE_BAD_DATA;
  171. /* Bytes 2 - 6 should have 0 in the highest bit */
  172. if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
  173. (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
  174. return PSMOUSE_BAD_DATA;
  175. if (psmouse->pktcnt == 6) {
  176. alps_process_packet(psmouse);
  177. return PSMOUSE_FULL_PACKET;
  178. }
  179. return PSMOUSE_GOOD_DATA;
  180. }
  181. static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int *version)
  182. {
  183. struct ps2dev *ps2dev = &psmouse->ps2dev;
  184. static const unsigned char rates[] = { 0, 10, 20, 40, 60, 80, 100, 200 };
  185. unsigned char param[4];
  186. int i;
  187. /*
  188. * First try "E6 report".
  189. * ALPS should return 0,0,10 or 0,0,100
  190. */
  191. param[0] = 0;
  192. if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
  193. ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) ||
  194. ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) ||
  195. ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11))
  196. return NULL;
  197. param[0] = param[1] = param[2] = 0xff;
  198. if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO))
  199. return NULL;
  200. dbg("E6 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
  201. if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100))
  202. return NULL;
  203. /*
  204. * Now try "E7 report". Allowed responses are in
  205. * alps_model_data[].signature
  206. */
  207. param[0] = 0;
  208. if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
  209. ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) ||
  210. ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) ||
  211. ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21))
  212. return NULL;
  213. param[0] = param[1] = param[2] = 0xff;
  214. if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO))
  215. return NULL;
  216. dbg("E7 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
  217. if (version) {
  218. for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++)
  219. /* empty */;
  220. *version = (param[0] << 8) | (param[1] << 4) | i;
  221. }
  222. for (i = 0; i < ARRAY_SIZE(alps_model_data); i++)
  223. if (!memcmp(param, alps_model_data[i].signature,
  224. sizeof(alps_model_data[i].signature)))
  225. return alps_model_data + i;
  226. return NULL;
  227. }
  228. /*
  229. * For DualPoint devices select the device that should respond to
  230. * subsequent commands. It looks like glidepad is behind stickpointer,
  231. * I'd thought it would be other way around...
  232. */
  233. static int alps_passthrough_mode(struct psmouse *psmouse, int enable)
  234. {
  235. struct ps2dev *ps2dev = &psmouse->ps2dev;
  236. int cmd = enable ? PSMOUSE_CMD_SETSCALE21 : PSMOUSE_CMD_SETSCALE11;
  237. if (ps2_command(ps2dev, NULL, cmd) ||
  238. ps2_command(ps2dev, NULL, cmd) ||
  239. ps2_command(ps2dev, NULL, cmd) ||
  240. ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE))
  241. return -1;
  242. /* we may get 3 more bytes, just ignore them */
  243. ps2_drain(ps2dev, 3, 100);
  244. return 0;
  245. }
  246. static int alps_absolute_mode(struct psmouse *psmouse)
  247. {
  248. struct ps2dev *ps2dev = &psmouse->ps2dev;
  249. /* Try ALPS magic knock - 4 disable before enable */
  250. if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  251. ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  252. ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  253. ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  254. ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE))
  255. return -1;
  256. /*
  257. * Switch mouse to poll (remote) mode so motion data will not
  258. * get in our way
  259. */
  260. return ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETPOLL);
  261. }
  262. static int alps_get_status(struct psmouse *psmouse, char *param)
  263. {
  264. struct ps2dev *ps2dev = &psmouse->ps2dev;
  265. /* Get status: 0xF5 0xF5 0xF5 0xE9 */
  266. if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  267. ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  268. ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  269. ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO))
  270. return -1;
  271. dbg("Status: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
  272. return 0;
  273. }
  274. /*
  275. * Turn touchpad tapping on or off. The sequences are:
  276. * 0xE9 0xF5 0xF5 0xF3 0x0A to enable,
  277. * 0xE9 0xF5 0xF5 0xE8 0x00 to disable.
  278. * My guess that 0xE9 (GetInfo) is here as a sync point.
  279. * For models that also have stickpointer (DualPoints) its tapping
  280. * is controlled separately (0xE6 0xE6 0xE6 0xF3 0x14|0x0A) but
  281. * we don't fiddle with it.
  282. */
  283. static int alps_tap_mode(struct psmouse *psmouse, int enable)
  284. {
  285. struct ps2dev *ps2dev = &psmouse->ps2dev;
  286. int cmd = enable ? PSMOUSE_CMD_SETRATE : PSMOUSE_CMD_SETRES;
  287. unsigned char tap_arg = enable ? 0x0A : 0x00;
  288. unsigned char param[4];
  289. if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO) ||
  290. ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  291. ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
  292. ps2_command(ps2dev, &tap_arg, cmd))
  293. return -1;
  294. if (alps_get_status(psmouse, param))
  295. return -1;
  296. return 0;
  297. }
  298. /*
  299. * alps_poll() - poll the touchpad for current motion packet.
  300. * Used in resync.
  301. */
  302. static int alps_poll(struct psmouse *psmouse)
  303. {
  304. struct alps_data *priv = psmouse->private;
  305. unsigned char buf[6];
  306. int poll_failed;
  307. if (priv->i->flags & ALPS_PASS)
  308. alps_passthrough_mode(psmouse, 1);
  309. poll_failed = ps2_command(&psmouse->ps2dev, buf,
  310. PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0;
  311. if (priv->i->flags & ALPS_PASS)
  312. alps_passthrough_mode(psmouse, 0);
  313. if (poll_failed || (buf[0] & priv->i->mask0) != priv->i->byte0)
  314. return -1;
  315. if ((psmouse->badbyte & 0xc8) == 0x08) {
  316. /*
  317. * Poll the track stick ...
  318. */
  319. if (ps2_command(&psmouse->ps2dev, buf, PSMOUSE_CMD_POLL | (3 << 8)))
  320. return -1;
  321. }
  322. memcpy(psmouse->packet, buf, sizeof(buf));
  323. return 0;
  324. }
  325. static int alps_hw_init(struct psmouse *psmouse, int *version)
  326. {
  327. struct alps_data *priv = psmouse->private;
  328. priv->i = alps_get_model(psmouse, version);
  329. if (!priv->i)
  330. return -1;
  331. if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1))
  332. return -1;
  333. if (alps_tap_mode(psmouse, 1)) {
  334. printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n");
  335. return -1;
  336. }
  337. if (alps_absolute_mode(psmouse)) {
  338. printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
  339. return -1;
  340. }
  341. if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0))
  342. return -1;
  343. /* ALPS needs stream mode, otherwise it won't report any data */
  344. if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSTREAM)) {
  345. printk(KERN_ERR "alps.c: Failed to enable stream mode\n");
  346. return -1;
  347. }
  348. return 0;
  349. }
  350. static int alps_reconnect(struct psmouse *psmouse)
  351. {
  352. psmouse_reset(psmouse);
  353. if (alps_hw_init(psmouse, NULL))
  354. return -1;
  355. return 0;
  356. }
  357. static void alps_disconnect(struct psmouse *psmouse)
  358. {
  359. struct alps_data *priv = psmouse->private;
  360. psmouse_reset(psmouse);
  361. input_unregister_device(priv->dev2);
  362. kfree(priv);
  363. }
  364. int alps_init(struct psmouse *psmouse)
  365. {
  366. struct alps_data *priv;
  367. struct input_dev *dev1 = psmouse->dev, *dev2;
  368. int version;
  369. priv = kzalloc(sizeof(struct alps_data), GFP_KERNEL);
  370. dev2 = input_allocate_device();
  371. if (!priv || !dev2)
  372. goto init_fail;
  373. priv->dev2 = dev2;
  374. psmouse->private = priv;
  375. if (alps_hw_init(psmouse, &version))
  376. goto init_fail;
  377. dev1->evbit[LONG(EV_KEY)] |= BIT(EV_KEY);
  378. dev1->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
  379. dev1->keybit[LONG(BTN_TOOL_FINGER)] |= BIT(BTN_TOOL_FINGER);
  380. dev1->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
  381. dev1->evbit[LONG(EV_ABS)] |= BIT(EV_ABS);
  382. input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0);
  383. input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0);
  384. input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0);
  385. if (priv->i->flags & ALPS_WHEEL) {
  386. dev1->evbit[LONG(EV_REL)] |= BIT(EV_REL);
  387. dev1->relbit[LONG(REL_WHEEL)] |= BIT(REL_WHEEL);
  388. }
  389. if (priv->i->flags & (ALPS_FW_BK_1 | ALPS_FW_BK_2)) {
  390. dev1->keybit[LONG(BTN_FORWARD)] |= BIT(BTN_FORWARD);
  391. dev1->keybit[LONG(BTN_BACK)] |= BIT(BTN_BACK);
  392. }
  393. snprintf(priv->phys, sizeof(priv->phys), "%s/input1", psmouse->ps2dev.serio->phys);
  394. dev2->phys = priv->phys;
  395. dev2->name = (priv->i->flags & ALPS_DUALPOINT) ? "DualPoint Stick" : "PS/2 Mouse";
  396. dev2->id.bustype = BUS_I8042;
  397. dev2->id.vendor = 0x0002;
  398. dev2->id.product = PSMOUSE_ALPS;
  399. dev2->id.version = 0x0000;
  400. dev2->evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
  401. dev2->relbit[LONG(REL_X)] |= BIT(REL_X) | BIT(REL_Y);
  402. dev2->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
  403. if (input_register_device(priv->dev2))
  404. goto init_fail;
  405. psmouse->protocol_handler = alps_process_byte;
  406. psmouse->poll = alps_poll;
  407. psmouse->disconnect = alps_disconnect;
  408. psmouse->reconnect = alps_reconnect;
  409. psmouse->pktsize = 6;
  410. /* We are having trouble resyncing ALPS touchpads so disable it for now */
  411. psmouse->resync_time = 0;
  412. return 0;
  413. init_fail:
  414. psmouse_reset(psmouse);
  415. input_free_device(dev2);
  416. kfree(priv);
  417. psmouse->private = NULL;
  418. return -1;
  419. }
  420. int alps_detect(struct psmouse *psmouse, int set_properties)
  421. {
  422. int version;
  423. const struct alps_model_info *model;
  424. model = alps_get_model(psmouse, &version);
  425. if (!model)
  426. return -1;
  427. if (set_properties) {
  428. psmouse->vendor = "ALPS";
  429. psmouse->name = model->flags & ALPS_DUALPOINT ?
  430. "DualPoint TouchPad" : "GlidePoint";
  431. psmouse->model = version;
  432. }
  433. return 0;
  434. }