Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
oti6858.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/serial.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/spinlock.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/uaccess.h>
#include <linux/kfifo.h>
#include "oti6858.h"

Go to the source code of this file.

Data Structures

struct  oti6858_control_pkt
 
struct  oti6858_private
 

Macros

#define OTI6858_DESCRIPTION   "Ours Technology Inc. OTi-6858 USB to serial adapter driver"
 
#define OTI6858_AUTHOR   "Tomasz Michal Lukaszewski <FIXME@FIXME>"
 
#define OTI6858_VERSION   "0.2"
 
#define OTI6858_REQ_GET_STATUS   (USB_DIR_IN | USB_TYPE_VENDOR | 0x00)
 
#define OTI6858_REQ_T_GET_STATUS   0x01
 
#define OTI6858_REQ_SET_LINE   (USB_DIR_OUT | USB_TYPE_VENDOR | 0x00)
 
#define OTI6858_REQ_T_SET_LINE   0x00
 
#define OTI6858_REQ_CHECK_TXBUFF   (USB_DIR_IN | USB_TYPE_VENDOR | 0x01)
 
#define OTI6858_REQ_T_CHECK_TXBUFF   0x00
 
#define OTI6858_MAX_BAUD_RATE   3000000
 
#define FMT_STOP_BITS_MASK   0xc0
 
#define FMT_STOP_BITS_1   0x00
 
#define FMT_STOP_BITS_2   0x40 /* 1.5 stop bits if FMT_DATA_BITS_5 */
 
#define FMT_PARITY_MASK   0x38
 
#define FMT_PARITY_NONE   0x00
 
#define FMT_PARITY_ODD   0x08
 
#define FMT_PARITY_EVEN   0x18
 
#define FMT_PARITY_MARK   0x28
 
#define FMT_PARITY_SPACE   0x38
 
#define FMT_DATA_BITS_MASK   0x03
 
#define FMT_DATA_BITS_5   0x00
 
#define FMT_DATA_BITS_6   0x01
 
#define FMT_DATA_BITS_7   0x02
 
#define FMT_DATA_BITS_8   0x03
 
#define CONTROL_MASK   0x0c
 
#define CONTROL_DTR_HIGH   0x08
 
#define CONTROL_RTS_HIGH   0x04
 
#define TX_BUFFER_EMPTIED   0x09
 
#define PIN_MASK   0x3f
 
#define PIN_RTS   0x20 /* output pin */
 
#define PIN_CTS   0x10 /* input pin, active low */
 
#define PIN_DSR   0x08 /* input pin, active low */
 
#define PIN_DTR   0x04 /* output pin */
 
#define PIN_RI   0x02 /* input pin, active low */
 
#define PIN_DCD   0x01 /* input pin, active low */
 
#define OTI6858_CTRL_PKT_SIZE   sizeof(struct oti6858_control_pkt)
 
#define OTI6858_CTRL_EQUALS_PENDING(a, priv)
 

Functions

 MODULE_DEVICE_TABLE (usb, id_table)
 
 module_usb_serial_driver (serial_drivers, id_table)
 
 MODULE_DESCRIPTION (OTI6858_DESCRIPTION)
 
 MODULE_AUTHOR (OTI6858_AUTHOR)
 
 MODULE_VERSION (OTI6858_VERSION)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CONTROL_DTR_HIGH   0x08

Definition at line 101 of file oti6858.c.

#define CONTROL_MASK   0x0c

Definition at line 100 of file oti6858.c.

#define CONTROL_RTS_HIGH   0x04

Definition at line 102 of file oti6858.c.

#define FMT_DATA_BITS_5   0x00

Definition at line 94 of file oti6858.c.

#define FMT_DATA_BITS_6   0x01

Definition at line 95 of file oti6858.c.

#define FMT_DATA_BITS_7   0x02

Definition at line 96 of file oti6858.c.

#define FMT_DATA_BITS_8   0x03

Definition at line 97 of file oti6858.c.

#define FMT_DATA_BITS_MASK   0x03

Definition at line 93 of file oti6858.c.

