Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
mos7720.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/serial.h>
#include <linux/serial_reg.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/uaccess.h>
#include <linux/parport.h>

Go to the source code of this file.

Data Structures

struct  moschip_port
 
struct  divisor_table_entry
 

Macros

#define DRIVER_VERSION   "2.1"
 
#define DRIVER_AUTHOR   "Aspire Communications pvt Ltd."
 
#define DRIVER_DESC   "Moschip USB Serial Driver"
 
#define MOS_WDR_TIMEOUT   (HZ * 5)
 
#define MOS_MAX_PORT   0x02
 
#define MOS_WRITE   0x0E
 
#define MOS_READ   0x0D
 
#define SERIAL_IIR_RLS   0x06
 
#define SERIAL_IIR_RDA   0x04
 
#define SERIAL_IIR_CTI   0x0c
 
#define SERIAL_IIR_THR   0x02
 
#define SERIAL_IIR_MS   0x00
 
#define NUM_URBS   16 /* URB Count */
 
#define URB_TRANSFER_BUFFER_SIZE   32 /* URB Size */
 
#define USB_VENDOR_ID_MOSCHIP   0x9710
 
#define MOSCHIP_DEVICE_ID_7720   0x7720
 
#define MOSCHIP_DEVICE_ID_7715   0x7715
 
#define LCR_BITS_MASK   0x03 /* Mask for bits/char field */
 
#define LCR_STOP_MASK   0x04 /* Mask for stop bits field */
 
#define LCR_PAR_MASK   0x38 /* Mask for parity field */
 

Enumerations

enum  mos_regs {
  THR, RHR, IER, FCR,
  ISR, LCR, MCR, LSR,
  MSR, SPR, DLL, DLM,
  DPR, DSR, DCR, ECR,
  SP1_REG, SP2_REG, PP_REG, SP_CONTROL_REG
}
 

Functions

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

Macro Definition Documentation

#define DRIVER_AUTHOR   "Aspire Communications pvt Ltd."

Definition at line 43 of file mos7720.c.

#define DRIVER_DESC   "Moschip USB Serial Driver"

Definition at line 44 of file mos7720.c.

#define DRIVER_VERSION   "2.1"

Definition at line 42 of file mos7720.c.

#define LCR_BITS_MASK   0x03 /* Mask for bits/char field */
#define LCR_PAR_MASK   0x38 /* Mask for parity field */
#define LCR_STOP_MASK   0x04 /* Mask for stop bits field */
#define MOS_MAX_PORT   0x02

Definition at line 49 of file mos7720.c.

#define MOS_READ   0x0D

Definition at line 51 of file mos7720.c.

#define MOS_WDR_TIMEOUT   (HZ * 5)

Definition at line 47 of file mos7720.c.

#define MOS_WRITE   0x0E

Definition at line 50 of file mos7720.c.

#define MOSCHIP_DEVICE_ID_7715   0x7715

Definition at line 78 of file mos7720.c.

#define MOSCHIP_DEVICE_ID_7720   0x7720

Definition at line 77 of file mos7720.c.

#define NUM_URBS   16 /* URB Count */

Definition at line 60 of file mos7720.c.

#define SERIAL_IIR_CTI   0x0c

Definition at line 56 of file mos7720.c.

#define SERIAL_IIR_MS   0x00

Definition at line 58 of file mos7720.c.

#define SERIAL_IIR_RDA   0x04

Definition at line 55 of file mos7720.c.

#define SERIAL_IIR_RLS   0x06

Definition at line 54 of file mos7720.c.

#define SERIAL_IIR_THR   0x02

Definition at line 57 of file mos7720.c.

#define URB_TRANSFER_BUFFER_SIZE   32 /* URB Size */

Definition at line 61 of file mos7720.c.

#define USB_VENDOR_ID_MOSCHIP   0x9710

Definition at line 76 of file mos7720.c.

Enumeration Type Documentation

enum mos_regs
Enumerator:
THR 
RHR 
IER 
FCR 
ISR 
LCR 
MCR 
LSR 
MSR 
SPR 
DLL 
DLM 
DPR 
DSR 
DCR 
ECR 
SP1_REG 
SP2_REG 
PP_REG 
SP_CONTROL_REG 

Definition at line 128 of file mos7720.c.

Function Documentation

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