aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ftdi_sio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r--drivers/usb/serial/ftdi_sio.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 162728977553..2e06b90aa1f8 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -179,6 +179,7 @@ static struct usb_device_id id_table_combined [] = {
179 { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) }, 179 { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) },
180 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, 180 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
181 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) }, 181 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
182 { USB_DEVICE(FTDI_VID, FTDI_232H_PID) },
182 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, 183 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
183 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, 184 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
184 { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) }, 185 { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
@@ -848,7 +849,8 @@ static const char *ftdi_chip_name[] = {
848 [FT2232C] = "FT2232C", 849 [FT2232C] = "FT2232C",
849 [FT232RL] = "FT232RL", 850 [FT232RL] = "FT232RL",
850 [FT2232H] = "FT2232H", 851 [FT2232H] = "FT2232H",
851 [FT4232H] = "FT4232H" 852 [FT4232H] = "FT4232H",
853 [FT232H] = "FT232H"
852}; 854};
853 855
854 856
@@ -1168,6 +1170,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
1168 break; 1170 break;
1169 case FT2232H: /* FT2232H chip */ 1171 case FT2232H: /* FT2232H chip */
1170 case FT4232H: /* FT4232H chip */ 1172 case FT4232H: /* FT4232H chip */
1173 case FT232H: /* FT232H chip */
1171 if ((baud <= 12000000) & (baud >= 1200)) { 1174 if ((baud <= 12000000) & (baud >= 1200)) {
1172 div_value = ftdi_2232h_baud_to_divisor(baud); 1175 div_value = ftdi_2232h_baud_to_divisor(baud);
1173 } else if (baud < 1200) { 1176 } else if (baud < 1200) {
@@ -1429,9 +1432,12 @@ static void ftdi_determine_type(struct usb_serial_port *port)
1429 } else if (version < 0x600) { 1432 } else if (version < 0x600) {
1430 /* Assume it's an FT232BM (or FT245BM) */ 1433 /* Assume it's an FT232BM (or FT245BM) */
1431 priv->chip_type = FT232BM; 1434 priv->chip_type = FT232BM;
1432 } else { 1435 } else if (version < 0x900) {
1433 /* Assume it's an FT232R */ 1436 /* Assume it's an FT232RL */
1434 priv->chip_type = FT232RL; 1437 priv->chip_type = FT232RL;
1438 } else {
1439 /* Assume it's an FT232H */
1440 priv->chip_type = FT232H;
1435 } 1441 }
1436 dev_info(&udev->dev, "Detected %s\n", ftdi_chip_name[priv->chip_type]); 1442 dev_info(&udev->dev, "Detected %s\n", ftdi_chip_name[priv->chip_type]);
1437} 1443}
@@ -1559,7 +1565,8 @@ static int create_sysfs_attrs(struct usb_serial_port *port)
1559 priv->chip_type == FT2232C || 1565 priv->chip_type == FT2232C ||
1560 priv->chip_type == FT232RL || 1566 priv->chip_type == FT232RL ||
1561 priv->chip_type == FT2232H || 1567 priv->chip_type == FT2232H ||
1562 priv->chip_type == FT4232H)) { 1568 priv->chip_type == FT4232H ||
1569 priv->chip_type == FT232H)) {
1563 retval = device_create_file(&port->dev, 1570 retval = device_create_file(&port->dev,
1564 &dev_attr_latency_timer); 1571 &dev_attr_latency_timer);
1565 } 1572 }
@@ -1580,7 +1587,8 @@ static void remove_sysfs_attrs(struct usb_serial_port *port)
1580 priv->chip_type == FT2232C || 1587 priv->chip_type == FT2232C ||
1581 priv->chip_type == FT232RL || 1588 priv->chip_type == FT232RL ||
1582 priv->chip_type == FT2232H || 1589 priv->chip_type == FT2232H ||
1583 priv->chip_type == FT4232H) { 1590 priv->chip_type == FT4232H ||
1591 priv->chip_type == FT232H) {
1584 device_remove_file(&port->dev, &dev_attr_latency_timer); 1592 device_remove_file(&port->dev, &dev_attr_latency_timer);
1585 } 1593 }
1586 } 1594 }
@@ -2212,6 +2220,7 @@ static int ftdi_tiocmget(struct tty_struct *tty)
2212 case FT232RL: 2220 case FT232RL:
2213 case FT2232H: 2221 case FT2232H:
2214 case FT4232H: 2222 case FT4232H:
2223 case FT232H:
2215 len = 2; 2224 len = 2;
2216 break; 2225 break;
2217 default: 2226 default: