2 * USB Keyspan PDA / Xircom / Entregra Converter driver
4 * Copyright (C) 1999 - 2001 Greg Kroah-Hartman <greg@kroah.com>
5 * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.com>
6 * Copyright (C) 2000 Al Borchers <borchers@steinerpoint.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * See Documentation/usb/usb-serial.txt for more information on using this
17 * cleaned up the Xircom support. Added ids for Entregra device which is
18 * the same as the Xircom device. Enabled the code to be compiled for
19 * either Xircom or Keyspan devices.
21 * (08/11/2001) Cristian M. Craciunescu
22 * support for Xircom PGSDB9
25 * switched from using spinlock to a semaphore, which fixes lots of
29 * Identify version on module load.
31 * (11/01/2000) Adam J. Richter
32 * usb_device_id table support
35 * Fixed bug with urb->dev not being set properly, now that the usb
39 * Added locks for SMP safeness.
40 * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more
43 * (07/20/2000) borchers
44 * - keyspan_pda_write no longer sleeps if it is called on interrupt time;
45 * PPP and the line discipline with stty echo on can call write on
46 * interrupt time and this would cause an oops if write slept
47 * - if keyspan_pda_write is in an interrupt, it will not call
48 * usb_control_msg (which sleeps) to query the room in the device
49 * buffer, it simply uses the current room value it has
50 * - if the urb is busy or if it is throttled keyspan_pda_write just
51 * returns 0, rather than sleeping to wait for this to change; the
52 * write_chan code in n_tty.c will sleep if needed before calling
53 * keyspan_pda_write again
54 * - if the device needs to be unthrottled, write now queues up the
55 * call to usb_control_msg (which sleeps) to unthrottle the device
56 * - the wakeups from keyspan_pda_write_bulk_callback are queued rather
57 * than done directly from the callback to avoid the race in write_chan
58 * - keyspan_pda_chars_in_buffer also indicates its buffer is full if the
59 * urb status is -EINPROGRESS, meaning it cannot write at the moment
62 * Added module_init and module_exit functions to handle the fact that this
63 * driver is a loadable module now.
66 * Split driver up into device specific pieces.
71 #include <linux/kernel.h>
72 #include <linux/errno.h>
73 #include <linux/init.h>
74 #include <linux/slab.h>
75 #include <linux/tty.h>
76 #include <linux/tty_driver.h>
77 #include <linux/tty_flip.h>
78 #include <linux/module.h>
79 #include <linux/spinlock.h>
80 #include <linux/workqueue.h>
81 #include <linux/firmware.h>
82 #include <linux/ihex.h>
83 #include <linux/uaccess.h>
84 #include <linux/usb.h>
85 #include <linux/usb/serial.h>
89 /* make a simple define to handle if we are compiling keyspan_pda or xircom support */
90 #if defined(CONFIG_USB_SERIAL_KEYSPAN_PDA) || defined(CONFIG_USB_SERIAL_KEYSPAN_PDA_MODULE)
95 #if defined(CONFIG_USB_SERIAL_XIRCOM) || defined(CONFIG_USB_SERIAL_XIRCOM_MODULE)
102 * Version Information
104 #define DRIVER_VERSION "v1.1"
105 #define DRIVER_AUTHOR "Brian Warner <warner@lothar.com>"
106 #define DRIVER_DESC "USB Keyspan PDA Converter driver"
108 struct keyspan_pda_private {
111 struct work_struct wakeup_work;
112 struct work_struct unthrottle_work;
113 struct usb_serial *serial;
114 struct usb_serial_port *port;
118 #define KEYSPAN_VENDOR_ID 0x06cd
119 #define KEYSPAN_PDA_FAKE_ID 0x0103
120 #define KEYSPAN_PDA_ID 0x0104 /* no clue */
122 /* For Xircom PGSDB9 and older Entregra version of the same device */
123 #define XIRCOM_VENDOR_ID 0x085a
124 #define XIRCOM_FAKE_ID 0x8027
125 #define ENTREGRA_VENDOR_ID 0x1645
126 #define ENTREGRA_FAKE_ID 0x8093
128 static struct usb_device_id id_table_combined [] = {
130 { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
133 { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) },
134 { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) },
136 { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
137 { } /* Terminating entry */
140 MODULE_DEVICE_TABLE(usb, id_table_combined);
142 static struct usb_driver keyspan_pda_driver = {
143 .name = "keyspan_pda",
144 .probe = usb_serial_probe,
145 .disconnect = usb_serial_disconnect,
146 .id_table = id_table_combined,
150 static struct usb_device_id id_table_std [] = {
151 { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
152 { } /* Terminating entry */
156 static struct usb_device_id id_table_fake [] = {
157 { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
158 { } /* Terminating entry */
163 static struct usb_device_id id_table_fake_xircom [] = {
164 { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) },
165 { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) },
170 static void keyspan_pda_wakeup_write(struct work_struct *work)
172 struct keyspan_pda_private *priv =
173 container_of(work, struct keyspan_pda_private, wakeup_work);
174 struct usb_serial_port *port = priv->port;
176 tty_wakeup(port->port.tty);
179 static void keyspan_pda_request_unthrottle(struct work_struct *work)
181 struct keyspan_pda_private *priv =
182 container_of(work, struct keyspan_pda_private, unthrottle_work);
183 struct usb_serial *serial = priv->serial;
186 dbg(" request_unthrottle");
187 /* ask the device to tell us when the tx buffer becomes
188 sufficiently empty */
189 result = usb_control_msg(serial->dev,
190 usb_sndctrlpipe(serial->dev, 0),
191 7, /* request_unthrottle */
192 USB_TYPE_VENDOR | USB_RECIP_INTERFACE
194 16, /* value: threshold */
200 dbg("%s - error %d from usb_control_msg",
205 static void keyspan_pda_rx_interrupt(struct urb *urb)
207 struct usb_serial_port *port = urb->context;
208 struct tty_struct *tty = port->port.tty;
209 unsigned char *data = urb->transfer_buffer;
212 int status = urb->status;
213 struct keyspan_pda_private *priv;
214 priv = usb_get_serial_port_data(port);
223 /* this urb is terminated, clean up */
224 dbg("%s - urb shutting down with status: %d",
228 dbg("%s - nonzero urb status received: %d",
233 /* see if the message is data or a status interrupt */
236 /* rest of message is rx data */
237 if (urb->actual_length) {
238 for (i = 1; i < urb->actual_length ; ++i)
239 tty_insert_flip_char(tty, data[i], 0);
240 tty_flip_buffer_push(tty);
244 /* status interrupt */
245 dbg(" rx int, d1=%d, d2=%d", data[1], data[2]);
247 case 1: /* modemline change */
249 case 2: /* tx unthrottle interrupt */
250 priv->tx_throttled = 0;
251 /* queue up a wakeup at scheduler time */
252 schedule_work(&priv->wakeup_work);
263 retval = usb_submit_urb(urb, GFP_ATOMIC);
265 err("%s - usb_submit_urb failed with result %d",
270 static void keyspan_pda_rx_throttle(struct tty_struct *tty)
272 /* stop receiving characters. We just turn off the URB request, and
273 let chars pile up in the device. If we're doing hardware
274 flowcontrol, the device will signal the other end when its buffer
275 fills up. If we're doing XON/XOFF, this would be a good time to
276 send an XOFF, although it might make sense to foist that off
277 upon the device too. */
278 struct usb_serial_port *port = tty->driver_data;
279 dbg("keyspan_pda_rx_throttle port %d", port->number);
280 usb_kill_urb(port->interrupt_in_urb);
284 static void keyspan_pda_rx_unthrottle(struct tty_struct *tty)
286 struct usb_serial_port *port = tty->driver_data;
287 /* just restart the receive interrupt URB */
288 dbg("keyspan_pda_rx_unthrottle port %d", port->number);
289 port->interrupt_in_urb->dev = port->serial->dev;
290 if (usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC))
291 dbg(" usb_submit_urb(read urb) failed");
296 static speed_t keyspan_pda_setbaud(struct usb_serial *serial, speed_t baud)
333 bindex = 5; /* Default to 9600 */
337 /* rather than figure out how to sleep while waiting for this
338 to complete, I just use the "legacy" API. */
339 rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
342 | USB_RECIP_INTERFACE
343 | USB_DIR_OUT, /* type */
355 static void keyspan_pda_break_ctl(struct tty_struct *tty, int break_state)
357 struct usb_serial_port *port = tty->driver_data;
358 struct usb_serial *serial = port->serial;
362 if (break_state == -1)
363 value = 1; /* start break */
365 value = 0; /* clear break */
366 result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
368 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
369 value, 0, NULL, 0, 2000);
371 dbg("%s - error %d from usb_control_msg",
373 /* there is something funky about this.. the TCSBRK that 'cu' performs
374 ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
375 seconds apart, but it feels like the break sent isn't as long as it
380 static void keyspan_pda_set_termios(struct tty_struct *tty,
381 struct usb_serial_port *port, struct ktermios *old_termios)
383 struct usb_serial *serial = port->serial;
386 /* cflag specifies lots of stuff: number of stop bits, parity, number
387 of data bits, baud. What can the device actually handle?:
388 CSTOPB (1 stop bit or 2)
391 There is minimal hw support for parity (a PSW bit seems to hold the
392 parity of whatever is in the accumulator). The UART either deals
393 with 10 bits (start, 8 data, stop) or 11 bits (start, 8 data,
394 1 special, stop). So, with firmware changes, we could do:
396 8N2: 11 bit, extra bit always (mark?)
397 8[EOMS]1: 11 bit, extra bit is parity
398 7[EOMS]1: 10 bit, b0/b7 is parity
399 7[EOMS]2: 11 bit, b0/b7 is parity, extra bit always (mark?)
401 HW flow control is dictated by the tty->termios->c_cflags & CRTSCTS
404 For now, just do baud. */
406 speed = tty_get_baud_rate(tty);
407 speed = keyspan_pda_setbaud(serial, speed);
410 dbg("can't handle requested baud rate");
411 /* It hasn't changed so.. */
412 speed = tty_termios_baud_rate(old_termios);
414 /* Only speed can change so copy the old h/w parameters
415 then encode the new speed */
416 tty_termios_copy_hw(tty->termios, old_termios);
417 tty_encode_baud_rate(tty, speed, speed);
421 /* modem control pins: DTR and RTS are outputs and can be controlled.
422 DCD, RI, DSR, CTS are inputs and can be read. All outputs can also be
423 read. The byte passed is: DTR(b7) DCD RI DSR CTS RTS(b2) unused unused */
425 static int keyspan_pda_get_modem_info(struct usb_serial *serial,
426 unsigned char *value)
430 rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
432 USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_IN,
433 0, 0, &data, 1, 2000);
440 static int keyspan_pda_set_modem_info(struct usb_serial *serial,
444 rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
446 USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_OUT,
447 value, 0, NULL, 0, 2000);
451 static int keyspan_pda_tiocmget(struct tty_struct *tty, struct file *file)
453 struct usb_serial_port *port = tty->driver_data;
454 struct usb_serial *serial = port->serial;
456 unsigned char status;
459 rc = keyspan_pda_get_modem_info(serial, &status);
463 ((status & (1<<7)) ? TIOCM_DTR : 0) |
464 ((status & (1<<6)) ? TIOCM_CAR : 0) |
465 ((status & (1<<5)) ? TIOCM_RNG : 0) |
466 ((status & (1<<4)) ? TIOCM_DSR : 0) |
467 ((status & (1<<3)) ? TIOCM_CTS : 0) |
468 ((status & (1<<2)) ? TIOCM_RTS : 0);
472 static int keyspan_pda_tiocmset(struct tty_struct *tty, struct file *file,
473 unsigned int set, unsigned int clear)
475 struct usb_serial_port *port = tty->driver_data;
476 struct usb_serial *serial = port->serial;
478 unsigned char status;
480 rc = keyspan_pda_get_modem_info(serial, &status);
489 if (clear & TIOCM_RTS)
491 if (clear & TIOCM_DTR)
493 rc = keyspan_pda_set_modem_info(serial, status);
497 static int keyspan_pda_write(struct tty_struct *tty,
498 struct usb_serial_port *port, const unsigned char *buf, int count)
500 struct usb_serial *serial = port->serial;
501 int request_unthrottle = 0;
503 struct keyspan_pda_private *priv;
505 priv = usb_get_serial_port_data(port);
506 /* guess how much room is left in the device's ring buffer, and if we
507 want to send more than that, check first, updating our notion of
508 what is left. If our write will result in no room left, ask the
509 device to give us an interrupt when the room available rises above
510 a threshold, and hold off all writers (eventually, those using
511 select() or poll() too) until we receive that unthrottle interrupt.
512 Block if we can't write anything at all, otherwise write as much as
514 dbg("keyspan_pda_write(%d)", count);
516 dbg(" write request of 0 bytes");
520 /* we might block because of:
521 the TX urb is in-flight (wait until it completes)
522 the device is full (wait until it says there is room)
524 spin_lock_bh(&port->lock);
525 if (port->write_urb_busy || priv->tx_throttled) {
526 spin_unlock_bh(&port->lock);
529 port->write_urb_busy = 1;
530 spin_unlock_bh(&port->lock);
532 /* At this point the URB is in our control, nobody else can submit it
533 again (the only sudden transition was the one from EINPROGRESS to
534 finished). Also, the tx process is not throttled. So we are
537 count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
539 /* Check if we might overrun the Tx buffer. If so, ask the
540 device how much room it really has. This is done only on
541 scheduler time, since usb_control_msg() sleeps. */
542 if (count > priv->tx_room && !in_interrupt()) {
544 rc = usb_control_msg(serial->dev,
545 usb_rcvctrlpipe(serial->dev, 0),
547 USB_TYPE_VENDOR | USB_RECIP_INTERFACE
549 0, /* value: 0 means "remaining room" */
555 dbg(" roomquery failed");
559 dbg(" roomquery returned 0 bytes");
560 rc = -EIO; /* device didn't return any data */
563 dbg(" roomquery says %d", room);
564 priv->tx_room = room;
566 if (count > priv->tx_room) {
567 /* we're about to completely fill the Tx buffer, so
568 we'll be throttled afterwards. */
569 count = priv->tx_room;
570 request_unthrottle = 1;
574 /* now transfer data */
575 memcpy(port->write_urb->transfer_buffer, buf, count);
576 /* send the data out the bulk port */
577 port->write_urb->transfer_buffer_length = count;
579 priv->tx_room -= count;
581 port->write_urb->dev = port->serial->dev;
582 rc = usb_submit_urb(port->write_urb, GFP_ATOMIC);
584 dbg(" usb_submit_urb(write bulk) failed");
588 /* There wasn't any room left, so we are throttled until
589 the buffer empties a bit */
590 request_unthrottle = 1;
593 if (request_unthrottle) {
594 priv->tx_throttled = 1; /* block writers */
595 schedule_work(&priv->unthrottle_work);
601 port->write_urb_busy = 0;
606 static void keyspan_pda_write_bulk_callback(struct urb *urb)
608 struct usb_serial_port *port = urb->context;
609 struct keyspan_pda_private *priv;
611 port->write_urb_busy = 0;
612 priv = usb_get_serial_port_data(port);
614 /* queue up a wakeup at scheduler time */
615 schedule_work(&priv->wakeup_work);
619 static int keyspan_pda_write_room(struct tty_struct *tty)
621 struct usb_serial_port *port = tty->driver_data;
622 struct keyspan_pda_private *priv;
623 priv = usb_get_serial_port_data(port);
624 /* used by n_tty.c for processing of tabs and such. Giving it our
625 conservative guess is probably good enough, but needs testing by
626 running a console through the device. */
627 return priv->tx_room;
631 static int keyspan_pda_chars_in_buffer(struct tty_struct *tty)
633 struct usb_serial_port *port = tty->driver_data;
634 struct keyspan_pda_private *priv;
638 priv = usb_get_serial_port_data(port);
640 /* when throttled, return at least WAKEUP_CHARS to tell select() (via
641 n_tty.c:normal_poll() ) that we're not writeable. */
643 spin_lock_irqsave(&port->lock, flags);
644 if (port->write_urb_busy || priv->tx_throttled)
646 spin_unlock_irqrestore(&port->lock, flags);
651 static int keyspan_pda_open(struct tty_struct *tty,
652 struct usb_serial_port *port, struct file *filp)
654 struct usb_serial *serial = port->serial;
657 struct keyspan_pda_private *priv;
659 /* find out how much room is in the Tx ring */
660 rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
662 USB_TYPE_VENDOR | USB_RECIP_INTERFACE
670 dbg("%s - roomquery failed", __func__);
674 dbg("%s - roomquery returned 0 bytes", __func__);
678 priv = usb_get_serial_port_data(port);
679 priv->tx_room = room;
680 priv->tx_throttled = room ? 0 : 1;
682 /* the normal serial device seems to always turn on DTR and RTS here,
684 if (tty && (tty->termios->c_cflag & CBAUD))
685 keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2));
687 keyspan_pda_set_modem_info(serial, 0);
689 /*Start reading from the device*/
690 port->interrupt_in_urb->dev = serial->dev;
691 rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
693 dbg("%s - usb_submit_urb(read int) failed", __func__);
702 static void keyspan_pda_close(struct tty_struct *tty,
703 struct usb_serial_port *port, struct file *filp)
705 struct usb_serial *serial = port->serial;
708 /* the normal serial device seems to always shut
709 off DTR and RTS now */
710 if (tty->termios->c_cflag & HUPCL)
711 keyspan_pda_set_modem_info(serial, 0);
713 /* shutdown our bulk reads and writes */
714 usb_kill_urb(port->write_urb);
715 usb_kill_urb(port->interrupt_in_urb);
720 /* download the firmware to a "fake" device (pre-renumeration) */
721 static int keyspan_pda_fake_startup(struct usb_serial *serial)
725 const struct ihex_binrec *record;
726 const struct firmware *fw;
728 /* download the firmware here ... */
729 response = ezusb_set_reset(serial, 1);
733 else if (le16_to_cpu(serial->dev->descriptor.idVendor) == KEYSPAN_VENDOR_ID)
734 fw_name = "keyspan_pda/keyspan_pda.fw";
737 else if ((le16_to_cpu(serial->dev->descriptor.idVendor) == XIRCOM_VENDOR_ID) ||
738 (le16_to_cpu(serial->dev->descriptor.idVendor) == ENTREGRA_VENDOR_ID))
739 fw_name = "keyspan_pda/xircom_pgs.fw";
742 err("%s: unknown vendor, aborting.", __func__);
745 if (request_ihex_firmware(&fw, fw_name, &serial->dev->dev)) {
746 err("failed to load firmware \"%s\"\n", fw_name);
749 record = (const struct ihex_binrec *)fw->data;
752 response = ezusb_writememory(serial, be32_to_cpu(record->addr),
753 (unsigned char *)record->data,
754 be16_to_cpu(record->len), 0xa0);
756 err("ezusb_writememory failed for Keyspan PDA "
757 "firmware (%d %04X %p %d)",
758 response, be32_to_cpu(record->addr),
759 record->data, be16_to_cpu(record->len));
762 record = ihex_next_binrec(record);
764 release_firmware(fw);
765 /* bring device out of reset. Renumeration will occur in a moment
766 and the new device will bind to the real driver */
767 response = ezusb_set_reset(serial, 0);
769 /* we want this device to fail to have a driver assigned to it. */
773 static int keyspan_pda_startup(struct usb_serial *serial)
776 struct keyspan_pda_private *priv;
778 /* allocate the private data structures for all ports. Well, for all
781 priv = kmalloc(sizeof(struct keyspan_pda_private), GFP_KERNEL);
783 return 1; /* error */
784 usb_set_serial_port_data(serial->port[0], priv);
785 init_waitqueue_head(&serial->port[0]->write_wait);
786 INIT_WORK(&priv->wakeup_work, keyspan_pda_wakeup_write);
787 INIT_WORK(&priv->unthrottle_work, keyspan_pda_request_unthrottle);
788 priv->serial = serial;
789 priv->port = serial->port[0];
793 static void keyspan_pda_shutdown(struct usb_serial *serial)
797 kfree(usb_get_serial_port_data(serial->port[0]));
801 static struct usb_serial_driver keyspan_pda_fake_device = {
803 .owner = THIS_MODULE,
804 .name = "keyspan_pda_pre",
806 .description = "Keyspan PDA - (prerenumeration)",
807 .usb_driver = &keyspan_pda_driver,
808 .id_table = id_table_fake,
810 .attach = keyspan_pda_fake_startup,
815 static struct usb_serial_driver xircom_pgs_fake_device = {
817 .owner = THIS_MODULE,
818 .name = "xircom_no_firm",
820 .description = "Xircom / Entregra PGS - (prerenumeration)",
821 .usb_driver = &keyspan_pda_driver,
822 .id_table = id_table_fake_xircom,
824 .attach = keyspan_pda_fake_startup,
828 static struct usb_serial_driver keyspan_pda_device = {
830 .owner = THIS_MODULE,
831 .name = "keyspan_pda",
833 .description = "Keyspan PDA",
834 .usb_driver = &keyspan_pda_driver,
835 .id_table = id_table_std,
837 .open = keyspan_pda_open,
838 .close = keyspan_pda_close,
839 .write = keyspan_pda_write,
840 .write_room = keyspan_pda_write_room,
841 .write_bulk_callback = keyspan_pda_write_bulk_callback,
842 .read_int_callback = keyspan_pda_rx_interrupt,
843 .chars_in_buffer = keyspan_pda_chars_in_buffer,
844 .throttle = keyspan_pda_rx_throttle,
845 .unthrottle = keyspan_pda_rx_unthrottle,
846 .set_termios = keyspan_pda_set_termios,
847 .break_ctl = keyspan_pda_break_ctl,
848 .tiocmget = keyspan_pda_tiocmget,
849 .tiocmset = keyspan_pda_tiocmset,
850 .attach = keyspan_pda_startup,
851 .shutdown = keyspan_pda_shutdown,
855 static int __init keyspan_pda_init(void)
858 retval = usb_serial_register(&keyspan_pda_device);
860 goto failed_pda_register;
862 retval = usb_serial_register(&keyspan_pda_fake_device);
864 goto failed_pda_fake_register;
867 retval = usb_serial_register(&xircom_pgs_fake_device);
869 goto failed_xircom_register;
871 retval = usb_register(&keyspan_pda_driver);
873 goto failed_usb_register;
874 info(DRIVER_DESC " " DRIVER_VERSION);
878 usb_serial_deregister(&xircom_pgs_fake_device);
879 failed_xircom_register:
882 usb_serial_deregister(&keyspan_pda_fake_device);
885 failed_pda_fake_register:
887 usb_serial_deregister(&keyspan_pda_device);
893 static void __exit keyspan_pda_exit(void)
895 usb_deregister(&keyspan_pda_driver);
896 usb_serial_deregister(&keyspan_pda_device);
898 usb_serial_deregister(&keyspan_pda_fake_device);
901 usb_serial_deregister(&xircom_pgs_fake_device);
906 module_init(keyspan_pda_init);
907 module_exit(keyspan_pda_exit);
909 MODULE_AUTHOR(DRIVER_AUTHOR);
910 MODULE_DESCRIPTION(DRIVER_DESC);
911 MODULE_LICENSE("GPL");
913 module_param(debug, bool, S_IRUGO | S_IWUSR);
914 MODULE_PARM_DESC(debug, "Debug enabled or not");