#define FMT_PARITY_EVEN   0x18

Definition at line 90 of file oti6858.c.

#define FMT_PARITY_MARK   0x28

Definition at line 91 of file oti6858.c.

#define FMT_PARITY_MASK   0x38

Definition at line 87 of file oti6858.c.

#define FMT_PARITY_NONE   0x00

Definition at line 88 of file oti6858.c.

#define FMT_PARITY_ODD   0x08

Definition at line 89 of file oti6858.c.

#define FMT_PARITY_SPACE   0x38

Definition at line 92 of file oti6858.c.

#define FMT_STOP_BITS_1   0x00

Definition at line 85 of file oti6858.c.

#define FMT_STOP_BITS_2   0x40 /* 1.5 stop bits if FMT_DATA_BITS_5 */

Definition at line 86 of file oti6858.c.

#define FMT_STOP_BITS_MASK   0xc0

Definition at line 84 of file oti6858.c.

#define OTI6858_AUTHOR   "Tomasz Michal Lukaszewski <FIXME@FIXME>"

Definition at line 59 of file oti6858.c.

#define OTI6858_CTRL_EQUALS_PENDING (   a,
  priv 
)
Value:
(((a)->divisor == (priv)->pending_setup.divisor) \
&& ((a)->control == (priv)->pending_setup.control) \
&& ((a)->frame_fmt == (priv)->pending_setup.frame_fmt))

Definition at line 117 of file oti6858.c.

#define OTI6858_CTRL_PKT_SIZE   sizeof(struct oti6858_control_pkt)

Definition at line 116 of file oti6858.c.

#define OTI6858_DESCRIPTION   "Ours Technology Inc. OTi-6858 USB to serial adapter driver"

Definition at line 57 of file oti6858.c.

#define OTI6858_MAX_BAUD_RATE   3000000

Definition at line 82 of file oti6858.c.

#define OTI6858_REQ_CHECK_TXBUFF   (USB_DIR_IN | USB_TYPE_VENDOR | 0x01)

Definition at line 76 of file oti6858.c.

#define OTI6858_REQ_GET_STATUS   (USB_DIR_IN | USB_TYPE_VENDOR | 0x00)

Definition at line 70 of file oti6858.c.

#define OTI6858_REQ_SET_LINE   (USB_DIR_OUT | USB_TYPE_VENDOR | 0x00)

Definition at line 73 of file oti6858.c.

#define OTI6858_REQ_T_CHECK_TXBUFF   0x00

Definition at line 77 of file oti6858.c.

#define OTI6858_REQ_T_GET_STATUS   0x01

Definition at line 71 of file oti6858.c.

#define OTI6858_REQ_T_SET_LINE   0x00

Definition at line 74 of file oti6858.c.

#define OTI6858_VERSION   "0.2"

Definition at line 60 of file oti6858.c.

#define PIN_CTS   0x10 /* input pin, active low */

Definition at line 108 of file oti6858.c.

#define PIN_DCD   0x01 /* input pin, active low */

Definition at line 112 of file oti6858.c.

#define PIN_DSR   0x08 /* input pin, active low */

Definition at line 109 of file oti6858.c.

#define PIN_DTR   0x04 /* output pin */

Definition at line 110 of file oti6858.c.

#define PIN_MASK   0x3f

Definition at line 106 of file oti6858.c.

#define PIN_RI   0x02 /* input pin, active low */

Definition at line 111 of file oti6858.c.

#define PIN_RTS   0x20 /* output pin */

Definition at line 107 of file oti6858.c.

#define TX_BUFFER_EMPTIED   0x09

Definition at line 104 of file oti6858.c.

Function Documentation

MODULE_AUTHOR ( OTI6858_AUTHOR  )
MODULE_DESCRIPTION ( OTI6858_DESCRIPTION  )
MODULE_DEVICE_TABLE ( usb  ,
id_table   
)
MODULE_LICENSE ( "GPL"  )
module_usb_serial_driver ( serial_drivers  ,
id_table   
)
MODULE_VERSION ( OTI6858_VERSION  )