X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fusb-serial.h;h=d1f0c4057fa61e88be238a5cd0ac8ff99e388487;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=e2e59560d7fb8f3173d33b07df73929d64668fab;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h index e2e59560d..d1f0c4057 100644 --- a/drivers/usb/serial/usb-serial.h +++ b/drivers/usb/serial/usb-serial.h @@ -74,6 +74,11 @@ * @interrupt_in_urb: pointer to the interrupt in struct urb for this port. * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe * for this port. + * @interrupt_out_buffer: pointer to the interrupt out buffer for this port. + * @interrupt_out_size: the size of the interrupt_out_buffer, in bytes. + * @interrupt_out_urb: pointer to the interrupt out struct urb for this port. + * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe + * for this port. * @bulk_in_buffer: pointer to the bulk in buffer for this port. * @read_urb: pointer to the bulk in struct urb for this port. * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this @@ -99,7 +104,13 @@ struct usb_serial_port { struct urb * interrupt_in_urb; __u8 interrupt_in_endpointAddress; + unsigned char * interrupt_out_buffer; + int interrupt_out_size; + struct urb * interrupt_out_urb; + __u8 interrupt_out_endpointAddress; + unsigned char * bulk_in_buffer; + int bulk_in_size; struct urb * read_urb; __u8 bulk_in_endpointAddress; @@ -134,10 +145,9 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void * @minor: the starting minor number for this device * @num_ports: the number of ports this device has * @num_interrupt_in: number of interrupt in endpoints we have + * @num_interrupt_out: number of interrupt out endpoints we have * @num_bulk_in: number of bulk in endpoints we have * @num_bulk_out: number of bulk out endpoints we have - * @vendor: vendor id of this device - * @product: product id of this device * @port: array of struct usb_serial_port structures for the different ports. * @private: place to put any driver specific information that is needed. The * usb-serial driver is required to manage this data, the usb-serial core @@ -152,10 +162,9 @@ struct usb_serial { unsigned char num_ports; unsigned char num_port_pointers; char num_interrupt_in; + char num_interrupt_out; char num_bulk_in; char num_bulk_out; - __u16 vendor; - __u16 product; struct usb_serial_port * port[MAX_NUM_PORTS]; struct kref kref; void * private; @@ -187,6 +196,8 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) * of the devices this structure can support. * @num_interrupt_in: the number of interrupt in endpoints this device will * have. + * @num_interrupt_out: the number of interrupt out endpoints this device will + * have. * @num_bulk_in: the number of bulk in endpoints this device will have. * @num_bulk_out: the number of bulk out endpoints this device will have. * @num_ports: the number of different ports this device will have. @@ -219,6 +230,7 @@ struct usb_serial_device_type { char *short_name; const struct usb_device_id *id_table; char num_interrupt_in; + char num_interrupt_out; char num_bulk_in; char num_bulk_out; char num_ports; @@ -238,7 +250,7 @@ struct usb_serial_device_type { /* serial function calls */ int (*open) (struct usb_serial_port *port, struct file * filp); void (*close) (struct usb_serial_port *port, struct file * filp); - int (*write) (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); + int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count); int (*write_room) (struct usb_serial_port *port); int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); void (*set_termios) (struct usb_serial_port *port, struct termios * old); @@ -250,6 +262,7 @@ struct usb_serial_device_type { int (*tiocmset) (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear); void (*read_int_callback)(struct urb *urb, struct pt_regs *regs); + void (*write_int_callback)(struct urb *urb, struct pt_regs *regs); void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs); void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs); }; @@ -277,7 +290,7 @@ static inline void usb_serial_console_exit (void) { } /* Functions needed by other parts of the usbserial core */ extern struct usb_serial *usb_serial_get_by_index (unsigned int minor); extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); -extern int usb_serial_generic_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); +extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); extern int usb_serial_generic_write_room (struct usb_serial_port *port); extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);