]> err.no Git - linux-2.6/blob - drivers/usb/serial/option.c
[PATCH] USB: isp116x-hcd: support only per-port power switching
[linux-2.6] / drivers / usb / serial / option.c
1 /*
2   Option Card (PCMCIA to) USB to Serial Driver
3
4   Copyright (C) 2005  Matthias Urlichs <smurf@smurf.noris.de>
5
6   This driver is free software; you can redistribute it and/or modify
7   it under the terms of Version 2 of the GNU General Public License as
8   published by the Free Software Foundation.
9
10   Portions copied from the Keyspan driver by Hugh Blemings <hugh@blemings.org>
11
12   History:
13
14   2005-05-19  v0.1   Initial version, based on incomplete docs
15                      and analysis of misbehavior with the standard driver
16   2005-05-20  v0.2   Extended the input buffer to avoid losing
17                      random 64-byte chunks of data
18   2005-05-21  v0.3   implemented chars_in_buffer()
19                      turned on low_latency
20                      simplified the code somewhat
21   2005-05-24  v0.4   option_write() sometimes deadlocked under heavy load
22                      removed some dead code
23                      added sponsor notice
24                      coding style clean-up
25   2005-06-20  v0.4.1 add missing braces :-/
26                      killed end-of-line whitespace
27   2005-07-15  v0.4.2 rename WLAN product to FUSION, add FUSION2
28
29   Work sponsored by: Sigos GmbH, Germany <info@sigos.de>
30
31 */
32
33 #define DRIVER_VERSION "v0.4"
34 #define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>"
35 #define DRIVER_DESC "Option Card (PC-Card to) USB to Serial Driver"
36
37 #include <linux/config.h>
38 #include <linux/kernel.h>
39 #include <linux/jiffies.h>
40 #include <linux/errno.h>
41 #include <linux/tty.h>
42 #include <linux/tty_flip.h>
43 #include <linux/module.h>
44 #include <linux/usb.h>
45 #include "usb-serial.h"
46
47 /* Function prototypes */
48 static int  option_open(struct usb_serial_port *port, struct file *filp);
49 static void option_close(struct usb_serial_port *port, struct file *filp);
50 static int  option_startup(struct usb_serial *serial);
51 static void option_shutdown(struct usb_serial *serial);
52 static void option_rx_throttle(struct usb_serial_port *port);
53 static void option_rx_unthrottle(struct usb_serial_port *port);
54 static int  option_write_room(struct usb_serial_port *port);
55
56 static void option_instat_callback(struct urb *urb, struct pt_regs *regs);
57
58 static int option_write(struct usb_serial_port *port,
59                         const unsigned char *buf, int count);
60
61 static int  option_chars_in_buffer(struct usb_serial_port *port);
62 static int  option_ioctl(struct usb_serial_port *port, struct file *file,
63                         unsigned int cmd, unsigned long arg);
64 static void option_set_termios(struct usb_serial_port *port,
65                                 struct termios *old);
66 static void option_break_ctl(struct usb_serial_port *port, int break_state);
67 static int  option_tiocmget(struct usb_serial_port *port, struct file *file);
68 static int  option_tiocmset(struct usb_serial_port *port, struct file *file,
69                                 unsigned int set, unsigned int clear);
70 static int  option_send_setup(struct usb_serial_port *port);
71
72 /* Vendor and product IDs */
73 #define OPTION_VENDOR_ID                        0x0AF0
74
75 #define OPTION_PRODUCT_OLD              0x5000
76 #define OPTION_PRODUCT_FUSION   0x6000
77 #define OPTION_PRODUCT_FUSION2  0x6300
78
79 static struct usb_device_id option_ids[] = {
80         { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_OLD) },
81         { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION) },
82         { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION2) },
83         { } /* Terminating entry */
84 };
85
86 MODULE_DEVICE_TABLE(usb, option_ids);
87
88 static struct usb_driver option_driver = {
89         .owner      = THIS_MODULE,
90         .name       = "option",
91         .probe      = usb_serial_probe,
92         .disconnect = usb_serial_disconnect,
93         .id_table   = option_ids,
94 };
95
96 /* The card has three separate interfaces, wich the serial driver
97  * recognizes separately, thus num_port=1.
98  */
99 static struct usb_serial_device_type option_3port_device = {
100         .owner             = THIS_MODULE,
101         .name              = "Option 3G data card",
102         .short_name        = "option",
103         .id_table          = option_ids,
104         .num_interrupt_in  = NUM_DONT_CARE,
105         .num_bulk_in       = NUM_DONT_CARE,
106         .num_bulk_out      = NUM_DONT_CARE,
107         .num_ports         = 1, /* 3, but the card reports its ports separately */
108         .open              = option_open,
109         .close             = option_close,
110         .write             = option_write,
111         .write_room        = option_write_room,
112         .chars_in_buffer   = option_chars_in_buffer,
113         .throttle          = option_rx_throttle,
114         .unthrottle        = option_rx_unthrottle,
115         .ioctl             = option_ioctl,
116         .set_termios       = option_set_termios,
117         .break_ctl         = option_break_ctl,
118         .tiocmget          = option_tiocmget,
119         .tiocmset          = option_tiocmset,
120         .attach            = option_startup,
121         .shutdown          = option_shutdown,
122         .read_int_callback = option_instat_callback,
123 };
124
125 #ifdef CONFIG_USB_DEBUG
126 static int debug;
127 #else
128 #define debug 0
129 #endif
130
131 /* per port private data */
132
133 #define N_IN_URB 4
134 #define N_OUT_URB 1
135 #define IN_BUFLEN 1024
136 #define OUT_BUFLEN 128
137
138 struct option_port_private {
139         /* Input endpoints and buffer for this port */
140         struct urb *in_urbs[N_IN_URB];
141         char in_buffer[N_IN_URB][IN_BUFLEN];
142         /* Output endpoints and buffer for this port */
143         struct urb *out_urbs[N_OUT_URB];
144         char out_buffer[N_OUT_URB][OUT_BUFLEN];
145
146         /* Settings for the port */
147         int rts_state;  /* Handshaking pins (outputs) */
148         int dtr_state;
149         int cts_state;  /* Handshaking pins (inputs) */
150         int dsr_state;
151         int dcd_state;
152         int ri_state;
153
154         unsigned long tx_start_time[N_OUT_URB];
155 };
156
157 /* Functions used by new usb-serial code. */
158 static int __init option_init(void)
159 {
160         int retval;
161         retval = usb_serial_register(&option_3port_device);
162         if (retval)
163                 goto failed_3port_device_register;
164         retval = usb_register(&option_driver);
165         if (retval)
166                 goto failed_driver_register;
167
168         info(DRIVER_DESC ": " DRIVER_VERSION);
169
170         return 0;
171
172 failed_driver_register:
173         usb_serial_deregister (&option_3port_device);
174 failed_3port_device_register:
175         return retval;
176 }
177
178 static void __exit option_exit(void)
179 {
180         usb_deregister (&option_driver);
181         usb_serial_deregister (&option_3port_device);
182 }
183
184 module_init(option_init);
185 module_exit(option_exit);
186
187 static void option_rx_throttle(struct usb_serial_port *port)
188 {
189         dbg("%s", __FUNCTION__);
190 }
191
192 static void option_rx_unthrottle(struct usb_serial_port *port)
193 {
194         dbg("%s", __FUNCTION__);
195 }
196
197 static void option_break_ctl(struct usb_serial_port *port, int break_state)
198 {
199         /* Unfortunately, I don't know how to send a break */
200         dbg("%s", __FUNCTION__);
201 }
202
203 static void option_set_termios(struct usb_serial_port *port,
204                         struct termios *old_termios)
205 {
206         dbg("%s", __FUNCTION__);
207
208         option_send_setup(port);
209 }
210
211 static int option_tiocmget(struct usb_serial_port *port, struct file *file)
212 {
213         unsigned int value;
214         struct option_port_private *portdata;
215
216         portdata = usb_get_serial_port_data(port);
217
218         value = ((portdata->rts_state) ? TIOCM_RTS : 0) |
219                 ((portdata->dtr_state) ? TIOCM_DTR : 0) |
220                 ((portdata->cts_state) ? TIOCM_CTS : 0) |
221                 ((portdata->dsr_state) ? TIOCM_DSR : 0) |
222                 ((portdata->dcd_state) ? TIOCM_CAR : 0) |
223                 ((portdata->ri_state) ? TIOCM_RNG : 0);
224
225         return value;
226 }
227
228 static int option_tiocmset(struct usb_serial_port *port, struct file *file,
229                         unsigned int set, unsigned int clear)
230 {
231         struct option_port_private *portdata;
232
233         portdata = usb_get_serial_port_data(port);
234
235         if (set & TIOCM_RTS)
236                 portdata->rts_state = 1;
237         if (set & TIOCM_DTR)
238                 portdata->dtr_state = 1;
239
240         if (clear & TIOCM_RTS)
241                 portdata->rts_state = 0;
242         if (clear & TIOCM_DTR)
243                 portdata->dtr_state = 0;
244         return option_send_setup(port);
245 }
246
247 static int option_ioctl(struct usb_serial_port *port, struct file *file,
248                         unsigned int cmd, unsigned long arg)
249 {
250         return -ENOIOCTLCMD;
251 }
252
253 /* Write */
254 static int option_write(struct usb_serial_port *port,
255                         const unsigned char *buf, int count)
256 {
257         struct option_port_private *portdata;
258         int i;
259         int left, todo;
260         struct urb *this_urb = NULL; /* spurious */
261         int err;
262
263         portdata = usb_get_serial_port_data(port);
264
265         dbg("%s: write (%d chars)", __FUNCTION__, count);
266
267         i = 0;
268         left = count;
269         for (i=0; left > 0 && i < N_OUT_URB; i++) {
270                 todo = left;
271                 if (todo > OUT_BUFLEN)
272                         todo = OUT_BUFLEN;
273
274                 this_urb = portdata->out_urbs[i];
275                 if (this_urb->status == -EINPROGRESS) {
276                         if (this_urb->transfer_flags & URB_ASYNC_UNLINK)
277                                 continue;
278                         if (time_before(jiffies,
279                                         portdata->tx_start_time[i] + 10 * HZ))
280                                 continue;
281                         this_urb->transfer_flags |= URB_ASYNC_UNLINK;
282                         usb_unlink_urb(this_urb);
283                         continue;
284                 }
285                 if (this_urb->status != 0)
286                         dbg("usb_write %p failed (err=%d)",
287                                 this_urb, this_urb->status);
288
289                 dbg("%s: endpoint %d buf %d", __FUNCTION__,
290                         usb_pipeendpoint(this_urb->pipe), i);
291
292                 /* send the data */
293                 memcpy (this_urb->transfer_buffer, buf, todo);
294                 this_urb->transfer_buffer_length = todo;
295
296                 this_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
297                 this_urb->dev = port->serial->dev;
298                 err = usb_submit_urb(this_urb, GFP_ATOMIC);
299                 if (err) {
300                         dbg("usb_submit_urb %p (write bulk) failed "
301                                 "(%d, has %d)", this_urb,
302                                 err, this_urb->status);
303                         continue;
304                 }
305                 portdata->tx_start_time[i] = jiffies;
306                 buf += todo;
307                 left -= todo;
308         }
309
310         count -= left;
311         dbg("%s: wrote (did %d)", __FUNCTION__, count);
312         return count;
313 }
314
315 static void option_indat_callback(struct urb *urb, struct pt_regs *regs)
316 {
317         int i, err;
318         int endpoint;
319         struct usb_serial_port *port;
320         struct tty_struct *tty;
321         unsigned char *data = urb->transfer_buffer;
322
323         dbg("%s: %p", __FUNCTION__, urb);
324
325         endpoint = usb_pipeendpoint(urb->pipe);
326         port = (struct usb_serial_port *) urb->context;
327
328         if (urb->status) {
329                 dbg("%s: nonzero status: %d on endpoint %02x.",
330                     __FUNCTION__, urb->status, endpoint);
331         } else {
332                 tty = port->tty;
333                 if (urb->actual_length) {
334                         for (i = 0; i < urb->actual_length ; ++i) {
335                                 if (tty->flip.count >= TTY_FLIPBUF_SIZE)
336                                         tty_flip_buffer_push(tty);
337                                 tty_insert_flip_char(tty, data[i], 0);
338                         }
339                         tty_flip_buffer_push(tty);
340                 } else {
341                         dbg("%s: empty read urb received", __FUNCTION__);
342                 }
343
344                 /* Resubmit urb so we continue receiving */
345                 if (port->open_count && urb->status != -ESHUTDOWN) {
346                         err = usb_submit_urb(urb, GFP_ATOMIC);
347                         if (err)
348                                 printk(KERN_ERR "%s: resubmit read urb failed. "
349                                         "(%d)", __FUNCTION__, err);
350                 }
351         }
352         return;
353 }
354
355 static void option_outdat_callback(struct urb *urb, struct pt_regs *regs)
356 {
357         struct usb_serial_port *port;
358
359         dbg("%s", __FUNCTION__);
360
361         port = (struct usb_serial_port *) urb->context;
362
363         if (port->open_count)
364                 schedule_work(&port->work);
365 }
366
367 static void option_instat_callback(struct urb *urb, struct pt_regs *regs)
368 {
369         int err;
370         struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
371         struct option_port_private *portdata = usb_get_serial_port_data(port);
372         struct usb_serial *serial = port->serial;
373
374         dbg("%s", __FUNCTION__);
375         dbg("%s: urb %p port %p has data %p", __FUNCTION__,urb,port,portdata);
376
377         if (urb->status == 0) {
378                 struct usb_ctrlrequest *req_pkt =
379                                 (struct usb_ctrlrequest *)urb->transfer_buffer;
380
381                 if (!req_pkt) {
382                         dbg("%s: NULL req_pkt\n", __FUNCTION__);
383                         return;
384                 }
385                 if ((req_pkt->bRequestType == 0xA1) &&
386                                 (req_pkt->bRequest == 0x20)) {
387                         int old_dcd_state;
388                         unsigned char signals = *((unsigned char *)
389                                         urb->transfer_buffer +
390                                         sizeof(struct usb_ctrlrequest));
391
392                         dbg("%s: signal x%x", __FUNCTION__, signals);
393
394                         old_dcd_state = portdata->dcd_state;
395                         portdata->cts_state = 1;
396                         portdata->dcd_state = ((signals & 0x01) ? 1 : 0);
397                         portdata->dsr_state = ((signals & 0x02) ? 1 : 0);
398                         portdata->ri_state = ((signals & 0x08) ? 1 : 0);
399
400                         if (port->tty && !C_CLOCAL(port->tty) &&
401                                         old_dcd_state && !portdata->dcd_state)
402                                 tty_hangup(port->tty);
403                 } else {
404                         dbg("%s: type %x req %x", __FUNCTION__,
405                                 req_pkt->bRequestType,req_pkt->bRequest);
406                 }
407         } else
408                 dbg("%s: error %d", __FUNCTION__, urb->status);
409
410         /* Resubmit urb so we continue receiving IRQ data */
411         if (urb->status != -ESHUTDOWN) {
412                 urb->dev = serial->dev;
413                 err = usb_submit_urb(urb, GFP_ATOMIC);
414                 if (err)
415                         dbg("%s: resubmit intr urb failed. (%d)",
416                                 __FUNCTION__, err);
417         }
418 }
419
420 static int option_write_room(struct usb_serial_port *port)
421 {
422         struct option_port_private *portdata;
423         int i;
424         int data_len = 0;
425         struct urb *this_urb;
426
427         portdata = usb_get_serial_port_data(port);
428
429         for (i=0; i < N_OUT_URB; i++) {
430                 this_urb = portdata->out_urbs[i];
431                 if (this_urb && this_urb->status != -EINPROGRESS)
432                         data_len += OUT_BUFLEN;
433         }
434
435         dbg("%s: %d", __FUNCTION__, data_len);
436         return data_len;
437 }
438
439 static int option_chars_in_buffer(struct usb_serial_port *port)
440 {
441         struct option_port_private *portdata;
442         int i;
443         int data_len = 0;
444         struct urb *this_urb;
445
446         portdata = usb_get_serial_port_data(port);
447
448         for (i=0; i < N_OUT_URB; i++) {
449                 this_urb = portdata->out_urbs[i];
450                 if (this_urb && this_urb->status == -EINPROGRESS)
451                         data_len += this_urb->transfer_buffer_length;
452         }
453         dbg("%s: %d", __FUNCTION__, data_len);
454         return data_len;
455 }
456
457 static int option_open(struct usb_serial_port *port, struct file *filp)
458 {
459         struct option_port_private *portdata;
460         struct usb_serial *serial = port->serial;
461         int i, err;
462         struct urb *urb;
463
464         portdata = usb_get_serial_port_data(port);
465
466         dbg("%s", __FUNCTION__);
467
468         /* Set some sane defaults */
469         portdata->rts_state = 1;
470         portdata->dtr_state = 1;
471
472         /* Reset low level data toggle and start reading from endpoints */
473         for (i = 0; i < N_IN_URB; i++) {
474                 urb = portdata->in_urbs[i];
475                 if (! urb)
476                         continue;
477                 if (urb->dev != serial->dev) {
478                         dbg("%s: dev %p != %p", __FUNCTION__,
479                                 urb->dev, serial->dev);
480                         continue;
481                 }
482
483                 /*
484                  * make sure endpoint data toggle is synchronized with the
485                  * device
486                  */
487                 usb_clear_halt(urb->dev, urb->pipe);
488
489                 err = usb_submit_urb(urb, GFP_KERNEL);
490                 if (err) {
491                         dbg("%s: submit urb %d failed (%d) %d",
492                                 __FUNCTION__, i, err,
493                                 urb->transfer_buffer_length);
494                 }
495         }
496
497         /* Reset low level data toggle on out endpoints */
498         for (i = 0; i < N_OUT_URB; i++) {
499                 urb = portdata->out_urbs[i];
500                 if (! urb)
501                         continue;
502                 urb->dev = serial->dev;
503                 /* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
504                                 usb_pipeout(urb->pipe), 0); */
505         }
506
507         port->tty->low_latency = 1;
508
509         option_send_setup(port);
510
511         return (0);
512 }
513
514 static inline void stop_urb(struct urb *urb)
515 {
516         if (urb && urb->status == -EINPROGRESS) {
517                 urb->transfer_flags &= ~URB_ASYNC_UNLINK;
518                 usb_kill_urb(urb);
519         }
520 }
521
522 static void option_close(struct usb_serial_port *port, struct file *filp)
523 {
524         int i;
525         struct usb_serial *serial = port->serial;
526         struct option_port_private *portdata;
527
528         dbg("%s", __FUNCTION__);
529         portdata = usb_get_serial_port_data(port);
530
531         portdata->rts_state = 0;
532         portdata->dtr_state = 0;
533
534         if (serial->dev) {
535                 option_send_setup(port);
536
537                 /* Stop reading/writing urbs */
538                 for (i = 0; i < N_IN_URB; i++)
539                         stop_urb(portdata->in_urbs[i]);
540                 for (i = 0; i < N_OUT_URB; i++)
541                         stop_urb(portdata->out_urbs[i]);
542         }
543         port->tty = NULL;
544 }
545
546 /* Helper functions used by option_setup_urbs */
547 static struct urb *option_setup_urb(struct usb_serial *serial, int endpoint,
548                 int dir, void *ctx, char *buf, int len,
549                 void (*callback)(struct urb *, struct pt_regs *regs))
550 {
551         struct urb *urb;
552
553         if (endpoint == -1)
554                 return NULL;            /* endpoint not needed */
555
556         urb = usb_alloc_urb(0, GFP_KERNEL);             /* No ISO */
557         if (urb == NULL) {
558                 dbg("%s: alloc for endpoint %d failed.", __FUNCTION__, endpoint);
559                 return NULL;
560         }
561
562                 /* Fill URB using supplied data. */
563         usb_fill_bulk_urb(urb, serial->dev,
564                       usb_sndbulkpipe(serial->dev, endpoint) | dir,
565                       buf, len, callback, ctx);
566
567         return urb;
568 }
569
570 /* Setup urbs */
571 static void option_setup_urbs(struct usb_serial *serial)
572 {
573         int j;
574         struct usb_serial_port *port;
575         struct option_port_private *portdata;
576
577         dbg("%s", __FUNCTION__);
578
579         port = serial->port[0];
580         portdata = usb_get_serial_port_data(port);
581
582         /* Do indat endpoints first */
583         for (j = 0; j <= N_IN_URB; ++j) {
584                 portdata->in_urbs[j] = option_setup_urb (serial,
585                   port->bulk_in_endpointAddress, USB_DIR_IN, port,
586                   portdata->in_buffer[j], IN_BUFLEN, option_indat_callback);
587         }
588
589         /* outdat endpoints */
590         for (j = 0; j <= N_OUT_URB; ++j) {
591                 portdata->out_urbs[j] = option_setup_urb (serial,
592                   port->bulk_out_endpointAddress, USB_DIR_OUT, port,
593                   portdata->out_buffer[j], OUT_BUFLEN, option_outdat_callback);
594         }
595 }
596
597 static int option_send_setup(struct usb_serial_port *port)
598 {
599         struct usb_serial *serial = port->serial;
600         struct option_port_private *portdata;
601
602         dbg("%s", __FUNCTION__);
603
604         portdata = usb_get_serial_port_data(port);
605
606         if (port->tty) {
607                 int val = 0;
608                 if (portdata->dtr_state)
609                         val |= 0x01;
610                 if (portdata->rts_state)
611                         val |= 0x02;
612
613                 return usb_control_msg(serial->dev,
614                                 usb_rcvctrlpipe(serial->dev, 0),
615                                 0x22,0x21,val,0,NULL,0,USB_CTRL_SET_TIMEOUT);
616         }
617
618         return 0;
619 }
620
621 static int option_startup(struct usb_serial *serial)
622 {
623         int i, err;
624         struct usb_serial_port *port;
625         struct option_port_private *portdata;
626
627         dbg("%s", __FUNCTION__);
628
629         /* Now setup per port private data */
630         for (i = 0; i < serial->num_ports; i++) {
631                 port = serial->port[i];
632                 portdata = kmalloc(sizeof(*portdata), GFP_KERNEL);
633                 if (!portdata) {
634                         dbg("%s: kmalloc for option_port_private (%d) failed!.",
635                                         __FUNCTION__, i);
636                         return (1);
637                 }
638                 memset(portdata, 0, sizeof(struct option_port_private));
639
640                 usb_set_serial_port_data(port, portdata);
641
642                 if (! port->interrupt_in_urb)
643                         continue;
644                 err = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
645                 if (err)
646                         dbg("%s: submit irq_in urb failed %d",
647                                 __FUNCTION__, err);
648         }
649
650         option_setup_urbs(serial);
651
652         return (0);
653 }
654
655 static void option_shutdown(struct usb_serial *serial)
656 {
657         int i, j;
658         struct usb_serial_port *port;
659         struct option_port_private *portdata;
660
661         dbg("%s", __FUNCTION__);
662
663         /* Stop reading/writing urbs */
664         for (i = 0; i < serial->num_ports; ++i) {
665                 port = serial->port[i];
666                 portdata = usb_get_serial_port_data(port);
667                 for (j = 0; j < N_IN_URB; j++)
668                         stop_urb(portdata->in_urbs[j]);
669                 for (j = 0; j < N_OUT_URB; j++)
670                         stop_urb(portdata->out_urbs[j]);
671         }
672
673         /* Now free them */
674         for (i = 0; i < serial->num_ports; ++i) {
675                 port = serial->port[i];
676                 portdata = usb_get_serial_port_data(port);
677
678                 for (j = 0; j < N_IN_URB; j++) {
679                         if (portdata->in_urbs[j]) {
680                                 usb_free_urb(portdata->in_urbs[j]);
681                                 portdata->in_urbs[j] = NULL;
682                         }
683                 }
684                 for (j = 0; j < N_OUT_URB; j++) {
685                         if (portdata->out_urbs[j]) {
686                                 usb_free_urb(portdata->out_urbs[j]);
687                                 portdata->out_urbs[j] = NULL;
688                         }
689                 }
690         }
691
692         /* Now free per port private data */
693         for (i = 0; i < serial->num_ports; i++) {
694                 port = serial->port[i];
695                 kfree(usb_get_serial_port_data(port));
696         }
697 }
698
699 MODULE_AUTHOR(DRIVER_AUTHOR);
700 MODULE_DESCRIPTION(DRIVER_DESC);
701 MODULE_VERSION(DRIVER_VERSION);
702 MODULE_LICENSE("GPL");
703
704 #ifdef CONFIG_USB_DEBUG
705 module_param(debug, bool, S_IRUGO | S_IWUSR);
706 MODULE_PARM_DESC(debug, "Debug messages");
707 #endif
708