cp210x.c (33fb934a0992440e3d645d3965e71217c185fd6d) | cp210x.c (4e9340bb551a5ad664196465ba7620009d835dbc) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Silicon Laboratories CP210x USB to RS232 serial adaptor driver 4 * 5 * Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk) 6 * Copyright (C) 2010-2021 Johan Hovold (johan@kernel.org) 7 * 8 * Support to set flow control line levels using TIOCMGET and TIOCMSET --- 386 unchanged lines hidden (view full) --- 395 u8 bErrorChar; 396 u8 bBreakChar; 397 u8 bEventChar; 398 u8 bXonChar; 399 u8 bXoffChar; 400}; 401 402/* CP210X_VENDOR_SPECIFIC values */ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Silicon Laboratories CP210x USB to RS232 serial adaptor driver 4 * 5 * Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk) 6 * Copyright (C) 2010-2021 Johan Hovold (johan@kernel.org) 7 * 8 * Support to set flow control line levels using TIOCMGET and TIOCMSET --- 386 unchanged lines hidden (view full) --- 395 u8 bErrorChar; 396 u8 bBreakChar; 397 u8 bEventChar; 398 u8 bXonChar; 399 u8 bXoffChar; 400}; 401 402/* CP210X_VENDOR_SPECIFIC values */ |
403#define CP210X_GET_FW_VER 0x000E |
|
403#define CP210X_READ_2NCONFIG 0x000E 404#define CP210X_GET_FW_VER_2N 0x0010 405#define CP210X_READ_LATCH 0x00C2 406#define CP210X_GET_PARTNUM 0x370B 407#define CP210X_GET_PORTCONFIG 0x370C 408#define CP210X_GET_DEVICEMODE 0x3711 409#define CP210X_WRITE_LATCH 0x37E1 410 --- 1692 unchanged lines hidden (view full) --- 2103 if (ret < 0) { 2104 dev_warn(&serial->interface->dev, 2105 "querying part number failed\n"); 2106 priv->partnum = CP210X_PARTNUM_UNKNOWN; 2107 return; 2108 } 2109 2110 switch (priv->partnum) { | 404#define CP210X_READ_2NCONFIG 0x000E 405#define CP210X_GET_FW_VER_2N 0x0010 406#define CP210X_READ_LATCH 0x00C2 407#define CP210X_GET_PARTNUM 0x370B 408#define CP210X_GET_PORTCONFIG 0x370C 409#define CP210X_GET_DEVICEMODE 0x3711 410#define CP210X_WRITE_LATCH 0x37E1 411 --- 1692 unchanged lines hidden (view full) --- 2104 if (ret < 0) { 2105 dev_warn(&serial->interface->dev, 2106 "querying part number failed\n"); 2107 priv->partnum = CP210X_PARTNUM_UNKNOWN; 2108 return; 2109 } 2110 2111 switch (priv->partnum) { |
2112 case CP210X_PARTNUM_CP2105: 2113 case CP210X_PARTNUM_CP2108: 2114 cp210x_get_fw_version(serial, CP210X_GET_FW_VER); 2115 break; |
|
2111 case CP210X_PARTNUM_CP2102N_QFN28: 2112 case CP210X_PARTNUM_CP2102N_QFN24: 2113 case CP210X_PARTNUM_CP2102N_QFN20: 2114 ret = cp210x_get_fw_version(serial, CP210X_GET_FW_VER_2N); 2115 if (ret) 2116 break; 2117 if (priv->fw_version <= 0x10004) 2118 priv->no_flow_control = true; --- 47 unchanged lines hidden --- | 2116 case CP210X_PARTNUM_CP2102N_QFN28: 2117 case CP210X_PARTNUM_CP2102N_QFN24: 2118 case CP210X_PARTNUM_CP2102N_QFN20: 2119 ret = cp210x_get_fw_version(serial, CP210X_GET_FW_VER_2N); 2120 if (ret) 2121 break; 2122 if (priv->fw_version <= 0x10004) 2123 priv->no_flow_control = true; --- 47 unchanged lines hidden --- |