blob: ec1b8f2c11837fecd39468c1e053880d72da9f94 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * USB Compaq iPAQ driver
3 *
4 * Copyright (C) 2001 - 2002
5 * Ganesh Varadarajan <ganesh@veritas.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 */
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/kernel.h>
14#include <linux/errno.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#include <linux/slab.h>
16#include <linux/tty.h>
17#include <linux/tty_driver.h>
18#include <linux/tty_flip.h>
19#include <linux/module.h>
20#include <linux/spinlock.h>
Alan Coxeb6215c2008-07-22 11:12:41 +010021#include <linux/uaccess.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#include <linux/usb.h>
Greg Kroah-Hartmana9698882006-07-11 21:22:58 -070023#include <linux/usb/serial.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
25#define KP_RETRIES 100
26
Linus Torvalds1da177e2005-04-16 15:20:36 -070027#define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>"
28#define DRIVER_DESC "USB PocketPC PDA driver"
29
Frank Gevaertsb33488e2006-06-30 02:34:45 -070030static int connect_retries = KP_RETRIES;
31static int initial_wait;
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
33/* Function prototypes for an ipaq */
Alan Cox95da3102008-07-22 11:09:07 +010034static int ipaq_open(struct tty_struct *tty,
Alan Coxa509a7e2009-09-19 13:13:26 -070035 struct usb_serial_port *port);
Mark Ellis1b8fb412009-03-09 22:24:29 +000036static int ipaq_calc_num_ports(struct usb_serial *serial);
Alan Cox95da3102008-07-22 11:09:07 +010037static int ipaq_startup(struct usb_serial *serial);
Linus Torvalds1da177e2005-04-16 15:20:36 -070038
Johan Hovold5c6b98d2013-12-29 19:22:54 +010039static const struct usb_device_id ipaq_id_table[] = {
David Erikssoneb3c5ed2005-10-18 20:12:24 +020040 { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */
Linus Torvalds1da177e2005-04-16 15:20:36 -070041 { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */
42 { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */
43 { USB_DEVICE(0x03F0, 0x1216) }, /* HP USB Sync 1612 */
44 { USB_DEVICE(0x03F0, 0x2016) }, /* HP USB Sync 1620 */
45 { USB_DEVICE(0x03F0, 0x2116) }, /* HP USB Sync 1621 */
46 { USB_DEVICE(0x03F0, 0x2216) }, /* HP USB Sync 1622 */
47 { USB_DEVICE(0x03F0, 0x3016) }, /* HP USB Sync 1630 */
48 { USB_DEVICE(0x03F0, 0x3116) }, /* HP USB Sync 1631 */
49 { USB_DEVICE(0x03F0, 0x3216) }, /* HP USB Sync 1632 */
50 { USB_DEVICE(0x03F0, 0x4016) }, /* HP USB Sync 1640 */
51 { USB_DEVICE(0x03F0, 0x4116) }, /* HP USB Sync 1641 */
52 { USB_DEVICE(0x03F0, 0x4216) }, /* HP USB Sync 1642 */
53 { USB_DEVICE(0x03F0, 0x5016) }, /* HP USB Sync 1650 */
54 { USB_DEVICE(0x03F0, 0x5116) }, /* HP USB Sync 1651 */
55 { USB_DEVICE(0x03F0, 0x5216) }, /* HP USB Sync 1652 */
David Erikssoneb3c5ed2005-10-18 20:12:24 +020056 { USB_DEVICE(0x0409, 0x00D5) }, /* NEC USB Sync */
57 { USB_DEVICE(0x0409, 0x00D6) }, /* NEC USB Sync */
58 { USB_DEVICE(0x0409, 0x00D7) }, /* NEC USB Sync */
59 { USB_DEVICE(0x0409, 0x8024) }, /* NEC USB Sync */
60 { USB_DEVICE(0x0409, 0x8025) }, /* NEC USB Sync */
61 { USB_DEVICE(0x043E, 0x9C01) }, /* LGE USB Sync */
62 { USB_DEVICE(0x045E, 0x00CE) }, /* Microsoft USB Sync */
Linus Torvalds1da177e2005-04-16 15:20:36 -070063 { USB_DEVICE(0x045E, 0x0400) }, /* Windows Powered Pocket PC 2002 */
64 { USB_DEVICE(0x045E, 0x0401) }, /* Windows Powered Pocket PC 2002 */
65 { USB_DEVICE(0x045E, 0x0402) }, /* Windows Powered Pocket PC 2002 */
66 { USB_DEVICE(0x045E, 0x0403) }, /* Windows Powered Pocket PC 2002 */
67 { USB_DEVICE(0x045E, 0x0404) }, /* Windows Powered Pocket PC 2002 */
68 { USB_DEVICE(0x045E, 0x0405) }, /* Windows Powered Pocket PC 2002 */
69 { USB_DEVICE(0x045E, 0x0406) }, /* Windows Powered Pocket PC 2002 */
70 { USB_DEVICE(0x045E, 0x0407) }, /* Windows Powered Pocket PC 2002 */
71 { USB_DEVICE(0x045E, 0x0408) }, /* Windows Powered Pocket PC 2002 */
72 { USB_DEVICE(0x045E, 0x0409) }, /* Windows Powered Pocket PC 2002 */
73 { USB_DEVICE(0x045E, 0x040A) }, /* Windows Powered Pocket PC 2002 */
74 { USB_DEVICE(0x045E, 0x040B) }, /* Windows Powered Pocket PC 2002 */
75 { USB_DEVICE(0x045E, 0x040C) }, /* Windows Powered Pocket PC 2002 */
76 { USB_DEVICE(0x045E, 0x040D) }, /* Windows Powered Pocket PC 2002 */
77 { USB_DEVICE(0x045E, 0x040E) }, /* Windows Powered Pocket PC 2002 */
78 { USB_DEVICE(0x045E, 0x040F) }, /* Windows Powered Pocket PC 2002 */
79 { USB_DEVICE(0x045E, 0x0410) }, /* Windows Powered Pocket PC 2002 */
80 { USB_DEVICE(0x045E, 0x0411) }, /* Windows Powered Pocket PC 2002 */
81 { USB_DEVICE(0x045E, 0x0412) }, /* Windows Powered Pocket PC 2002 */
82 { USB_DEVICE(0x045E, 0x0413) }, /* Windows Powered Pocket PC 2002 */
83 { USB_DEVICE(0x045E, 0x0414) }, /* Windows Powered Pocket PC 2002 */
84 { USB_DEVICE(0x045E, 0x0415) }, /* Windows Powered Pocket PC 2002 */
85 { USB_DEVICE(0x045E, 0x0416) }, /* Windows Powered Pocket PC 2002 */
86 { USB_DEVICE(0x045E, 0x0417) }, /* Windows Powered Pocket PC 2002 */
87 { USB_DEVICE(0x045E, 0x0432) }, /* Windows Powered Pocket PC 2003 */
88 { USB_DEVICE(0x045E, 0x0433) }, /* Windows Powered Pocket PC 2003 */
89 { USB_DEVICE(0x045E, 0x0434) }, /* Windows Powered Pocket PC 2003 */
90 { USB_DEVICE(0x045E, 0x0435) }, /* Windows Powered Pocket PC 2003 */
91 { USB_DEVICE(0x045E, 0x0436) }, /* Windows Powered Pocket PC 2003 */
92 { USB_DEVICE(0x045E, 0x0437) }, /* Windows Powered Pocket PC 2003 */
93 { USB_DEVICE(0x045E, 0x0438) }, /* Windows Powered Pocket PC 2003 */
94 { USB_DEVICE(0x045E, 0x0439) }, /* Windows Powered Pocket PC 2003 */
95 { USB_DEVICE(0x045E, 0x043A) }, /* Windows Powered Pocket PC 2003 */
96 { USB_DEVICE(0x045E, 0x043B) }, /* Windows Powered Pocket PC 2003 */
97 { USB_DEVICE(0x045E, 0x043C) }, /* Windows Powered Pocket PC 2003 */
98 { USB_DEVICE(0x045E, 0x043D) }, /* Windows Powered Pocket PC 2003 */
99 { USB_DEVICE(0x045E, 0x043E) }, /* Windows Powered Pocket PC 2003 */
100 { USB_DEVICE(0x045E, 0x043F) }, /* Windows Powered Pocket PC 2003 */
101 { USB_DEVICE(0x045E, 0x0440) }, /* Windows Powered Pocket PC 2003 */
102 { USB_DEVICE(0x045E, 0x0441) }, /* Windows Powered Pocket PC 2003 */
103 { USB_DEVICE(0x045E, 0x0442) }, /* Windows Powered Pocket PC 2003 */
104 { USB_DEVICE(0x045E, 0x0443) }, /* Windows Powered Pocket PC 2003 */
105 { USB_DEVICE(0x045E, 0x0444) }, /* Windows Powered Pocket PC 2003 */
106 { USB_DEVICE(0x045E, 0x0445) }, /* Windows Powered Pocket PC 2003 */
107 { USB_DEVICE(0x045E, 0x0446) }, /* Windows Powered Pocket PC 2003 */
108 { USB_DEVICE(0x045E, 0x0447) }, /* Windows Powered Pocket PC 2003 */
109 { USB_DEVICE(0x045E, 0x0448) }, /* Windows Powered Pocket PC 2003 */
110 { USB_DEVICE(0x045E, 0x0449) }, /* Windows Powered Pocket PC 2003 */
111 { USB_DEVICE(0x045E, 0x044A) }, /* Windows Powered Pocket PC 2003 */
112 { USB_DEVICE(0x045E, 0x044B) }, /* Windows Powered Pocket PC 2003 */
113 { USB_DEVICE(0x045E, 0x044C) }, /* Windows Powered Pocket PC 2003 */
114 { USB_DEVICE(0x045E, 0x044D) }, /* Windows Powered Pocket PC 2003 */
115 { USB_DEVICE(0x045E, 0x044E) }, /* Windows Powered Pocket PC 2003 */
116 { USB_DEVICE(0x045E, 0x044F) }, /* Windows Powered Pocket PC 2003 */
117 { USB_DEVICE(0x045E, 0x0450) }, /* Windows Powered Pocket PC 2003 */
118 { USB_DEVICE(0x045E, 0x0451) }, /* Windows Powered Pocket PC 2003 */
119 { USB_DEVICE(0x045E, 0x0452) }, /* Windows Powered Pocket PC 2003 */
120 { USB_DEVICE(0x045E, 0x0453) }, /* Windows Powered Pocket PC 2003 */
121 { USB_DEVICE(0x045E, 0x0454) }, /* Windows Powered Pocket PC 2003 */
122 { USB_DEVICE(0x045E, 0x0455) }, /* Windows Powered Pocket PC 2003 */
123 { USB_DEVICE(0x045E, 0x0456) }, /* Windows Powered Pocket PC 2003 */
124 { USB_DEVICE(0x045E, 0x0457) }, /* Windows Powered Pocket PC 2003 */
125 { USB_DEVICE(0x045E, 0x0458) }, /* Windows Powered Pocket PC 2003 */
126 { USB_DEVICE(0x045E, 0x0459) }, /* Windows Powered Pocket PC 2003 */
127 { USB_DEVICE(0x045E, 0x045A) }, /* Windows Powered Pocket PC 2003 */
128 { USB_DEVICE(0x045E, 0x045B) }, /* Windows Powered Pocket PC 2003 */
129 { USB_DEVICE(0x045E, 0x045C) }, /* Windows Powered Pocket PC 2003 */
130 { USB_DEVICE(0x045E, 0x045D) }, /* Windows Powered Pocket PC 2003 */
131 { USB_DEVICE(0x045E, 0x045E) }, /* Windows Powered Pocket PC 2003 */
132 { USB_DEVICE(0x045E, 0x045F) }, /* Windows Powered Pocket PC 2003 */
133 { USB_DEVICE(0x045E, 0x0460) }, /* Windows Powered Pocket PC 2003 */
134 { USB_DEVICE(0x045E, 0x0461) }, /* Windows Powered Pocket PC 2003 */
135 { USB_DEVICE(0x045E, 0x0462) }, /* Windows Powered Pocket PC 2003 */
136 { USB_DEVICE(0x045E, 0x0463) }, /* Windows Powered Pocket PC 2003 */
137 { USB_DEVICE(0x045E, 0x0464) }, /* Windows Powered Pocket PC 2003 */
138 { USB_DEVICE(0x045E, 0x0465) }, /* Windows Powered Pocket PC 2003 */
139 { USB_DEVICE(0x045E, 0x0466) }, /* Windows Powered Pocket PC 2003 */
140 { USB_DEVICE(0x045E, 0x0467) }, /* Windows Powered Pocket PC 2003 */
141 { USB_DEVICE(0x045E, 0x0468) }, /* Windows Powered Pocket PC 2003 */
142 { USB_DEVICE(0x045E, 0x0469) }, /* Windows Powered Pocket PC 2003 */
143 { USB_DEVICE(0x045E, 0x046A) }, /* Windows Powered Pocket PC 2003 */
144 { USB_DEVICE(0x045E, 0x046B) }, /* Windows Powered Pocket PC 2003 */
145 { USB_DEVICE(0x045E, 0x046C) }, /* Windows Powered Pocket PC 2003 */
146 { USB_DEVICE(0x045E, 0x046D) }, /* Windows Powered Pocket PC 2003 */
147 { USB_DEVICE(0x045E, 0x046E) }, /* Windows Powered Pocket PC 2003 */
148 { USB_DEVICE(0x045E, 0x046F) }, /* Windows Powered Pocket PC 2003 */
149 { USB_DEVICE(0x045E, 0x0470) }, /* Windows Powered Pocket PC 2003 */
150 { USB_DEVICE(0x045E, 0x0471) }, /* Windows Powered Pocket PC 2003 */
151 { USB_DEVICE(0x045E, 0x0472) }, /* Windows Powered Pocket PC 2003 */
152 { USB_DEVICE(0x045E, 0x0473) }, /* Windows Powered Pocket PC 2003 */
153 { USB_DEVICE(0x045E, 0x0474) }, /* Windows Powered Pocket PC 2003 */
154 { USB_DEVICE(0x045E, 0x0475) }, /* Windows Powered Pocket PC 2003 */
155 { USB_DEVICE(0x045E, 0x0476) }, /* Windows Powered Pocket PC 2003 */
156 { USB_DEVICE(0x045E, 0x0477) }, /* Windows Powered Pocket PC 2003 */
157 { USB_DEVICE(0x045E, 0x0478) }, /* Windows Powered Pocket PC 2003 */
158 { USB_DEVICE(0x045E, 0x0479) }, /* Windows Powered Pocket PC 2003 */
159 { USB_DEVICE(0x045E, 0x047A) }, /* Windows Powered Pocket PC 2003 */
160 { USB_DEVICE(0x045E, 0x047B) }, /* Windows Powered Pocket PC 2003 */
161 { USB_DEVICE(0x045E, 0x04C8) }, /* Windows Powered Smartphone 2002 */
162 { USB_DEVICE(0x045E, 0x04C9) }, /* Windows Powered Smartphone 2002 */
163 { USB_DEVICE(0x045E, 0x04CA) }, /* Windows Powered Smartphone 2002 */
164 { USB_DEVICE(0x045E, 0x04CB) }, /* Windows Powered Smartphone 2002 */
165 { USB_DEVICE(0x045E, 0x04CC) }, /* Windows Powered Smartphone 2002 */
166 { USB_DEVICE(0x045E, 0x04CD) }, /* Windows Powered Smartphone 2002 */
167 { USB_DEVICE(0x045E, 0x04CE) }, /* Windows Powered Smartphone 2002 */
168 { USB_DEVICE(0x045E, 0x04D7) }, /* Windows Powered Smartphone 2003 */
169 { USB_DEVICE(0x045E, 0x04D8) }, /* Windows Powered Smartphone 2003 */
170 { USB_DEVICE(0x045E, 0x04D9) }, /* Windows Powered Smartphone 2003 */
171 { USB_DEVICE(0x045E, 0x04DA) }, /* Windows Powered Smartphone 2003 */
172 { USB_DEVICE(0x045E, 0x04DB) }, /* Windows Powered Smartphone 2003 */
173 { USB_DEVICE(0x045E, 0x04DC) }, /* Windows Powered Smartphone 2003 */
174 { USB_DEVICE(0x045E, 0x04DD) }, /* Windows Powered Smartphone 2003 */
175 { USB_DEVICE(0x045E, 0x04DE) }, /* Windows Powered Smartphone 2003 */
176 { USB_DEVICE(0x045E, 0x04DF) }, /* Windows Powered Smartphone 2003 */
177 { USB_DEVICE(0x045E, 0x04E0) }, /* Windows Powered Smartphone 2003 */
178 { USB_DEVICE(0x045E, 0x04E1) }, /* Windows Powered Smartphone 2003 */
179 { USB_DEVICE(0x045E, 0x04E2) }, /* Windows Powered Smartphone 2003 */
180 { USB_DEVICE(0x045E, 0x04E3) }, /* Windows Powered Smartphone 2003 */
181 { USB_DEVICE(0x045E, 0x04E4) }, /* Windows Powered Smartphone 2003 */
182 { USB_DEVICE(0x045E, 0x04E5) }, /* Windows Powered Smartphone 2003 */
183 { USB_DEVICE(0x045E, 0x04E6) }, /* Windows Powered Smartphone 2003 */
184 { USB_DEVICE(0x045E, 0x04E7) }, /* Windows Powered Smartphone 2003 */
185 { USB_DEVICE(0x045E, 0x04E8) }, /* Windows Powered Smartphone 2003 */
186 { USB_DEVICE(0x045E, 0x04E9) }, /* Windows Powered Smartphone 2003 */
187 { USB_DEVICE(0x045E, 0x04EA) }, /* Windows Powered Smartphone 2003 */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200188 { USB_DEVICE(0x049F, 0x0003) }, /* Compaq iPAQ USB Sync */
189 { USB_DEVICE(0x049F, 0x0032) }, /* Compaq iPAQ USB Sync */
190 { USB_DEVICE(0x04A4, 0x0014) }, /* Hitachi USB Sync */
191 { USB_DEVICE(0x04AD, 0x0301) }, /* USB Sync 0301 */
192 { USB_DEVICE(0x04AD, 0x0302) }, /* USB Sync 0302 */
193 { USB_DEVICE(0x04AD, 0x0303) }, /* USB Sync 0303 */
Andre Spahlinger62d909c2007-03-05 19:09:35 +0100194 { USB_DEVICE(0x04AD, 0x0306) }, /* GPS Pocket PC USB Sync */
195 { USB_DEVICE(0x04B7, 0x0531) }, /* MyGuide 7000 XL USB Sync */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200196 { USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */
197 { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */
198 { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */
Norihiko Tomiyamaaec0d502006-07-13 09:43:02 +0900199 { USB_DEVICE(0x04DD, 0x9102) }, /* SHARP WS003SH USB Modem */
Norihiko Tomiyama922fdaa2006-08-08 14:31:25 +0900200 { USB_DEVICE(0x04DD, 0x9121) }, /* SHARP WS004SH USB Modem */
201 { USB_DEVICE(0x04DD, 0x9123) }, /* SHARP WS007SH USB Modem */
Norihiko Tomiyamac51e9742007-04-05 10:05:40 +0900202 { USB_DEVICE(0x04DD, 0x9151) }, /* SHARP S01SH USB Modem */
Nobuhiro Iwamatsueecfb912007-10-11 00:37:50 +0900203 { USB_DEVICE(0x04DD, 0x91AC) }, /* SHARP WS011SH USB Modem */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200204 { USB_DEVICE(0x04E8, 0x5F00) }, /* Samsung NEXiO USB Sync */
205 { USB_DEVICE(0x04E8, 0x5F01) }, /* Samsung NEXiO USB Sync */
206 { USB_DEVICE(0x04E8, 0x5F02) }, /* Samsung NEXiO USB Sync */
207 { USB_DEVICE(0x04E8, 0x5F03) }, /* Samsung NEXiO USB Sync */
208 { USB_DEVICE(0x04E8, 0x5F04) }, /* Samsung NEXiO USB Sync */
209 { USB_DEVICE(0x04E8, 0x6611) }, /* Samsung MITs USB Sync */
210 { USB_DEVICE(0x04E8, 0x6613) }, /* Samsung MITs USB Sync */
211 { USB_DEVICE(0x04E8, 0x6615) }, /* Samsung MITs USB Sync */
212 { USB_DEVICE(0x04E8, 0x6617) }, /* Samsung MITs USB Sync */
213 { USB_DEVICE(0x04E8, 0x6619) }, /* Samsung MITs USB Sync */
214 { USB_DEVICE(0x04E8, 0x661B) }, /* Samsung MITs USB Sync */
215 { USB_DEVICE(0x04E8, 0x662E) }, /* Samsung MITs USB Sync */
216 { USB_DEVICE(0x04E8, 0x6630) }, /* Samsung MITs USB Sync */
217 { USB_DEVICE(0x04E8, 0x6632) }, /* Samsung MITs USB Sync */
218 { USB_DEVICE(0x04f1, 0x3011) }, /* JVC USB Sync */
219 { USB_DEVICE(0x04F1, 0x3012) }, /* JVC USB Sync */
220 { USB_DEVICE(0x0502, 0x1631) }, /* c10 Series */
221 { USB_DEVICE(0x0502, 0x1632) }, /* c20 Series */
222 { USB_DEVICE(0x0502, 0x16E1) }, /* Acer n10 Handheld USB Sync */
223 { USB_DEVICE(0x0502, 0x16E2) }, /* Acer n20 Handheld USB Sync */
224 { USB_DEVICE(0x0502, 0x16E3) }, /* Acer n30 Handheld USB Sync */
225 { USB_DEVICE(0x0536, 0x01A0) }, /* HHP PDT */
226 { USB_DEVICE(0x0543, 0x0ED9) }, /* ViewSonic Color Pocket PC V35 */
227 { USB_DEVICE(0x0543, 0x1527) }, /* ViewSonic Color Pocket PC V36 */
228 { USB_DEVICE(0x0543, 0x1529) }, /* ViewSonic Color Pocket PC V37 */
229 { USB_DEVICE(0x0543, 0x152B) }, /* ViewSonic Color Pocket PC V38 */
230 { USB_DEVICE(0x0543, 0x152E) }, /* ViewSonic Pocket PC */
231 { USB_DEVICE(0x0543, 0x1921) }, /* ViewSonic Communicator Pocket PC */
232 { USB_DEVICE(0x0543, 0x1922) }, /* ViewSonic Smartphone */
233 { USB_DEVICE(0x0543, 0x1923) }, /* ViewSonic Pocket PC V30 */
234 { USB_DEVICE(0x05E0, 0x2000) }, /* Symbol USB Sync */
235 { USB_DEVICE(0x05E0, 0x2001) }, /* Symbol USB Sync 0x2001 */
236 { USB_DEVICE(0x05E0, 0x2002) }, /* Symbol USB Sync 0x2002 */
237 { USB_DEVICE(0x05E0, 0x2003) }, /* Symbol USB Sync 0x2003 */
238 { USB_DEVICE(0x05E0, 0x2004) }, /* Symbol USB Sync 0x2004 */
239 { USB_DEVICE(0x05E0, 0x2005) }, /* Symbol USB Sync 0x2005 */
240 { USB_DEVICE(0x05E0, 0x2006) }, /* Symbol USB Sync 0x2006 */
241 { USB_DEVICE(0x05E0, 0x2007) }, /* Symbol USB Sync 0x2007 */
242 { USB_DEVICE(0x05E0, 0x2008) }, /* Symbol USB Sync 0x2008 */
243 { USB_DEVICE(0x05E0, 0x2009) }, /* Symbol USB Sync 0x2009 */
244 { USB_DEVICE(0x05E0, 0x200A) }, /* Symbol USB Sync 0x200A */
245 { USB_DEVICE(0x067E, 0x1001) }, /* Intermec Mobile Computer */
246 { USB_DEVICE(0x07CF, 0x2001) }, /* CASIO USB Sync 2001 */
247 { USB_DEVICE(0x07CF, 0x2002) }, /* CASIO USB Sync 2002 */
248 { USB_DEVICE(0x07CF, 0x2003) }, /* CASIO USB Sync 2003 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700249 { USB_DEVICE(0x0930, 0x0700) }, /* TOSHIBA USB Sync 0700 */
250 { USB_DEVICE(0x0930, 0x0705) }, /* TOSHIBA Pocket PC e310 */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200251 { USB_DEVICE(0x0930, 0x0706) }, /* TOSHIBA Pocket PC e740 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252 { USB_DEVICE(0x0930, 0x0707) }, /* TOSHIBA Pocket PC e330 Series */
Jan Engelhardt96de0e22007-10-19 23:21:04 +0200253 { USB_DEVICE(0x0930, 0x0708) }, /* TOSHIBA Pocket PC e350 Series */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700254 { USB_DEVICE(0x0930, 0x0709) }, /* TOSHIBA Pocket PC e750 Series */
255 { USB_DEVICE(0x0930, 0x070A) }, /* TOSHIBA Pocket PC e400 Series */
256 { USB_DEVICE(0x0930, 0x070B) }, /* TOSHIBA Pocket PC e800 Series */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200257 { USB_DEVICE(0x094B, 0x0001) }, /* Linkup Systems USB Sync */
258 { USB_DEVICE(0x0960, 0x0065) }, /* BCOM USB Sync 0065 */
259 { USB_DEVICE(0x0960, 0x0066) }, /* BCOM USB Sync 0066 */
260 { USB_DEVICE(0x0960, 0x0067) }, /* BCOM USB Sync 0067 */
261 { USB_DEVICE(0x0961, 0x0010) }, /* Portatec USB Sync */
262 { USB_DEVICE(0x099E, 0x0052) }, /* Trimble GeoExplorer */
263 { USB_DEVICE(0x099E, 0x4000) }, /* TDS Data Collector */
264 { USB_DEVICE(0x0B05, 0x4200) }, /* ASUS USB Sync */
265 { USB_DEVICE(0x0B05, 0x4201) }, /* ASUS USB Sync */
266 { USB_DEVICE(0x0B05, 0x4202) }, /* ASUS USB Sync */
267 { USB_DEVICE(0x0B05, 0x420F) }, /* ASUS USB Sync */
268 { USB_DEVICE(0x0B05, 0x9200) }, /* ASUS USB Sync */
269 { USB_DEVICE(0x0B05, 0x9202) }, /* ASUS USB Sync */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700270 { USB_DEVICE(0x0BB4, 0x00CE) }, /* HTC USB Sync */
Alex Sanks00299082006-10-29 16:38:31 -0800271 { USB_DEVICE(0x0BB4, 0x00CF) }, /* HTC USB Modem */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272 { USB_DEVICE(0x0BB4, 0x0A01) }, /* PocketPC USB Sync */
273 { USB_DEVICE(0x0BB4, 0x0A02) }, /* PocketPC USB Sync */
274 { USB_DEVICE(0x0BB4, 0x0A03) }, /* PocketPC USB Sync */
275 { USB_DEVICE(0x0BB4, 0x0A04) }, /* PocketPC USB Sync */
276 { USB_DEVICE(0x0BB4, 0x0A05) }, /* PocketPC USB Sync */
277 { USB_DEVICE(0x0BB4, 0x0A06) }, /* PocketPC USB Sync */
278 { USB_DEVICE(0x0BB4, 0x0A07) }, /* PocketPC USB Sync */
279 { USB_DEVICE(0x0BB4, 0x0A08) }, /* PocketPC USB Sync */
280 { USB_DEVICE(0x0BB4, 0x0A09) }, /* PocketPC USB Sync */
281 { USB_DEVICE(0x0BB4, 0x0A0A) }, /* PocketPC USB Sync */
282 { USB_DEVICE(0x0BB4, 0x0A0B) }, /* PocketPC USB Sync */
283 { USB_DEVICE(0x0BB4, 0x0A0C) }, /* PocketPC USB Sync */
284 { USB_DEVICE(0x0BB4, 0x0A0D) }, /* PocketPC USB Sync */
285 { USB_DEVICE(0x0BB4, 0x0A0E) }, /* PocketPC USB Sync */
286 { USB_DEVICE(0x0BB4, 0x0A0F) }, /* PocketPC USB Sync */
287 { USB_DEVICE(0x0BB4, 0x0A10) }, /* PocketPC USB Sync */
288 { USB_DEVICE(0x0BB4, 0x0A11) }, /* PocketPC USB Sync */
289 { USB_DEVICE(0x0BB4, 0x0A12) }, /* PocketPC USB Sync */
290 { USB_DEVICE(0x0BB4, 0x0A13) }, /* PocketPC USB Sync */
291 { USB_DEVICE(0x0BB4, 0x0A14) }, /* PocketPC USB Sync */
292 { USB_DEVICE(0x0BB4, 0x0A15) }, /* PocketPC USB Sync */
293 { USB_DEVICE(0x0BB4, 0x0A16) }, /* PocketPC USB Sync */
294 { USB_DEVICE(0x0BB4, 0x0A17) }, /* PocketPC USB Sync */
295 { USB_DEVICE(0x0BB4, 0x0A18) }, /* PocketPC USB Sync */
296 { USB_DEVICE(0x0BB4, 0x0A19) }, /* PocketPC USB Sync */
297 { USB_DEVICE(0x0BB4, 0x0A1A) }, /* PocketPC USB Sync */
298 { USB_DEVICE(0x0BB4, 0x0A1B) }, /* PocketPC USB Sync */
299 { USB_DEVICE(0x0BB4, 0x0A1C) }, /* PocketPC USB Sync */
300 { USB_DEVICE(0x0BB4, 0x0A1D) }, /* PocketPC USB Sync */
301 { USB_DEVICE(0x0BB4, 0x0A1E) }, /* PocketPC USB Sync */
302 { USB_DEVICE(0x0BB4, 0x0A1F) }, /* PocketPC USB Sync */
303 { USB_DEVICE(0x0BB4, 0x0A20) }, /* PocketPC USB Sync */
304 { USB_DEVICE(0x0BB4, 0x0A21) }, /* PocketPC USB Sync */
305 { USB_DEVICE(0x0BB4, 0x0A22) }, /* PocketPC USB Sync */
306 { USB_DEVICE(0x0BB4, 0x0A23) }, /* PocketPC USB Sync */
307 { USB_DEVICE(0x0BB4, 0x0A24) }, /* PocketPC USB Sync */
308 { USB_DEVICE(0x0BB4, 0x0A25) }, /* PocketPC USB Sync */
309 { USB_DEVICE(0x0BB4, 0x0A26) }, /* PocketPC USB Sync */
310 { USB_DEVICE(0x0BB4, 0x0A27) }, /* PocketPC USB Sync */
311 { USB_DEVICE(0x0BB4, 0x0A28) }, /* PocketPC USB Sync */
312 { USB_DEVICE(0x0BB4, 0x0A29) }, /* PocketPC USB Sync */
313 { USB_DEVICE(0x0BB4, 0x0A2A) }, /* PocketPC USB Sync */
314 { USB_DEVICE(0x0BB4, 0x0A2B) }, /* PocketPC USB Sync */
315 { USB_DEVICE(0x0BB4, 0x0A2C) }, /* PocketPC USB Sync */
316 { USB_DEVICE(0x0BB4, 0x0A2D) }, /* PocketPC USB Sync */
317 { USB_DEVICE(0x0BB4, 0x0A2E) }, /* PocketPC USB Sync */
318 { USB_DEVICE(0x0BB4, 0x0A2F) }, /* PocketPC USB Sync */
319 { USB_DEVICE(0x0BB4, 0x0A30) }, /* PocketPC USB Sync */
320 { USB_DEVICE(0x0BB4, 0x0A31) }, /* PocketPC USB Sync */
321 { USB_DEVICE(0x0BB4, 0x0A32) }, /* PocketPC USB Sync */
322 { USB_DEVICE(0x0BB4, 0x0A33) }, /* PocketPC USB Sync */
323 { USB_DEVICE(0x0BB4, 0x0A34) }, /* PocketPC USB Sync */
324 { USB_DEVICE(0x0BB4, 0x0A35) }, /* PocketPC USB Sync */
325 { USB_DEVICE(0x0BB4, 0x0A36) }, /* PocketPC USB Sync */
326 { USB_DEVICE(0x0BB4, 0x0A37) }, /* PocketPC USB Sync */
327 { USB_DEVICE(0x0BB4, 0x0A38) }, /* PocketPC USB Sync */
328 { USB_DEVICE(0x0BB4, 0x0A39) }, /* PocketPC USB Sync */
329 { USB_DEVICE(0x0BB4, 0x0A3A) }, /* PocketPC USB Sync */
330 { USB_DEVICE(0x0BB4, 0x0A3B) }, /* PocketPC USB Sync */
331 { USB_DEVICE(0x0BB4, 0x0A3C) }, /* PocketPC USB Sync */
332 { USB_DEVICE(0x0BB4, 0x0A3D) }, /* PocketPC USB Sync */
333 { USB_DEVICE(0x0BB4, 0x0A3E) }, /* PocketPC USB Sync */
334 { USB_DEVICE(0x0BB4, 0x0A3F) }, /* PocketPC USB Sync */
335 { USB_DEVICE(0x0BB4, 0x0A40) }, /* PocketPC USB Sync */
336 { USB_DEVICE(0x0BB4, 0x0A41) }, /* PocketPC USB Sync */
337 { USB_DEVICE(0x0BB4, 0x0A42) }, /* PocketPC USB Sync */
338 { USB_DEVICE(0x0BB4, 0x0A43) }, /* PocketPC USB Sync */
339 { USB_DEVICE(0x0BB4, 0x0A44) }, /* PocketPC USB Sync */
340 { USB_DEVICE(0x0BB4, 0x0A45) }, /* PocketPC USB Sync */
341 { USB_DEVICE(0x0BB4, 0x0A46) }, /* PocketPC USB Sync */
342 { USB_DEVICE(0x0BB4, 0x0A47) }, /* PocketPC USB Sync */
343 { USB_DEVICE(0x0BB4, 0x0A48) }, /* PocketPC USB Sync */
344 { USB_DEVICE(0x0BB4, 0x0A49) }, /* PocketPC USB Sync */
345 { USB_DEVICE(0x0BB4, 0x0A4A) }, /* PocketPC USB Sync */
346 { USB_DEVICE(0x0BB4, 0x0A4B) }, /* PocketPC USB Sync */
347 { USB_DEVICE(0x0BB4, 0x0A4C) }, /* PocketPC USB Sync */
348 { USB_DEVICE(0x0BB4, 0x0A4D) }, /* PocketPC USB Sync */
349 { USB_DEVICE(0x0BB4, 0x0A4E) }, /* PocketPC USB Sync */
350 { USB_DEVICE(0x0BB4, 0x0A4F) }, /* PocketPC USB Sync */
351 { USB_DEVICE(0x0BB4, 0x0A50) }, /* HTC SmartPhone USB Sync */
352 { USB_DEVICE(0x0BB4, 0x0A51) }, /* SmartPhone USB Sync */
353 { USB_DEVICE(0x0BB4, 0x0A52) }, /* SmartPhone USB Sync */
354 { USB_DEVICE(0x0BB4, 0x0A53) }, /* SmartPhone USB Sync */
355 { USB_DEVICE(0x0BB4, 0x0A54) }, /* SmartPhone USB Sync */
356 { USB_DEVICE(0x0BB4, 0x0A55) }, /* SmartPhone USB Sync */
357 { USB_DEVICE(0x0BB4, 0x0A56) }, /* SmartPhone USB Sync */
358 { USB_DEVICE(0x0BB4, 0x0A57) }, /* SmartPhone USB Sync */
359 { USB_DEVICE(0x0BB4, 0x0A58) }, /* SmartPhone USB Sync */
360 { USB_DEVICE(0x0BB4, 0x0A59) }, /* SmartPhone USB Sync */
361 { USB_DEVICE(0x0BB4, 0x0A5A) }, /* SmartPhone USB Sync */
362 { USB_DEVICE(0x0BB4, 0x0A5B) }, /* SmartPhone USB Sync */
363 { USB_DEVICE(0x0BB4, 0x0A5C) }, /* SmartPhone USB Sync */
364 { USB_DEVICE(0x0BB4, 0x0A5D) }, /* SmartPhone USB Sync */
365 { USB_DEVICE(0x0BB4, 0x0A5E) }, /* SmartPhone USB Sync */
366 { USB_DEVICE(0x0BB4, 0x0A5F) }, /* SmartPhone USB Sync */
367 { USB_DEVICE(0x0BB4, 0x0A60) }, /* SmartPhone USB Sync */
368 { USB_DEVICE(0x0BB4, 0x0A61) }, /* SmartPhone USB Sync */
369 { USB_DEVICE(0x0BB4, 0x0A62) }, /* SmartPhone USB Sync */
370 { USB_DEVICE(0x0BB4, 0x0A63) }, /* SmartPhone USB Sync */
371 { USB_DEVICE(0x0BB4, 0x0A64) }, /* SmartPhone USB Sync */
372 { USB_DEVICE(0x0BB4, 0x0A65) }, /* SmartPhone USB Sync */
373 { USB_DEVICE(0x0BB4, 0x0A66) }, /* SmartPhone USB Sync */
374 { USB_DEVICE(0x0BB4, 0x0A67) }, /* SmartPhone USB Sync */
375 { USB_DEVICE(0x0BB4, 0x0A68) }, /* SmartPhone USB Sync */
376 { USB_DEVICE(0x0BB4, 0x0A69) }, /* SmartPhone USB Sync */
377 { USB_DEVICE(0x0BB4, 0x0A6A) }, /* SmartPhone USB Sync */
378 { USB_DEVICE(0x0BB4, 0x0A6B) }, /* SmartPhone USB Sync */
379 { USB_DEVICE(0x0BB4, 0x0A6C) }, /* SmartPhone USB Sync */
380 { USB_DEVICE(0x0BB4, 0x0A6D) }, /* SmartPhone USB Sync */
381 { USB_DEVICE(0x0BB4, 0x0A6E) }, /* SmartPhone USB Sync */
382 { USB_DEVICE(0x0BB4, 0x0A6F) }, /* SmartPhone USB Sync */
383 { USB_DEVICE(0x0BB4, 0x0A70) }, /* SmartPhone USB Sync */
384 { USB_DEVICE(0x0BB4, 0x0A71) }, /* SmartPhone USB Sync */
385 { USB_DEVICE(0x0BB4, 0x0A72) }, /* SmartPhone USB Sync */
386 { USB_DEVICE(0x0BB4, 0x0A73) }, /* SmartPhone USB Sync */
387 { USB_DEVICE(0x0BB4, 0x0A74) }, /* SmartPhone USB Sync */
388 { USB_DEVICE(0x0BB4, 0x0A75) }, /* SmartPhone USB Sync */
389 { USB_DEVICE(0x0BB4, 0x0A76) }, /* SmartPhone USB Sync */
390 { USB_DEVICE(0x0BB4, 0x0A77) }, /* SmartPhone USB Sync */
391 { USB_DEVICE(0x0BB4, 0x0A78) }, /* SmartPhone USB Sync */
392 { USB_DEVICE(0x0BB4, 0x0A79) }, /* SmartPhone USB Sync */
393 { USB_DEVICE(0x0BB4, 0x0A7A) }, /* SmartPhone USB Sync */
394 { USB_DEVICE(0x0BB4, 0x0A7B) }, /* SmartPhone USB Sync */
395 { USB_DEVICE(0x0BB4, 0x0A7C) }, /* SmartPhone USB Sync */
396 { USB_DEVICE(0x0BB4, 0x0A7D) }, /* SmartPhone USB Sync */
397 { USB_DEVICE(0x0BB4, 0x0A7E) }, /* SmartPhone USB Sync */
398 { USB_DEVICE(0x0BB4, 0x0A7F) }, /* SmartPhone USB Sync */
399 { USB_DEVICE(0x0BB4, 0x0A80) }, /* SmartPhone USB Sync */
400 { USB_DEVICE(0x0BB4, 0x0A81) }, /* SmartPhone USB Sync */
401 { USB_DEVICE(0x0BB4, 0x0A82) }, /* SmartPhone USB Sync */
402 { USB_DEVICE(0x0BB4, 0x0A83) }, /* SmartPhone USB Sync */
403 { USB_DEVICE(0x0BB4, 0x0A84) }, /* SmartPhone USB Sync */
404 { USB_DEVICE(0x0BB4, 0x0A85) }, /* SmartPhone USB Sync */
405 { USB_DEVICE(0x0BB4, 0x0A86) }, /* SmartPhone USB Sync */
406 { USB_DEVICE(0x0BB4, 0x0A87) }, /* SmartPhone USB Sync */
407 { USB_DEVICE(0x0BB4, 0x0A88) }, /* SmartPhone USB Sync */
408 { USB_DEVICE(0x0BB4, 0x0A89) }, /* SmartPhone USB Sync */
409 { USB_DEVICE(0x0BB4, 0x0A8A) }, /* SmartPhone USB Sync */
410 { USB_DEVICE(0x0BB4, 0x0A8B) }, /* SmartPhone USB Sync */
411 { USB_DEVICE(0x0BB4, 0x0A8C) }, /* SmartPhone USB Sync */
412 { USB_DEVICE(0x0BB4, 0x0A8D) }, /* SmartPhone USB Sync */
413 { USB_DEVICE(0x0BB4, 0x0A8E) }, /* SmartPhone USB Sync */
414 { USB_DEVICE(0x0BB4, 0x0A8F) }, /* SmartPhone USB Sync */
415 { USB_DEVICE(0x0BB4, 0x0A90) }, /* SmartPhone USB Sync */
416 { USB_DEVICE(0x0BB4, 0x0A91) }, /* SmartPhone USB Sync */
417 { USB_DEVICE(0x0BB4, 0x0A92) }, /* SmartPhone USB Sync */
418 { USB_DEVICE(0x0BB4, 0x0A93) }, /* SmartPhone USB Sync */
419 { USB_DEVICE(0x0BB4, 0x0A94) }, /* SmartPhone USB Sync */
420 { USB_DEVICE(0x0BB4, 0x0A95) }, /* SmartPhone USB Sync */
421 { USB_DEVICE(0x0BB4, 0x0A96) }, /* SmartPhone USB Sync */
422 { USB_DEVICE(0x0BB4, 0x0A97) }, /* SmartPhone USB Sync */
423 { USB_DEVICE(0x0BB4, 0x0A98) }, /* SmartPhone USB Sync */
424 { USB_DEVICE(0x0BB4, 0x0A99) }, /* SmartPhone USB Sync */
425 { USB_DEVICE(0x0BB4, 0x0A9A) }, /* SmartPhone USB Sync */
426 { USB_DEVICE(0x0BB4, 0x0A9B) }, /* SmartPhone USB Sync */
427 { USB_DEVICE(0x0BB4, 0x0A9C) }, /* SmartPhone USB Sync */
428 { USB_DEVICE(0x0BB4, 0x0A9D) }, /* SmartPhone USB Sync */
429 { USB_DEVICE(0x0BB4, 0x0A9E) }, /* SmartPhone USB Sync */
430 { USB_DEVICE(0x0BB4, 0x0A9F) }, /* SmartPhone USB Sync */
Matthias Urlichs1b495f72006-09-24 21:38:47 +0200431 { USB_DEVICE(0x0BB4, 0x0BCE) }, /* "High Tech Computer Corp" */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700432 { USB_DEVICE(0x0BF8, 0x1001) }, /* Fujitsu Siemens Computers USB Sync */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433 { USB_DEVICE(0x0C44, 0x03A2) }, /* Motorola iDEN Smartphone */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200434 { USB_DEVICE(0x0C8E, 0x6000) }, /* Cesscom Luxian Series */
Jan Engelhardt96de0e22007-10-19 23:21:04 +0200435 { USB_DEVICE(0x0CAD, 0x9001) }, /* Motorola PowerPad Pocket PC Device */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200436 { USB_DEVICE(0x0F4E, 0x0200) }, /* Freedom Scientific USB Sync */
437 { USB_DEVICE(0x0F98, 0x0201) }, /* Cyberbank USB Sync */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700438 { USB_DEVICE(0x0FB8, 0x3001) }, /* Wistron USB Sync */
439 { USB_DEVICE(0x0FB8, 0x3002) }, /* Wistron USB Sync */
440 { USB_DEVICE(0x0FB8, 0x3003) }, /* Wistron USB Sync */
441 { USB_DEVICE(0x0FB8, 0x4001) }, /* Wistron USB Sync */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200442 { USB_DEVICE(0x1066, 0x00CE) }, /* E-TEN USB Sync */
443 { USB_DEVICE(0x1066, 0x0300) }, /* E-TEN P3XX Pocket PC */
444 { USB_DEVICE(0x1066, 0x0500) }, /* E-TEN P5XX Pocket PC */
445 { USB_DEVICE(0x1066, 0x0600) }, /* E-TEN P6XX Pocket PC */
446 { USB_DEVICE(0x1066, 0x0700) }, /* E-TEN P7XX Pocket PC */
447 { USB_DEVICE(0x1114, 0x0001) }, /* Psion Teklogix Sync 753x */
448 { USB_DEVICE(0x1114, 0x0004) }, /* Psion Teklogix Sync netBookPro */
449 { USB_DEVICE(0x1114, 0x0006) }, /* Psion Teklogix Sync 7525 */
450 { USB_DEVICE(0x1182, 0x1388) }, /* VES USB Sync */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700451 { USB_DEVICE(0x11D9, 0x1002) }, /* Rugged Pocket PC 2003 */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200452 { USB_DEVICE(0x11D9, 0x1003) }, /* Rugged Pocket PC 2003 */
453 { USB_DEVICE(0x1231, 0xCE01) }, /* USB Sync 03 */
454 { USB_DEVICE(0x1231, 0xCE02) }, /* USB Sync 03 */
455 { USB_DEVICE(0x1690, 0x0601) }, /* Askey USB Sync */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456 { USB_DEVICE(0x22B8, 0x4204) }, /* Motorola MPx200 Smartphone */
457 { USB_DEVICE(0x22B8, 0x4214) }, /* Motorola MPc GSM */
458 { USB_DEVICE(0x22B8, 0x4224) }, /* Motorola MPx220 Smartphone */
459 { USB_DEVICE(0x22B8, 0x4234) }, /* Motorola MPc CDMA */
460 { USB_DEVICE(0x22B8, 0x4244) }, /* Motorola MPx100 Smartphone */
David Erikssoneb3c5ed2005-10-18 20:12:24 +0200461 { USB_DEVICE(0x3340, 0x011C) }, /* Mio DigiWalker PPC StrongARM */
462 { USB_DEVICE(0x3340, 0x0326) }, /* Mio DigiWalker 338 */
463 { USB_DEVICE(0x3340, 0x0426) }, /* Mio DigiWalker 338 */
464 { USB_DEVICE(0x3340, 0x043A) }, /* Mio DigiWalker USB Sync */
465 { USB_DEVICE(0x3340, 0x051C) }, /* MiTAC USB Sync 528 */
466 { USB_DEVICE(0x3340, 0x053A) }, /* Mio DigiWalker SmartPhone USB Sync */
467 { USB_DEVICE(0x3340, 0x071C) }, /* MiTAC USB Sync */
468 { USB_DEVICE(0x3340, 0x0B1C) }, /* Generic PPC StrongARM */
469 { USB_DEVICE(0x3340, 0x0E3A) }, /* Generic PPC USB Sync */
470 { USB_DEVICE(0x3340, 0x0F1C) }, /* Itautec USB Sync */
471 { USB_DEVICE(0x3340, 0x0F3A) }, /* Generic SmartPhone USB Sync */
472 { USB_DEVICE(0x3340, 0x1326) }, /* Itautec USB Sync */
473 { USB_DEVICE(0x3340, 0x191C) }, /* YAKUMO USB Sync */
474 { USB_DEVICE(0x3340, 0x2326) }, /* Vobis USB Sync */
475 { USB_DEVICE(0x3340, 0x3326) }, /* MEDION Winodws Moble USB Sync */
476 { USB_DEVICE(0x3708, 0x20CE) }, /* Legend USB Sync */
477 { USB_DEVICE(0x3708, 0x21CE) }, /* Lenovo USB Sync */
478 { USB_DEVICE(0x4113, 0x0210) }, /* Mobile Media Technology USB Sync */
479 { USB_DEVICE(0x4113, 0x0211) }, /* Mobile Media Technology USB Sync */
480 { USB_DEVICE(0x4113, 0x0400) }, /* Mobile Media Technology USB Sync */
481 { USB_DEVICE(0x4113, 0x0410) }, /* Mobile Media Technology USB Sync */
482 { USB_DEVICE(0x413C, 0x4001) }, /* Dell Axim USB Sync */
483 { USB_DEVICE(0x413C, 0x4002) }, /* Dell Axim USB Sync */
484 { USB_DEVICE(0x413C, 0x4003) }, /* Dell Axim USB Sync */
485 { USB_DEVICE(0x413C, 0x4004) }, /* Dell Axim USB Sync */
486 { USB_DEVICE(0x413C, 0x4005) }, /* Dell Axim USB Sync */
487 { USB_DEVICE(0x413C, 0x4006) }, /* Dell Axim USB Sync */
488 { USB_DEVICE(0x413C, 0x4007) }, /* Dell Axim USB Sync */
489 { USB_DEVICE(0x413C, 0x4008) }, /* Dell Axim USB Sync */
490 { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */
491 { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */
492 { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700493 { } /* Terminating entry */
494};
495
Alan Coxeb6215c2008-07-22 11:12:41 +0100496MODULE_DEVICE_TABLE(usb, ipaq_id_table);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700497
Linus Torvalds1da177e2005-04-16 15:20:36 -0700498
499/* All of the device info needed for the Compaq iPAQ */
Greg Kroah-Hartmanea653702005-06-20 21:15:16 -0700500static struct usb_serial_driver ipaq_device = {
Greg Kroah-Hartman18fcac32005-06-20 21:15:16 -0700501 .driver = {
502 .owner = THIS_MODULE,
Greg Kroah-Hartman269bda12005-06-20 21:15:16 -0700503 .name = "ipaq",
Greg Kroah-Hartman18fcac32005-06-20 21:15:16 -0700504 },
Greg Kroah-Hartman269bda12005-06-20 21:15:16 -0700505 .description = "PocketPC PDA",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700506 .id_table = ipaq_id_table,
Johan Hovold6b6962f2010-05-15 17:53:46 +0200507 .bulk_in_size = 256,
508 .bulk_out_size = 256,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700509 .open = ipaq_open,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700510 .attach = ipaq_startup,
Mark Ellis1b8fb412009-03-09 22:24:29 +0000511 .calc_num_ports = ipaq_calc_num_ports,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700512};
513
Alan Stern7dbe2462012-02-23 14:56:57 -0500514static struct usb_serial_driver * const serial_drivers[] = {
515 &ipaq_device, NULL
516};
517
Alan Cox95da3102008-07-22 11:09:07 +0100518static int ipaq_open(struct tty_struct *tty,
Alan Coxa509a7e2009-09-19 13:13:26 -0700519 struct usb_serial_port *port)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700520{
521 struct usb_serial *serial = port->serial;
Johan Hovold6b6962f2010-05-15 17:53:46 +0200522 int result = 0;
Frank Gevaertsb33488e2006-06-30 02:34:45 -0700523 int retries = connect_retries;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700524
Frank Gevaertsb33488e2006-06-30 02:34:45 -0700525 msleep(1000*initial_wait);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700526
527 /*
528 * Send out control message observed in win98 sniffs. Not sure what
529 * it does, but from empirical observations, it seems that the device
530 * will start the chat sequence once one of these messages gets
531 * through. Since this has a reasonably high failure rate, we retry
532 * several times.
533 */
Dan Carpenterabdc9a32015-12-16 14:06:37 +0300534 while (retries) {
535 retries--;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700536 result = usb_control_msg(serial->dev,
537 usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
538 0x1, 0, NULL, 0, 100);
Luiz Fernando N. Capitulino014aa2a2006-07-27 10:30:43 -0300539 if (!result)
540 break;
541
Frank Gevaertsb33488e2006-06-30 02:34:45 -0700542 msleep(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700543 }
Luiz Fernando N. Capitulino014aa2a2006-07-27 10:30:43 -0300544 if (!retries && result) {
Johan Hovold6b6962f2010-05-15 17:53:46 +0200545 dev_err(&port->dev, "%s - failed doing control urb, error %d\n",
546 __func__, result);
547 return result;
Luiz Fernando N. Capitulino014aa2a2006-07-27 10:30:43 -0300548 }
549
Johan Hovold6b6962f2010-05-15 17:53:46 +0200550 return usb_serial_generic_open(tty, port);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551}
552
Mark Ellis1b8fb412009-03-09 22:24:29 +0000553static int ipaq_calc_num_ports(struct usb_serial *serial)
554{
555 /*
556 * some devices have 3 endpoints, the 3rd of which
557 * must be ignored as it would make the core
558 * create a second port which oopses when used
559 */
560 int ipaq_num_ports = 1;
561
Greg Kroah-Hartmanf73e1ff2012-05-15 16:27:20 -0700562 dev_dbg(&serial->dev->dev, "%s - numberofendpoints: %d\n", __func__,
Mark Ellis1b8fb412009-03-09 22:24:29 +0000563 (int)serial->interface->cur_altsetting->desc.bNumEndpoints);
564
565 /*
566 * a few devices have 4 endpoints, seemingly Yakuma devices,
567 * and we need the second pair, so let them have 2 ports
568 *
569 * TODO: can we drop port 1 ?
570 */
571 if (serial->interface->cur_altsetting->desc.bNumEndpoints > 3) {
572 ipaq_num_ports = 2;
573 }
574
575 return ipaq_num_ports;
576}
577
578
Linus Torvalds1da177e2005-04-16 15:20:36 -0700579static int ipaq_startup(struct usb_serial *serial)
580{
Alan Stern06bad892009-10-05 15:53:58 -0400581 /* Some of the devices in ipaq_id_table[] are composite, and we
582 * shouldn't bind to all the interfaces. This test will rule out
583 * some obviously invalid possibilities.
584 */
585 if (serial->num_bulk_in < serial->num_ports ||
586 serial->num_bulk_out < serial->num_ports)
587 return -ENODEV;
588
Linus Torvalds1da177e2005-04-16 15:20:36 -0700589 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
Mark Ellis1b8fb412009-03-09 22:24:29 +0000590 /*
591 * FIXME: HP iPaq rx3715, possibly others, have 1 config that
592 * is labeled as 2
593 */
594
Greg Kroah-Hartman194343d2008-08-20 16:56:34 -0700595 dev_err(&serial->dev->dev, "active config #%d != 1 ??\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700596 serial->dev->actconfig->desc.bConfigurationValue);
597 return -ENODEV;
598 }
Mark Ellis1b8fb412009-03-09 22:24:29 +0000599
Greg Kroah-Hartmanf73e1ff2012-05-15 16:27:20 -0700600 dev_dbg(&serial->dev->dev,
601 "%s - iPAQ module configured for %d ports\n", __func__,
602 serial->num_ports);
Mark Ellis1b8fb412009-03-09 22:24:29 +0000603
Alan Coxeb6215c2008-07-22 11:12:41 +0100604 return usb_reset_configuration(serial->dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700605}
606
Greg Kroah-Hartman68e24112012-05-08 15:46:14 -0700607module_usb_serial_driver(serial_drivers, ipaq_id_table);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700608
Alan Coxeb6215c2008-07-22 11:12:41 +0100609MODULE_AUTHOR(DRIVER_AUTHOR);
610MODULE_DESCRIPTION(DRIVER_DESC);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700611MODULE_LICENSE("GPL");
612
Frank Gevaertsb33488e2006-06-30 02:34:45 -0700613module_param(connect_retries, int, S_IRUGO|S_IWUSR);
Alan Coxeb6215c2008-07-22 11:12:41 +0100614MODULE_PARM_DESC(connect_retries,
615 "Maximum number of connect retries (one second each)");
Frank Gevaertsb33488e2006-06-30 02:34:45 -0700616
617module_param(initial_wait, int, S_IRUGO|S_IWUSR);
Alan Coxeb6215c2008-07-22 11:12:41 +0100618MODULE_PARM_DESC(initial_wait,
619 "Time to wait before attempting a connection (in seconds)");