aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/serial.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/serial.h')
-rw-r--r--include/linux/usb/serial.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 0ec50ba6213..c17eb64d721 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -59,6 +59,7 @@ enum port_dev_state {
59 * @bulk_out_buffer: pointer to the bulk out buffer for this port. 59 * @bulk_out_buffer: pointer to the bulk out buffer for this port.
60 * @bulk_out_size: the size of the bulk_out_buffer, in bytes. 60 * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
61 * @write_urb: pointer to the bulk out struct urb for this port. 61 * @write_urb: pointer to the bulk out struct urb for this port.
62 * @write_fifo: kfifo used to buffer outgoing data
62 * @write_urb_busy: port`s writing status 63 * @write_urb_busy: port`s writing status
63 * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this 64 * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
64 * port. 65 * port.
@@ -96,6 +97,7 @@ struct usb_serial_port {
96 unsigned char *bulk_out_buffer; 97 unsigned char *bulk_out_buffer;
97 int bulk_out_size; 98 int bulk_out_size;
98 struct urb *write_urb; 99 struct urb *write_urb;
100 struct kfifo *write_fifo;
99 int write_urb_busy; 101 int write_urb_busy;
100 __u8 bulk_out_endpointAddress; 102 __u8 bulk_out_endpointAddress;
101 103
@@ -238,9 +240,8 @@ struct usb_serial_driver {
238 int (*resume)(struct usb_serial *serial); 240 int (*resume)(struct usb_serial *serial);
239 241
240 /* serial function calls */ 242 /* serial function calls */
241 /* Called by console with tty = NULL and by tty */ 243 /* Called by console and by the tty layer */
242 int (*open)(struct tty_struct *tty, 244 int (*open)(struct tty_struct *tty, struct usb_serial_port *port);
243 struct usb_serial_port *port, struct file *filp);
244 void (*close)(struct usb_serial_port *port); 245 void (*close)(struct usb_serial_port *port);
245 int (*write)(struct tty_struct *tty, struct usb_serial_port *port, 246 int (*write)(struct tty_struct *tty, struct usb_serial_port *port,
246 const unsigned char *buf, int count); 247 const unsigned char *buf, int count);
@@ -261,6 +262,9 @@ struct usb_serial_driver {
261 be an attached tty at this point */ 262 be an attached tty at this point */
262 void (*dtr_rts)(struct usb_serial_port *port, int on); 263 void (*dtr_rts)(struct usb_serial_port *port, int on);
263 int (*carrier_raised)(struct usb_serial_port *port); 264 int (*carrier_raised)(struct usb_serial_port *port);
265 /* Called by the usb serial hooks to allow the user to rework the
266 termios state */
267 void (*init_termios)(struct tty_struct *tty);
264 /* USB events */ 268 /* USB events */
265 void (*read_int_callback)(struct urb *urb); 269 void (*read_int_callback)(struct urb *urb);
266 void (*write_int_callback)(struct urb *urb); 270 void (*write_int_callback)(struct urb *urb);
@@ -300,7 +304,7 @@ static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
300extern struct usb_serial *usb_serial_get_by_index(unsigned int minor); 304extern struct usb_serial *usb_serial_get_by_index(unsigned int minor);
301extern void usb_serial_put(struct usb_serial *serial); 305extern void usb_serial_put(struct usb_serial *serial);
302extern int usb_serial_generic_open(struct tty_struct *tty, 306extern int usb_serial_generic_open(struct tty_struct *tty,
303 struct usb_serial_port *port, struct file *filp); 307 struct usb_serial_port *port);
304extern int usb_serial_generic_write(struct tty_struct *tty, 308extern int usb_serial_generic_write(struct tty_struct *tty,
305 struct usb_serial_port *port, const unsigned char *buf, int count); 309 struct usb_serial_port *port, const unsigned char *buf, int count);
306extern void usb_serial_generic_close(struct usb_serial_port *port); 310extern void usb_serial_generic_close(struct usb_serial_port *port);