diff options
Diffstat (limited to 'drivers/usb/gadget/u_serial.h')
-rw-r--r-- | drivers/usb/gadget/u_serial.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/gadget/u_serial.h b/drivers/usb/gadget/u_serial.h index 7b561138f90e..af3910d01aea 100644 --- a/drivers/usb/gadget/u_serial.h +++ b/drivers/usb/gadget/u_serial.h | |||
@@ -23,8 +23,7 @@ | |||
23 | * style I/O using the USB peripheral endpoints listed here, including | 23 | * style I/O using the USB peripheral endpoints listed here, including |
24 | * hookups to sysfs and /dev for each logical "tty" device. | 24 | * hookups to sysfs and /dev for each logical "tty" device. |
25 | * | 25 | * |
26 | * REVISIT need TTY --> USB event flow too, so ACM can report open/close | 26 | * REVISIT at least ACM could support tiocmget() if needed. |
27 | * as carrier detect events. Model after ECM. There's more ACM state too. | ||
28 | * | 27 | * |
29 | * REVISIT someday, allow multiplexing several TTYs over these endpoints. | 28 | * REVISIT someday, allow multiplexing several TTYs over these endpoints. |
30 | */ | 29 | */ |
@@ -41,8 +40,17 @@ struct gserial { | |||
41 | 40 | ||
42 | /* REVISIT avoid this CDC-ACM support harder ... */ | 41 | /* REVISIT avoid this CDC-ACM support harder ... */ |
43 | struct usb_cdc_line_coding port_line_coding; /* 9600-8-N-1 etc */ | 42 | struct usb_cdc_line_coding port_line_coding; /* 9600-8-N-1 etc */ |
43 | |||
44 | /* notification callbacks */ | ||
45 | void (*connect)(struct gserial *p); | ||
46 | void (*disconnect)(struct gserial *p); | ||
47 | int (*send_break)(struct gserial *p, int duration); | ||
44 | }; | 48 | }; |
45 | 49 | ||
50 | /* utilities to allocate/free request and buffer */ | ||
51 | struct usb_request *gs_alloc_req(struct usb_ep *ep, unsigned len, gfp_t flags); | ||
52 | void gs_free_req(struct usb_ep *, struct usb_request *req); | ||
53 | |||
46 | /* port setup/teardown is handled by gadget driver */ | 54 | /* port setup/teardown is handled by gadget driver */ |
47 | int gserial_setup(struct usb_gadget *g, unsigned n_ports); | 55 | int gserial_setup(struct usb_gadget *g, unsigned n_ports); |
48 | void gserial_cleanup(void); | 56 | void gserial_cleanup(void); |