Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
digi_acceleport.c File Reference
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/wait.h>
#include <linux/usb/serial.h>

Go to the source code of this file.

Data Structures

struct  digi_serial
 
struct  digi_port
 

Macros

#define DRIVER_VERSION   "v1.80.1.2"
 
#define DRIVER_AUTHOR   "Peter Berger <[email protected]>, Al Borchers <[email protected]>"
 
#define DRIVER_DESC   "Digi AccelePort USB-2/USB-4 Serial Converter driver"
 
#define DIGI_OUT_BUF_SIZE   8
 
#define DIGI_IN_BUF_SIZE   64
 
#define DIGI_RETRY_TIMEOUT   (HZ/10)
 
#define DIGI_CLOSE_TIMEOUT   (5*HZ)
 
#define DIGI_VENDOR_ID   0x05c5
 
#define DIGI_2_ID   0x0002 /* USB-2 */
 
#define DIGI_4_ID   0x0004 /* USB-4 */
 
#define DIGI_CMD_SET_BAUD_RATE   0 /* INB, OOB */
 
#define DIGI_CMD_SET_WORD_SIZE   1 /* INB, OOB */
 
#define DIGI_CMD_SET_PARITY   2 /* INB, OOB */
 
#define DIGI_CMD_SET_STOP_BITS   3 /* INB, OOB */
 
#define DIGI_CMD_SET_INPUT_FLOW_CONTROL   4 /* INB, OOB */
 
#define DIGI_CMD_SET_OUTPUT_FLOW_CONTROL   5 /* INB, OOB */
 
#define DIGI_CMD_SET_DTR_SIGNAL   6 /* INB, OOB */
 
#define DIGI_CMD_SET_RTS_SIGNAL   7 /* INB, OOB */
 
#define DIGI_CMD_READ_INPUT_SIGNALS   8 /* OOB */
 
#define DIGI_CMD_IFLUSH_FIFO   9 /* OOB */
 
#define DIGI_CMD_RECEIVE_ENABLE   10 /* INB, OOB */
 
#define DIGI_CMD_BREAK_CONTROL   11 /* INB, OOB */
 
#define DIGI_CMD_LOCAL_LOOPBACK   12 /* INB, OOB */
 
#define DIGI_CMD_TRANSMIT_IDLE   13 /* INB, OOB */
 
#define DIGI_CMD_READ_UART_REGISTER   14 /* OOB */
 
#define DIGI_CMD_WRITE_UART_REGISTER   15 /* INB, OOB */
 
#define DIGI_CMD_AND_UART_REGISTER   16 /* INB, OOB */
 
#define DIGI_CMD_OR_UART_REGISTER   17 /* INB, OOB */
 
#define DIGI_CMD_SEND_DATA   18 /* INB */
 
#define DIGI_CMD_RECEIVE_DATA   19 /* INB */
 
#define DIGI_CMD_RECEIVE_DISABLE   20 /* INB */
 
#define DIGI_CMD_GET_PORT_TYPE   21 /* OOB */
 
#define DIGI_BAUD_50   0
 
#define DIGI_BAUD_75   1
 
#define DIGI_BAUD_110   2
 
#define DIGI_BAUD_150   3
 
#define DIGI_BAUD_200   4
 
#define DIGI_BAUD_300   5
 
#define DIGI_BAUD_600   6
 
#define DIGI_BAUD_1200   7
 
#define DIGI_BAUD_1800   8
 
#define DIGI_BAUD_2400   9
 
#define DIGI_BAUD_4800   10
 
#define DIGI_BAUD_7200   11
 
#define DIGI_BAUD_9600   12
 
#define DIGI_BAUD_14400   13
 
#define DIGI_BAUD_19200   14
 
#define DIGI_BAUD_28800   15
 
#define DIGI_BAUD_38400   16
 
#define DIGI_BAUD_57600   17
 
#define DIGI_BAUD_76800   18
 
#define DIGI_BAUD_115200   19
 
#define DIGI_BAUD_153600   20
 
#define DIGI_BAUD_230400   21
 
#define DIGI_BAUD_460800   22
 
#define DIGI_WORD_SIZE_5   0
 
#define DIGI_WORD_SIZE_6   1
 
#define DIGI_WORD_SIZE_7   2
 
#define DIGI_WORD_SIZE_8   3
 
#define DIGI_PARITY_NONE   0
 
#define DIGI_PARITY_ODD   1
 
#define DIGI_PARITY_EVEN   2
 
#define DIGI_PARITY_MARK   3
 
#define DIGI_PARITY_SPACE   4
 
#define DIGI_STOP_BITS_1   0
 
#define DIGI_STOP_BITS_2   1
 
#define DIGI_INPUT_FLOW_CONTROL_XON_XOFF   1
 
#define DIGI_INPUT_FLOW_CONTROL_RTS   2
 
#define DIGI_INPUT_FLOW_CONTROL_DTR   4
 
#define DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF   1
 
#define DIGI_OUTPUT_FLOW_CONTROL_CTS   2
 
#define DIGI_OUTPUT_FLOW_CONTROL_DSR   4
 
#define DIGI_DTR_INACTIVE   0
 
#define DIGI_DTR_ACTIVE   1
 
#define DIGI_DTR_INPUT_FLOW_CONTROL   2
 
#define DIGI_RTS_INACTIVE   0
 
#define DIGI_RTS_ACTIVE   1
 
#define DIGI_RTS_INPUT_FLOW_CONTROL   2
 
#define DIGI_RTS_TOGGLE   3
 
#define DIGI_FLUSH_TX   1
 
#define DIGI_FLUSH_RX   2
 
#define DIGI_RESUME_TX   4 /* clears xoff condition */
 
#define DIGI_TRANSMIT_NOT_IDLE   0
 
#define DIGI_TRANSMIT_IDLE   1
 
#define DIGI_DISABLE   0
 
#define DIGI_ENABLE   1
 
#define DIGI_DEASSERT   0
 
#define DIGI_ASSERT   1
 
#define DIGI_OVERRUN_ERROR   4
 
#define DIGI_PARITY_ERROR   8
 
#define DIGI_FRAMING_ERROR   16
 
#define DIGI_BREAK_ERROR   32
 
#define DIGI_NO_ERROR   0
 
#define DIGI_BAD_FIRST_PARAMETER   1
 
#define DIGI_BAD_SECOND_PARAMETER   2
 
#define DIGI_INVALID_LINE   3
 
#define DIGI_INVALID_OPCODE   4
 
#define DIGI_READ_INPUT_SIGNALS_SLOT   1
 
#define DIGI_READ_INPUT_SIGNALS_ERR   2
 
#define DIGI_READ_INPUT_SIGNALS_BUSY   4
 
#define DIGI_READ_INPUT_SIGNALS_PE   8
 
#define DIGI_READ_INPUT_SIGNALS_CTS   16
 
#define DIGI_READ_INPUT_SIGNALS_DSR   32
 
#define DIGI_READ_INPUT_SIGNALS_RI   64
 
#define DIGI_READ_INPUT_SIGNALS_DCD   128
 

Functions

 MODULE_DEVICE_TABLE (usb, id_table_combined)
 
 module_usb_serial_driver (serial_drivers, id_table_combined)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DIGI_2_ID   0x0002 /* USB-2 */

Definition at line 63 of file digi_acceleport.c.

#define DIGI_4_ID   0x0004 /* USB-4 */

Definition at line 64 of file digi_acceleport.c.

#define DIGI_ASSERT   1

Definition at line 161 of file digi_acceleport.c.

#define DIGI_BAD_FIRST_PARAMETER   1

Definition at line 171 of file digi_acceleport.c.

#define DIGI_BAD_SECOND_PARAMETER   2

Definition at line 172 of file digi_acceleport.c.

#define DIGI_BAUD_110   2

Definition at line 96 of file digi_acceleport.c.

#define DIGI_BAUD_115200   19

Definition at line 113 of file digi_acceleport.c.

#define DIGI_BAUD_1200   7

Definition at line 101 of file digi_acceleport.c.

#define DIGI_BAUD_14400   13

Definition at line 107 of file digi_acceleport.c.

#define DIGI_BAUD_150   3

Definition at line 97 of file digi_acceleport.c.

#define DIGI_BAUD_153600   20

Definition at line 114 of file digi_acceleport.c.

#define DIGI_BAUD_1800   8

Definition at line 102 of file digi_acceleport.c.

#define DIGI_BAUD_19200   14

Definition at line 108 of file digi_acceleport.c.

#define DIGI_BAUD_200   4

Definition at line 98 of file digi_acceleport.c.

#define DIGI_BAUD_230400   21

Definition at line 115 of file digi_acceleport.c.

#define DIGI_BAUD_2400   9

Definition at line 103 of file digi_acceleport.c.

#define DIGI_BAUD_28800   15

Definition at line 109 of file digi_acceleport.c.

#define DIGI_BAUD_300   5

Definition at line 99 of file digi_acceleport.c.

#define DIGI_BAUD_38400   16

Definition at line 110 of file digi_acceleport.c.

#define DIGI_BAUD_460800   22

Definition at line 116 of file digi_acceleport.c.

#define DIGI_BAUD_4800   10

Definition at line 104 of file digi_acceleport.c.

#define DIGI_BAUD_50   0

Definition at line 94 of file digi_acceleport.c.

#define DIGI_BAUD_57600   17

Definition at line 111 of file digi_acceleport.c.

#define DIGI_BAUD_600   6

Definition at line 100 of file digi_acceleport.c.

#define DIGI_BAUD_7200   11

Definition at line 105 of file digi_acceleport.c.

#define DIGI_BAUD_75   1

Definition at line 95 of file digi_acceleport.c.

#define DIGI_BAUD_76800   18

Definition at line 112 of file digi_acceleport.c.

#define DIGI_BAUD_9600   12

Definition at line 106 of file digi_acceleport.c.

#define DIGI_BREAK_ERROR   32

Definition at line 167 of file digi_acceleport.c.

#define DIGI_CLOSE_TIMEOUT   (5*HZ)

Definition at line 56 of file digi_acceleport.c.

#define DIGI_CMD_AND_UART_REGISTER   16 /* INB, OOB */

Definition at line 86 of file digi_acceleport.c.

#define DIGI_CMD_BREAK_CONTROL   11 /* INB, OOB */

Definition at line 81 of file digi_acceleport.c.

#define DIGI_CMD_GET_PORT_TYPE   21 /* OOB */

Definition at line 91 of file digi_acceleport.c.

#define DIGI_CMD_IFLUSH_FIFO   9 /* OOB */

Definition at line 79 of file digi_acceleport.c.

#define DIGI_CMD_LOCAL_LOOPBACK   12 /* INB, OOB */

Definition at line 82 of file digi_acceleport.c.

#define DIGI_CMD_OR_UART_REGISTER   17 /* INB, OOB */

Definition at line 87 of file digi_acceleport.c.

#define DIGI_CMD_READ_INPUT_SIGNALS   8 /* OOB */

Definition at line 78 of file digi_acceleport.c.

#define DIGI_CMD_READ_UART_REGISTER   14 /* OOB */

Definition at line 84 of file digi_acceleport.c.

#define DIGI_CMD_RECEIVE_DATA   19 /* INB */

Definition at line 89 of file digi_acceleport.c.

#define DIGI_CMD_RECEIVE_DISABLE   20 /* INB */

Definition at line 90 of file digi_acceleport.c.

#define DIGI_CMD_RECEIVE_ENABLE   10 /* INB, OOB */

Definition at line 80 of file digi_acceleport.c.

#define DIGI_CMD_SEND_DATA   18 /* INB */

Definition at line 88 of file digi_acceleport.c.

#define DIGI_CMD_SET_BAUD_RATE   0 /* INB, OOB */

Definition at line 70 of file digi_acceleport.c.

#define DIGI_CMD_SET_DTR_SIGNAL   6 /* INB, OOB */

Definition at line 76 of file digi_acceleport.c.

#define DIGI_CMD_SET_INPUT_FLOW_CONTROL   4 /* INB, OOB */

Definition at line 74 of file digi_acceleport.c.

#define DIGI_CMD_SET_OUTPUT_FLOW_CONTROL   5 /* INB, OOB */

Definition at line 75 of file digi_acceleport.c.

#define DIGI_CMD_SET_PARITY   2 /* INB, OOB */

Definition at line 72 of file digi_acceleport.c.

#define DIGI_CMD_SET_RTS_SIGNAL   7 /* INB, OOB */

Definition at line 77 of file digi_acceleport.c.

#define DIGI_CMD_SET_STOP_BITS   3 /* INB, OOB */

Definition at line 73 of file digi_acceleport.c.

#define DIGI_CMD_SET_WORD_SIZE   1 /* INB, OOB */

Definition at line 71 of file digi_acceleport.c.

#define DIGI_CMD_TRANSMIT_IDLE   13 /* INB, OOB */

Definition at line 83 of file digi_acceleport.c.

#define DIGI_CMD_WRITE_UART_REGISTER   15 /* INB, OOB */

Definition at line 85 of file digi_acceleport.c.

#define DIGI_DEASSERT   0

Definition at line 160 of file digi_acceleport.c.

#define DIGI_DISABLE   0

Definition at line 157 of file digi_acceleport.c.

#define DIGI_DTR_ACTIVE   1

Definition at line 142 of file digi_acceleport.c.

#define DIGI_DTR_INACTIVE   0

Definition at line 141 of file digi_acceleport.c.

#define DIGI_DTR_INPUT_FLOW_CONTROL   2

Definition at line 143 of file digi_acceleport.c.

#define DIGI_ENABLE   1

Definition at line 158 of file digi_acceleport.c.

#define DIGI_FLUSH_RX   2

Definition at line 151 of file digi_acceleport.c.

#define DIGI_FLUSH_TX   1

Definition at line 150 of file digi_acceleport.c.

#define DIGI_FRAMING_ERROR   16

Definition at line 166 of file digi_acceleport.c.

#define DIGI_IN_BUF_SIZE   64

Definition at line 48 of file digi_acceleport.c.

#define DIGI_INPUT_FLOW_CONTROL_DTR   4

Definition at line 135 of file digi_acceleport.c.

#define DIGI_INPUT_FLOW_CONTROL_RTS   2

Definition at line 134 of file digi_acceleport.c.

#define DIGI_INPUT_FLOW_CONTROL_XON_XOFF   1

Definition at line 133 of file digi_acceleport.c.

#define DIGI_INVALID_LINE   3

Definition at line 173 of file digi_acceleport.c.

#define DIGI_INVALID_OPCODE   4

Definition at line 174 of file digi_acceleport.c.

#define DIGI_NO_ERROR   0

Definition at line 170 of file digi_acceleport.c.

#define DIGI_OUT_BUF_SIZE   8

Definition at line 44 of file digi_acceleport.c.

#define DIGI_OUTPUT_FLOW_CONTROL_CTS   2

Definition at line 138 of file digi_acceleport.c.

#define DIGI_OUTPUT_FLOW_CONTROL_DSR   4

Definition at line 139 of file digi_acceleport.c.

#define DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF   1

Definition at line 137 of file digi_acceleport.c.

#define DIGI_OVERRUN_ERROR   4

Definition at line 164 of file digi_acceleport.c.

#define DIGI_PARITY_ERROR   8

Definition at line 165 of file digi_acceleport.c.

#define DIGI_PARITY_EVEN   2

Definition at line 126 of file digi_acceleport.c.

#define DIGI_PARITY_MARK   3

Definition at line 127 of file digi_acceleport.c.

#define DIGI_PARITY_NONE   0

Definition at line 124 of file digi_acceleport.c.

#define DIGI_PARITY_ODD   1

Definition at line 125 of file digi_acceleport.c.

#define DIGI_PARITY_SPACE   4

Definition at line 128 of file digi_acceleport.c.

#define DIGI_READ_INPUT_SIGNALS_BUSY   4

Definition at line 179 of file digi_acceleport.c.

#define DIGI_READ_INPUT_SIGNALS_CTS   16

Definition at line 181 of file digi_acceleport.c.

#define DIGI_READ_INPUT_SIGNALS_DCD   128

Definition at line 184 of file digi_acceleport.c.

#define DIGI_READ_INPUT_SIGNALS_DSR   32

Definition at line 182 of file digi_acceleport.c.

#define DIGI_READ_INPUT_SIGNALS_ERR   2

Definition at line 178 of file digi_acceleport.c.

#define DIGI_READ_INPUT_SIGNALS_PE   8

Definition at line 180 of file digi_acceleport.c.

#define DIGI_READ_INPUT_SIGNALS_RI   64

Definition at line 183 of file digi_acceleport.c.

#define DIGI_READ_INPUT_SIGNALS_SLOT   1

Definition at line 177 of file digi_acceleport.c.

#define DIGI_RESUME_TX   4 /* clears xoff condition */

Definition at line 152 of file digi_acceleport.c.

#define DIGI_RETRY_TIMEOUT   (HZ/10)

Definition at line 51 of file digi_acceleport.c.

#define DIGI_RTS_ACTIVE   1

Definition at line 146 of file digi_acceleport.c.

#define DIGI_RTS_INACTIVE   0

Definition at line 145 of file digi_acceleport.c.

#define DIGI_RTS_INPUT_FLOW_CONTROL   2

Definition at line 147 of file digi_acceleport.c.

#define DIGI_RTS_TOGGLE   3

Definition at line 148 of file digi_acceleport.c.

#define DIGI_STOP_BITS_1   0

Definition at line 130 of file digi_acceleport.c.

#define DIGI_STOP_BITS_2   1

Definition at line 131 of file digi_acceleport.c.

#define DIGI_TRANSMIT_IDLE   1

Definition at line 155 of file digi_acceleport.c.

#define DIGI_TRANSMIT_NOT_IDLE   0

Definition at line 154 of file digi_acceleport.c.

#define DIGI_VENDOR_ID   0x05c5

Definition at line 62 of file digi_acceleport.c.

#define DIGI_WORD_SIZE_5   0

Definition at line 119 of file digi_acceleport.c.

#define DIGI_WORD_SIZE_6   1

Definition at line 120 of file digi_acceleport.c.

#define DIGI_WORD_SIZE_7   2

Definition at line 121 of file digi_acceleport.c.

#define DIGI_WORD_SIZE_8   3

Definition at line 122 of file digi_acceleport.c.

#define DRIVER_AUTHOR   "Peter Berger <[email protected]>, Al Borchers <[email protected]>"

Definition at line 39 of file digi_acceleport.c.

#define DRIVER_DESC   "Digi AccelePort USB-2/USB-4 Serial Converter driver"

Definition at line 40 of file digi_acceleport.c.

#define DRIVER_VERSION   "v1.80.1.2"

Definition at line 38 of file digi_acceleport.c.

Function Documentation

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
id_table_combined   
)
MODULE_LICENSE ( "GPL"  )
module_usb_serial_driver ( serial_drivers  ,
id_table_combined   
)