Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
usb_serial_driver Struct Reference

#include <serial.h>

Data Fields

const chardescription
 
struct usb_device_idid_table
 
char num_ports
 
struct list_head driver_list
 
struct device_driver driver
 
struct usb_driver * usb_driver
 
struct usb_dynids dynids
 
size_t bulk_in_size
 
size_t bulk_out_size
 
int(* probe )(struct usb_serial *serial, const struct usb_device_id *id)
 
int(* attach )(struct usb_serial *serial)
 
int(* calc_num_ports )(struct usb_serial *serial)
 
void(* disconnect )(struct usb_serial *serial)
 
void(* release )(struct usb_serial *serial)
 
int(* port_probe )(struct usb_serial_port *port)
 
int(* port_remove )(struct usb_serial_port *port)
 
int(* suspend )(struct usb_serial *serial, pm_message_t message)
 
int(* resume )(struct usb_serial *serial)
 
int(* reset_resume )(struct usb_serial *serial)
 
int(* open )(struct tty_struct *tty, struct usb_serial_port *port)
 
void(* close )(struct usb_serial_port *port)
 
int(* write )(struct tty_struct *tty, struct usb_serial_port *port, const unsigned char *buf, int count)
 
int(* write_room )(struct tty_struct *tty)
 
int(* ioctl )(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
 
void(* set_termios )(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old)
 
void(* break_ctl )(struct tty_struct *tty, int break_state)
 
int(* chars_in_buffer )(struct tty_struct *tty)
 
void(* throttle )(struct tty_struct *tty)
 
void(* unthrottle )(struct tty_struct *tty)
 
int(* tiocmget )(struct tty_struct *tty)
 
int(* tiocmset )(struct tty_struct *tty, unsigned int set, unsigned int clear)
 
int(* get_icount )(struct tty_struct *tty, struct serial_icounter_struct *icount)
 
void(* dtr_rts )(struct usb_serial_port *port, int on)
 
int(* carrier_raised )(struct usb_serial_port *port)
 
void(* init_termios )(struct tty_struct *tty)
 
void(* read_int_callback )(struct urb *urb)
 
void(* write_int_callback )(struct urb *urb)
 
void(* read_bulk_callback )(struct urb *urb)
 
void(* write_bulk_callback )(struct urb *urb)
 
void(* process_read_urb )(struct urb *urb)
 
int(* prepare_write_buffer )(struct usb_serial_port *port, void *dest, size_t size)
 

Detailed Description

usb_serial_driver - describes a usb serial driver : pointer to a string that describes this driver. This string used in the syslog messages when a device is inserted or removed. : pointer to a list of usb_device_id structures that define all of the devices this structure can support. : the number of different ports this device will have. : minimum number of bytes to allocate for bulk-in buffer (0 = end-point size) : bytes to allocate for bulk-out buffer (0 = end-point size) : pointer to a function to determine how many ports this device has dynamically. It will be called after the probe() callback is called, but before attach() : pointer to the driver's probe function. This will be called when the device is inserted into the system, but before the device has been fully initialized by the usb_serial subsystem. Use this function to download any firmware to the device, or any other early initialization that might be needed. Return 0 to continue on with the initialization sequence. Anything else will abort it. : pointer to the driver's attach function. This will be called when the struct usb_serial structure is fully set set up. Do any local initialization of the device, or any private memory structure allocation at this point in time. : pointer to the driver's disconnect function. This will be called when the device is unplugged or unbound from the driver. : pointer to the driver's release function. This will be called when the usb_serial data structure is about to be destroyed. : pointer to the struct usb_driver that controls this device. This is necessary to allow dynamic ids to be added to the driver from sysfs.

This structure is defines a USB Serial driver. It provides all of the information that the USB serial core code needs. If the function pointers are defined, then the USB serial core code will call them when the corresponding tty port functions are called. If they are not called, the generic serial function will be used instead.

The driver.owner field should be set to the module owner of this driver. The driver.name field should be set to the name of this driver (remember it will show up in sysfs, so it needs to be short and to the point. Using the module name is a good idea.)

Definition at line 227 of file serial.h.

Field Documentation

int(* attach)(struct usb_serial *serial)

Definition at line 241 of file serial.h.

void(* break_ctl)(struct tty_struct *tty, int break_state)

Definition at line 266 of file serial.h.

size_t bulk_in_size

Definition at line 237 of file serial.h.

size_t bulk_out_size

Definition at line 238 of file serial.h.

int(* calc_num_ports)(struct usb_serial *serial)

Definition at line 242 of file serial.h.

int(* carrier_raised)(struct usb_serial_port *port)

Definition at line 278 of file serial.h.

int(* chars_in_buffer)(struct tty_struct *tty)

Definition at line 267 of file serial.h.

Definition at line 257 of file serial.h.

const char* description

Definition at line 228 of file serial.h.

void(* disconnect)(struct usb_serial *serial)

Definition at line 244 of file serial.h.

Definition at line 233 of file serial.h.

struct list_head driver_list

Definition at line 232 of file serial.h.

void(* dtr_rts)(struct usb_serial_port *port, int on)

Definition at line 277 of file serial.h.

struct usb_dynids dynids

Definition at line 235 of file serial.h.

int(* get_icount)(struct tty_struct *tty, struct serial_icounter_struct *icount)

Definition at line 273 of file serial.h.

struct usb_device_id* id_table

Definition at line 229 of file serial.h.

void(* init_termios)(struct tty_struct *tty)

Definition at line 281 of file serial.h.

int(* ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg)

Definition at line 262 of file serial.h.

char num_ports

Definition at line 230 of file serial.h.

Definition at line 256 of file serial.h.

int(* port_probe)(struct usb_serial_port *port)

Definition at line 247 of file serial.h.

int(* port_remove)(struct usb_serial_port *port)

Definition at line 248 of file serial.h.

int(* prepare_write_buffer)(struct usb_serial_port *port, void *dest, size_t size)

Definition at line 290 of file serial.h.

Definition at line 240 of file serial.h.

void(* process_read_urb)(struct urb *urb)

Definition at line 288 of file serial.h.

void(* read_bulk_callback)(struct urb *urb)

Definition at line 285 of file serial.h.

void(* read_int_callback)(struct urb *urb)

Definition at line 283 of file serial.h.

void(* release)(struct usb_serial *serial)

Definition at line 245 of file serial.h.

int(* reset_resume)(struct usb_serial *serial)

Definition at line 252 of file serial.h.

int(* resume)(struct usb_serial *serial)

Definition at line 251 of file serial.h.

Definition at line 264 of file serial.h.

Definition at line 250 of file serial.h.

void(* throttle)(struct tty_struct *tty)

Definition at line 268 of file serial.h.

int(* tiocmget)(struct tty_struct *tty)

Definition at line 270 of file serial.h.

int(* tiocmset)(struct tty_struct *tty, unsigned int set, unsigned int clear)

Definition at line 271 of file serial.h.

void(* unthrottle)(struct tty_struct *tty)

Definition at line 269 of file serial.h.

struct usb_driver* usb_driver

Definition at line 234 of file serial.h.

Definition at line 258 of file serial.h.

void(* write_bulk_callback)(struct urb *urb)

Definition at line 286 of file serial.h.

void(* write_int_callback)(struct urb *urb)

Definition at line 284 of file serial.h.

int(* write_room)(struct tty_struct *tty)

Definition at line 261 of file serial.h.


The documentation for this struct was generated from the following file: