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

Go to the source code of this file.

Data Structures

struct  cp210x_serial_private
 

Macros

#define DRIVER_VERSION   "v0.09"
 
#define DRIVER_DESC   "Silicon Labs CP210x RS232 serial adaptor driver"
 
#define REQTYPE_HOST_TO_INTERFACE   0x41
 
#define REQTYPE_INTERFACE_TO_HOST   0xc1
 
#define REQTYPE_HOST_TO_DEVICE   0x40
 
#define REQTYPE_DEVICE_TO_HOST   0xc0
 
#define CP210X_IFC_ENABLE   0x00
 
#define CP210X_SET_BAUDDIV   0x01
 
#define CP210X_GET_BAUDDIV   0x02
 
#define CP210X_SET_LINE_CTL   0x03
 
#define CP210X_GET_LINE_CTL   0x04
 
#define CP210X_SET_BREAK   0x05
 
#define CP210X_IMM_CHAR   0x06
 
#define CP210X_SET_MHS   0x07
 
#define CP210X_GET_MDMSTS   0x08
 
#define CP210X_SET_XON   0x09
 
#define CP210X_SET_XOFF   0x0A
 
#define CP210X_SET_EVENTMASK   0x0B
 
#define CP210X_GET_EVENTMASK   0x0C
 
#define CP210X_SET_CHAR   0x0D
 
#define CP210X_GET_CHARS   0x0E
 
#define CP210X_GET_PROPS   0x0F
 
#define CP210X_GET_COMM_STATUS   0x10
 
#define CP210X_RESET   0x11
 
#define CP210X_PURGE   0x12
 
#define CP210X_SET_FLOW   0x13
 
#define CP210X_GET_FLOW   0x14
 
#define CP210X_EMBED_EVENTS   0x15
 
#define CP210X_GET_EVENTSTATE   0x16
 
#define CP210X_SET_CHARS   0x19
 
#define CP210X_GET_BAUDRATE   0x1D
 
#define CP210X_SET_BAUDRATE   0x1E
 
#define UART_ENABLE   0x0001
 
#define UART_DISABLE   0x0000
 
#define BAUD_RATE_GEN_FREQ   0x384000
 
#define BITS_DATA_MASK   0X0f00
 
#define BITS_DATA_5   0X0500
 
#define BITS_DATA_6   0X0600
 
#define BITS_DATA_7   0X0700
 
#define BITS_DATA_8   0X0800
 
#define BITS_DATA_9   0X0900
 
#define BITS_PARITY_MASK   0x00f0
 
#define BITS_PARITY_NONE   0x0000
 
#define BITS_PARITY_ODD   0x0010
 
#define BITS_PARITY_EVEN   0x0020
 
#define BITS_PARITY_MARK   0x0030
 
#define BITS_PARITY_SPACE   0x0040
 
#define BITS_STOP_MASK   0x000f
 
#define BITS_STOP_1   0x0000
 
#define BITS_STOP_1_5   0x0001
 
#define BITS_STOP_2   0x0002
 
#define BREAK_ON   0x0001
 
#define BREAK_OFF   0x0000
 
#define CONTROL_DTR   0x0001
 
#define CONTROL_RTS   0x0002
 
#define CONTROL_CTS   0x0010
 
#define CONTROL_DSR   0x0020
 
#define CONTROL_RING   0x0040
 
#define CONTROL_DCD   0x0080
 
#define CONTROL_WRITE_DTR   0x0100
 
#define CONTROL_WRITE_RTS   0x0200
 

Functions

 MODULE_DEVICE_TABLE (usb, id_table)
 
 module_usb_serial_driver (serial_drivers, id_table)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_VERSION (DRIVER_VERSION)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define BAUD_RATE_GEN_FREQ   0x384000

Definition at line 233 of file cp210x.c.

#define BITS_DATA_5   0X0500

Definition at line 237 of file cp210x.c.

#define BITS_DATA_6   0X0600

Definition at line 238 of file cp210x.c.

#define BITS_DATA_7   0X0700

Definition at line 239 of file cp210x.c.

#define BITS_DATA_8   0X0800

Definition at line 240 of file cp210x.c.

#define BITS_DATA_9   0X0900

Definition at line 241 of file cp210x.c.

#define BITS_DATA_MASK   0X0f00

Definition at line 236 of file cp210x.c.

#define BITS_PARITY_EVEN   0x0020

Definition at line 246 of file cp210x.c.

#define BITS_PARITY_MARK   0x0030

Definition at line 247 of file cp210x.c.

#define BITS_PARITY_MASK   0x00f0

Definition at line 243 of file cp210x.c.

#define BITS_PARITY_NONE   0x0000

Definition at line 244 of file cp210x.c.

#define BITS_PARITY_ODD   0x0010

Definition at line 245 of file cp210x.c.

#define BITS_PARITY_SPACE   0x0040

Definition at line 248 of file cp210x.c.

#define BITS_STOP_1   0x0000

Definition at line 251 of file cp210x.c.

#define BITS_STOP_1_5   0x0001

Definition at line 252 of file cp210x.c.

#define BITS_STOP_2   0x0002

Definition at line 253 of file cp210x.c.

#define BITS_STOP_MASK   0x000f

Definition at line 250 of file cp210x.c.

#define BREAK_OFF   0x0000

Definition at line 257 of file cp210x.c.

#define BREAK_ON   0x0001

Definition at line 256 of file cp210x.c.

#define CONTROL_CTS   0x0010

Definition at line 262 of file cp210x.c.

#define CONTROL_DCD   0x0080

Definition at line 265 of file cp210x.c.

#define CONTROL_DSR   0x0020

Definition at line 263 of file cp210x.c.

#define CONTROL_DTR   0x0001

Definition at line 260 of file cp210x.c.

#define CONTROL_RING   0x0040

Definition at line 264 of file cp210x.c.

#define CONTROL_RTS   0x0002

Definition at line 261 of file cp210x.c.

#define CONTROL_WRITE_DTR   0x0100

Definition at line 266 of file cp210x.c.

#define CONTROL_WRITE_RTS   0x0200

Definition at line 267 of file cp210x.c.

#define CP210X_EMBED_EVENTS   0x15

Definition at line 222 of file cp210x.c.

#define CP210X_GET_BAUDDIV   0x02

Definition at line 203 of file cp210x.c.

#define CP210X_GET_BAUDRATE   0x1D

Definition at line 225 of file cp210x.c.

#define CP210X_GET_CHARS   0x0E

Definition at line 215 of file cp210x.c.

#define CP210X_GET_COMM_STATUS   0x10

Definition at line 217 of file cp210x.c.

#define CP210X_GET_EVENTMASK   0x0C

Definition at line 213 of file cp210x.c.

#define CP210X_GET_EVENTSTATE   0x16

Definition at line 223 of file cp210x.c.

#define CP210X_GET_FLOW   0x14

Definition at line 221 of file cp210x.c.

#define CP210X_GET_LINE_CTL   0x04

Definition at line 205 of file cp210x.c.

#define CP210X_GET_MDMSTS   0x08

Definition at line 209 of file cp210x.c.

#define CP210X_GET_PROPS   0x0F

Definition at line 216 of file cp210x.c.

#define CP210X_IFC_ENABLE   0x00

Definition at line 201 of file cp210x.c.

#define CP210X_IMM_CHAR   0x06

Definition at line 207 of file cp210x.c.

#define CP210X_PURGE   0x12

Definition at line 219 of file cp210x.c.

#define CP210X_RESET   0x11

Definition at line 218 of file cp210x.c.

#define CP210X_SET_BAUDDIV   0x01

Definition at line 202 of file cp210x.c.

#define CP210X_SET_BAUDRATE   0x1E

Definition at line 226 of file cp210x.c.

#define CP210X_SET_BREAK   0x05

Definition at line 206 of file cp210x.c.

#define CP210X_SET_CHAR   0x0D

Definition at line 214 of file cp210x.c.

#define CP210X_SET_CHARS   0x19

Definition at line 224 of file cp210x.c.

#define CP210X_SET_EVENTMASK   0x0B

Definition at line 212 of file cp210x.c.

#define CP210X_SET_FLOW   0x13

Definition at line 220 of file cp210x.c.

#define CP210X_SET_LINE_CTL   0x03

Definition at line 204 of file cp210x.c.

#define CP210X_SET_MHS   0x07

Definition at line 208 of file cp210x.c.

#define CP210X_SET_XOFF   0x0A

Definition at line 211 of file cp210x.c.

#define CP210X_SET_XON   0x09

Definition at line 210 of file cp210x.c.

#define DRIVER_DESC   "Silicon Labs CP210x RS232 serial adaptor driver"

Definition at line 31 of file cp210x.c.

#define DRIVER_VERSION   "v0.09"

Definition at line 30 of file cp210x.c.

#define REQTYPE_DEVICE_TO_HOST   0xc0

Definition at line 198 of file cp210x.c.

#define REQTYPE_HOST_TO_DEVICE   0x40

Definition at line 197 of file cp210x.c.

#define REQTYPE_HOST_TO_INTERFACE   0x41

Definition at line 195 of file cp210x.c.

#define REQTYPE_INTERFACE_TO_HOST   0xc1

Definition at line 196 of file cp210x.c.

#define UART_DISABLE   0x0000

Definition at line 230 of file cp210x.c.

#define UART_ENABLE   0x0001

Definition at line 229 of file cp210x.c.

Function Documentation

MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
id_table   
)
MODULE_LICENSE ( "GPL"  )
module_usb_serial_driver ( serial_drivers  ,
id_table   
)
MODULE_VERSION ( DRIVER_VERSION  )