![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0+ */ 0002 /* 0003 * Definitions for Belkin USB Serial Adapter Driver 0004 * 0005 * Copyright (C) 2000 0006 * William Greathouse (wgreathouse@smva.com) 0007 * 0008 * This program is largely derived from work by the linux-usb group 0009 * and associated source files. Please see the usb/serial files for 0010 * individual credits and copyrights. 0011 * 0012 * See Documentation/usb/usb-serial.rst for more information on using this 0013 * driver 0014 * 0015 * 12-Mar-2001 gkh 0016 * Added GoHubs GO-COM232 device id. 0017 * 0018 * 06-Nov-2000 gkh 0019 * Added old Belkin and Peracom device ids, which this driver supports 0020 * 0021 * 12-Oct-2000 William Greathouse 0022 * First cut at supporting Belkin USB Serial Adapter F5U103 0023 * I did not have a copy of the original work to support this 0024 * adapter, so pardon any stupid mistakes. All of the information 0025 * I am using to write this driver was acquired by using a modified 0026 * UsbSnoop on Windows2000. 0027 * 0028 */ 0029 0030 #ifndef __LINUX_USB_SERIAL_BSA_H 0031 #define __LINUX_USB_SERIAL_BSA_H 0032 0033 #define BELKIN_DOCKSTATION_VID 0x050d /* Vendor Id */ 0034 #define BELKIN_DOCKSTATION_PID 0x1203 /* Product Id */ 0035 0036 #define BELKIN_SA_VID 0x050d /* Vendor Id */ 0037 #define BELKIN_SA_PID 0x0103 /* Product Id */ 0038 0039 #define BELKIN_OLD_VID 0x056c /* Belkin's "old" vendor id */ 0040 #define BELKIN_OLD_PID 0x8007 /* Belkin's "old" single port serial converter's id */ 0041 0042 #define PERACOM_VID 0x0565 /* Peracom's vendor id */ 0043 #define PERACOM_PID 0x0001 /* Peracom's single port serial converter's id */ 0044 0045 #define GOHUBS_VID 0x0921 /* GoHubs vendor id */ 0046 #define GOHUBS_PID 0x1000 /* GoHubs single port serial converter's id (identical to the Peracom device) */ 0047 #define HANDYLINK_PID 0x1200 /* HandyLink USB's id (identical to the Peracom device) */ 0048 0049 /* Vendor Request Interface */ 0050 #define BELKIN_SA_SET_BAUDRATE_REQUEST 0 /* Set baud rate */ 0051 #define BELKIN_SA_SET_STOP_BITS_REQUEST 1 /* Set stop bits (1,2) */ 0052 #define BELKIN_SA_SET_DATA_BITS_REQUEST 2 /* Set data bits (5,6,7,8) */ 0053 #define BELKIN_SA_SET_PARITY_REQUEST 3 /* Set parity (None, Even, Odd) */ 0054 0055 #define BELKIN_SA_SET_DTR_REQUEST 10 /* Set DTR state */ 0056 #define BELKIN_SA_SET_RTS_REQUEST 11 /* Set RTS state */ 0057 #define BELKIN_SA_SET_BREAK_REQUEST 12 /* Set BREAK state */ 0058 0059 #define BELKIN_SA_SET_FLOW_CTRL_REQUEST 16 /* Set flow control mode */ 0060 0061 0062 #ifdef WHEN_I_LEARN_THIS 0063 #define BELKIN_SA_SET_MAGIC_REQUEST 17 /* I don't know, possibly flush */ 0064 /* (always in Wininit sequence before flow control) */ 0065 #define BELKIN_SA_RESET xx /* Reset the port */ 0066 #define BELKIN_SA_GET_MODEM_STATUS xx /* Force return of modem status register */ 0067 #endif 0068 0069 #define BELKIN_SA_SET_REQUEST_TYPE 0x40 0070 0071 #define BELKIN_SA_BAUD(b) (230400/b) 0072 0073 #define BELKIN_SA_STOP_BITS(b) (b-1) 0074 0075 #define BELKIN_SA_DATA_BITS(b) (b-5) 0076 0077 #define BELKIN_SA_PARITY_NONE 0 0078 #define BELKIN_SA_PARITY_EVEN 1 0079 #define BELKIN_SA_PARITY_ODD 2 0080 #define BELKIN_SA_PARITY_MARK 3 0081 #define BELKIN_SA_PARITY_SPACE 4 0082 0083 #define BELKIN_SA_FLOW_NONE 0x0000 /* No flow control */ 0084 #define BELKIN_SA_FLOW_OCTS 0x0001 /* use CTS input to throttle output */ 0085 #define BELKIN_SA_FLOW_ODSR 0x0002 /* use DSR input to throttle output */ 0086 #define BELKIN_SA_FLOW_IDSR 0x0004 /* use DSR input to enable receive */ 0087 #define BELKIN_SA_FLOW_IDTR 0x0008 /* use DTR output for input flow control */ 0088 #define BELKIN_SA_FLOW_IRTS 0x0010 /* use RTS output for input flow control */ 0089 #define BELKIN_SA_FLOW_ORTS 0x0020 /* use RTS to indicate data available to send */ 0090 #define BELKIN_SA_FLOW_ERRSUB 0x0040 /* ???? guess ???? substitute inline errors */ 0091 #define BELKIN_SA_FLOW_OXON 0x0080 /* use XON/XOFF for output flow control */ 0092 #define BELKIN_SA_FLOW_IXON 0x0100 /* use XON/XOFF for input flow control */ 0093 0094 /* 0095 * It seems that the interrupt pipe is closely modelled after the 0096 * 16550 register layout. This is probably because the adapter can 0097 * be used in a "DOS" environment to simulate a standard hardware port. 0098 */ 0099 #define BELKIN_SA_LSR_INDEX 2 /* Line Status Register */ 0100 #define BELKIN_SA_LSR_RDR 0x01 /* receive data ready */ 0101 #define BELKIN_SA_LSR_OE 0x02 /* overrun error */ 0102 #define BELKIN_SA_LSR_PE 0x04 /* parity error */ 0103 #define BELKIN_SA_LSR_FE 0x08 /* framing error */ 0104 #define BELKIN_SA_LSR_BI 0x10 /* break indicator */ 0105 #define BELKIN_SA_LSR_THE 0x20 /* tx holding register empty */ 0106 #define BELKIN_SA_LSR_TE 0x40 /* transmit register empty */ 0107 #define BELKIN_SA_LSR_ERR 0x80 /* OE | PE | FE | BI */ 0108 0109 #define BELKIN_SA_MSR_INDEX 3 /* Modem Status Register */ 0110 #define BELKIN_SA_MSR_DCTS 0x01 /* Delta CTS */ 0111 #define BELKIN_SA_MSR_DDSR 0x02 /* Delta DSR */ 0112 #define BELKIN_SA_MSR_DRI 0x04 /* Delta RI */ 0113 #define BELKIN_SA_MSR_DCD 0x08 /* Delta CD */ 0114 #define BELKIN_SA_MSR_CTS 0x10 /* Current CTS */ 0115 #define BELKIN_SA_MSR_DSR 0x20 /* Current DSR */ 0116 #define BELKIN_SA_MSR_RI 0x40 /* Current RI */ 0117 #define BELKIN_SA_MSR_CD 0x80 /* Current CD */ 0118 0119 #endif /* __LINUX_USB_SERIAL_BSA_H */ 0120
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |