aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/iuu_phoenix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/iuu_phoenix.c')
-rw-r--r--drivers/usb/serial/iuu_phoenix.c47
1 files changed, 1 insertions, 46 deletions
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index f2192d527db..22b1eb5040b 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -51,13 +51,6 @@ static const struct usb_device_id id_table[] = {
51}; 51};
52MODULE_DEVICE_TABLE(usb, id_table); 52MODULE_DEVICE_TABLE(usb, id_table);
53 53
54static struct usb_driver iuu_driver = {
55 .name = "iuu_phoenix",
56 .probe = usb_serial_probe,
57 .disconnect = usb_serial_disconnect,
58 .id_table = id_table,
59};
60
61/* turbo parameter */ 54/* turbo parameter */
62static int boost = 100; 55static int boost = 100;
63static int clockmode = 1; 56static int clockmode = 1;
@@ -135,8 +128,6 @@ static void iuu_release(struct usb_serial *serial)
135 if (!port) 128 if (!port)
136 return; 129 return;
137 130
138 dbg("%s", __func__);
139
140 if (priv) { 131 if (priv) {
141 iuu_free_buf(priv); 132 iuu_free_buf(priv);
142 dbg("%s - I will free all", __func__); 133 dbg("%s - I will free all", __func__);
@@ -198,8 +189,6 @@ static void iuu_rxcmd(struct urb *urb)
198 int result; 189 int result;
199 int status = urb->status; 190 int status = urb->status;
200 191
201 dbg("%s - enter", __func__);
202
203 if (status) { 192 if (status) {
204 dbg("%s - status = %d", __func__, status); 193 dbg("%s - status = %d", __func__, status);
205 /* error stop all */ 194 /* error stop all */
@@ -221,7 +210,6 @@ static int iuu_reset(struct usb_serial_port *port, u8 wt)
221 struct iuu_private *priv = usb_get_serial_port_data(port); 210 struct iuu_private *priv = usb_get_serial_port_data(port);
222 int result; 211 int result;
223 char *buf_ptr = port->write_urb->transfer_buffer; 212 char *buf_ptr = port->write_urb->transfer_buffer;
224 dbg("%s - enter", __func__);
225 213
226 /* Prepare the reset sequence */ 214 /* Prepare the reset sequence */
227 215
@@ -255,8 +243,6 @@ static void iuu_update_status_callback(struct urb *urb)
255 u8 *st; 243 u8 *st;
256 int status = urb->status; 244 int status = urb->status;
257 245
258 dbg("%s - enter", __func__);
259
260 if (status) { 246 if (status) {
261 dbg("%s - status = %d", __func__, status); 247 dbg("%s - status = %d", __func__, status);
262 /* error stop all */ 248 /* error stop all */
@@ -299,8 +285,6 @@ static int iuu_status(struct usb_serial_port *port)
299{ 285{
300 int result; 286 int result;
301 287
302 dbg("%s - enter", __func__);
303
304 memset(port->write_urb->transfer_buffer, IUU_GET_STATE_REGISTER, 1); 288 memset(port->write_urb->transfer_buffer, IUU_GET_STATE_REGISTER, 1);
305 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 289 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
306 usb_sndbulkpipe(port->serial->dev, 290 usb_sndbulkpipe(port->serial->dev,
@@ -318,8 +302,6 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
318 struct usb_serial *serial = port->serial; 302 struct usb_serial *serial = port->serial;
319 int actual = 0; 303 int actual = 0;
320 304
321 dbg("%s - enter", __func__);
322
323 /* send the data out the bulk port */ 305 /* send the data out the bulk port */
324 306
325 status = 307 status =
@@ -341,10 +323,7 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
341 struct usb_serial *serial = port->serial; 323 struct usb_serial *serial = port->serial;
342 int actual = 0; 324 int actual = 0;
343 325
344 dbg("%s - enter", __func__);
345
346 /* send the data out the bulk port */ 326 /* send the data out the bulk port */
347
348 status = 327 status =
349 usb_bulk_msg(serial->dev, 328 usb_bulk_msg(serial->dev,
350 usb_rcvbulkpipe(serial->dev, 329 usb_rcvbulkpipe(serial->dev,
@@ -367,8 +346,6 @@ static int iuu_led(struct usb_serial_port *port, unsigned int R,
367 if (!buf) 346 if (!buf)
368 return -ENOMEM; 347 return -ENOMEM;
369 348
370 dbg("%s - enter", __func__);
371
372 buf[0] = IUU_SET_LED; 349 buf[0] = IUU_SET_LED;
373 buf[1] = R & 0xFF; 350 buf[1] = R & 0xFF;
374 buf[2] = (R >> 8) & 0xFF; 351 buf[2] = (R >> 8) & 0xFF;
@@ -460,8 +437,6 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
460 unsigned int P2 = 0; 437 unsigned int P2 = 0;
461 int frq = (int)dwFrq; 438 int frq = (int)dwFrq;
462 439
463 dbg("%s - enter", __func__);
464
465 if (frq == 0) { 440 if (frq == 0) {
466 priv->buf[Count++] = IUU_UART_WRITE_I2C; 441 priv->buf[Count++] = IUU_UART_WRITE_I2C;
467 priv->buf[Count++] = FrqGenAdr << 1; 442 priv->buf[Count++] = FrqGenAdr << 1;
@@ -590,8 +565,6 @@ static int iuu_uart_flush(struct usb_serial_port *port)
590 u8 rxcmd = IUU_UART_RX; 565 u8 rxcmd = IUU_UART_RX;
591 struct iuu_private *priv = usb_get_serial_port_data(port); 566 struct iuu_private *priv = usb_get_serial_port_data(port);
592 567
593 dbg("%s - enter", __func__);
594
595 if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0) 568 if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0)
596 return -EIO; 569 return -EIO;
597 570
@@ -630,8 +603,6 @@ static void read_buf_callback(struct urb *urb)
630 struct tty_struct *tty; 603 struct tty_struct *tty;
631 int status = urb->status; 604 int status = urb->status;
632 605
633 dbg("%s - status = %d", __func__, status);
634
635 if (status) { 606 if (status) {
636 if (status == -EPROTO) { 607 if (status == -EPROTO) {
637 /* reschedule needed */ 608 /* reschedule needed */
@@ -659,7 +630,6 @@ static int iuu_bulk_write(struct usb_serial_port *port)
659 int i; 630 int i;
660 int buf_len; 631 int buf_len;
661 char *buf_ptr = port->write_urb->transfer_buffer; 632 char *buf_ptr = port->write_urb->transfer_buffer;
662 dbg("%s - enter", __func__);
663 633
664 spin_lock_irqsave(&priv->lock, flags); 634 spin_lock_irqsave(&priv->lock, flags);
665 *buf_ptr++ = IUU_UART_ESC; 635 *buf_ptr++ = IUU_UART_ESC;
@@ -691,7 +661,6 @@ static int iuu_bulk_write(struct usb_serial_port *port)
691static int iuu_read_buf(struct usb_serial_port *port, int len) 661static int iuu_read_buf(struct usb_serial_port *port, int len)
692{ 662{
693 int result; 663 int result;
694 dbg("%s - enter", __func__);
695 664
696 usb_fill_bulk_urb(port->read_urb, port->serial->dev, 665 usb_fill_bulk_urb(port->read_urb, port->serial->dev,
697 usb_rcvbulkpipe(port->serial->dev, 666 usb_rcvbulkpipe(port->serial->dev,
@@ -713,8 +682,6 @@ static void iuu_uart_read_callback(struct urb *urb)
713 unsigned char *data = urb->transfer_buffer; 682 unsigned char *data = urb->transfer_buffer;
714 priv->poll++; 683 priv->poll++;
715 684
716 dbg("%s - enter", __func__);
717
718 if (status) { 685 if (status) {
719 dbg("%s - status = %d", __func__, status); 686 dbg("%s - status = %d", __func__, status);
720 /* error stop all */ 687 /* error stop all */
@@ -771,7 +738,6 @@ static int iuu_uart_write(struct tty_struct *tty, struct usb_serial_port *port,
771{ 738{
772 struct iuu_private *priv = usb_get_serial_port_data(port); 739 struct iuu_private *priv = usb_get_serial_port_data(port);
773 unsigned long flags; 740 unsigned long flags;
774 dbg("%s - enter", __func__);
775 741
776 if (count > 256) 742 if (count > 256)
777 return -ENOMEM; 743 return -ENOMEM;
@@ -792,8 +758,6 @@ static void read_rxcmd_callback(struct urb *urb)
792 int result; 758 int result;
793 int status = urb->status; 759 int status = urb->status;
794 760
795 dbg("%s - status = %d", __func__, status);
796
797 if (status) { 761 if (status) {
798 /* error stop all */ 762 /* error stop all */
799 return; 763 return;
@@ -1015,8 +979,6 @@ static void iuu_close(struct usb_serial_port *port)
1015 if (!serial) 979 if (!serial)
1016 return; 980 return;
1017 981
1018 dbg("%s - port %d", __func__, port->number);
1019
1020 iuu_uart_off(port); 982 iuu_uart_off(port);
1021 if (serial->dev) { 983 if (serial->dev) {
1022 /* free writebuf */ 984 /* free writebuf */
@@ -1031,7 +993,6 @@ static void iuu_close(struct usb_serial_port *port)
1031 993
1032static void iuu_init_termios(struct tty_struct *tty) 994static void iuu_init_termios(struct tty_struct *tty)
1033{ 995{
1034 dbg("%s - enter", __func__);
1035 *(tty->termios) = tty_std_termios; 996 *(tty->termios) = tty_std_termios;
1036 tty->termios->c_cflag = CLOCAL | CREAD | CS8 | B9600 997 tty->termios->c_cflag = CLOCAL | CREAD | CS8 | B9600
1037 | TIOCM_CTS | CSTOPB | PARENB; 998 | TIOCM_CTS | CSTOPB | PARENB;
@@ -1188,8 +1149,6 @@ static int iuu_vcc_set(struct usb_serial_port *port, unsigned int vcc)
1188 if (!buf) 1149 if (!buf)
1189 return -ENOMEM; 1150 return -ENOMEM;
1190 1151
1191 dbg("%s - enter", __func__);
1192
1193 buf[0] = IUU_SET_VCC; 1152 buf[0] = IUU_SET_VCC;
1194 buf[1] = vcc & 0xFF; 1153 buf[1] = vcc & 0xFF;
1195 buf[2] = (vcc >> 8) & 0xFF; 1154 buf[2] = (vcc >> 8) & 0xFF;
@@ -1250,15 +1209,11 @@ static DEVICE_ATTR(vcc_mode, S_IRUSR | S_IWUSR, show_vcc_mode,
1250 1209
1251static int iuu_create_sysfs_attrs(struct usb_serial_port *port) 1210static int iuu_create_sysfs_attrs(struct usb_serial_port *port)
1252{ 1211{
1253 dbg("%s", __func__);
1254
1255 return device_create_file(&port->dev, &dev_attr_vcc_mode); 1212 return device_create_file(&port->dev, &dev_attr_vcc_mode);
1256} 1213}
1257 1214
1258static int iuu_remove_sysfs_attrs(struct usb_serial_port *port) 1215static int iuu_remove_sysfs_attrs(struct usb_serial_port *port)
1259{ 1216{
1260 dbg("%s", __func__);
1261
1262 device_remove_file(&port->dev, &dev_attr_vcc_mode); 1217 device_remove_file(&port->dev, &dev_attr_vcc_mode);
1263 return 0; 1218 return 0;
1264} 1219}
@@ -1294,7 +1249,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
1294 &iuu_device, NULL 1249 &iuu_device, NULL
1295}; 1250};
1296 1251
1297module_usb_serial_driver(iuu_driver, serial_drivers); 1252module_usb_serial_driver(serial_drivers, id_table);
1298 1253
1299MODULE_AUTHOR("Alain Degreffe eczema@ecze.com"); 1254MODULE_AUTHOR("Alain Degreffe eczema@ecze.com");
1300 1255