diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-05-08 17:51:43 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-16 17:32:21 -0700 |
commit | dcf0105039660e951dfea348d317043d17988dfc (patch) | |
tree | 17b7748bf83e08da5da530a257a81cc044110e91 /include/linux/usb | |
parent | 0693196fe7bbb5e6cafd255dfce91ff6d10bc18f (diff) | |
download | linux-3.10-dcf0105039660e951dfea348d317043d17988dfc.tar.gz linux-3.10-dcf0105039660e951dfea348d317043d17988dfc.tar.bz2 linux-3.10-dcf0105039660e951dfea348d317043d17988dfc.zip |
USB: serial: add generic wait_until_sent implementation
Add generic wait_until_sent implementation which polls for empty
hardware buffers using the new port-operation tx_empty.
The generic implementation will be used for all sub-drivers that
implement tx_empty but does not define wait_until_sent.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/serial.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index afbb7eeaac5..302ddf55d2d 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h @@ -269,6 +269,7 @@ struct usb_serial_driver { void (*break_ctl)(struct tty_struct *tty, int break_state); int (*chars_in_buffer)(struct tty_struct *tty); void (*wait_until_sent)(struct tty_struct *tty, long timeout); + bool (*tx_empty)(struct usb_serial_port *port); void (*throttle)(struct tty_struct *tty); void (*unthrottle)(struct tty_struct *tty); int (*tiocmget)(struct tty_struct *tty); @@ -328,6 +329,8 @@ extern void usb_serial_generic_close(struct usb_serial_port *port); extern int usb_serial_generic_resume(struct usb_serial *serial); extern int usb_serial_generic_write_room(struct tty_struct *tty); extern int usb_serial_generic_chars_in_buffer(struct tty_struct *tty); +extern void usb_serial_generic_wait_until_sent(struct tty_struct *tty, + long timeout); extern void usb_serial_generic_read_bulk_callback(struct urb *urb); extern void usb_serial_generic_write_bulk_callback(struct urb *urb); extern void usb_serial_generic_throttle(struct tty_struct *tty); |