summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/u_serial.h
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-06-19 18:18:40 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 15:16:06 -0700
commit4d5a73dc39c1e1d8ba5feec5c6234ae920c59161 (patch)
tree266b131a87231e5905f4ee4d974e9a47467595b1 /drivers/usb/gadget/u_serial.h
parent097db1d034b0927056f3d9e844dc80b3ba881765 (diff)
usb gadget serial: split out CDC ACM function
Split out CDC ACM parts of "gadget serial" to a "function driver". Some key structural differences from the previous ACM support, shared with with the generic serial function (next patch): - As a function driver, it can be combined with other functions. One gadget configuration could offer both serial and network links, as an example. - One serial port can be exposed in multiple configurations; the /dev/ttyGS0 node could be exposed regardless of which config the host selected. - One configuration can expose multiple serial ports, such as ttyGS0, ttyGS1, ttyGS2, and ttyGS3. This code should be a lot easier to understand than the previous all-in-one-big-file version of the driver. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/u_serial.h')
-rw-r--r--drivers/usb/gadget/u_serial.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/gadget/u_serial.h b/drivers/usb/gadget/u_serial.h
index bc38e68d0f2..83b45a3801f 100644
--- a/drivers/usb/gadget/u_serial.h
+++ b/drivers/usb/gadget/u_serial.h
@@ -12,10 +12,7 @@
#ifndef __U_SERIAL_H
#define __U_SERIAL_H
-/* #include <linux/usb/composite.h> */
-#include <linux/usb/ch9.h>
-#include <linux/usb/gadget.h>
-
+#include <linux/usb/composite.h>
#include <linux/usb/cdc.h>
/*
@@ -32,7 +29,7 @@
* REVISIT someday, allow multiplexing several TTYs over these endpoints.
*/
struct gserial {
- /* struct usb_function func; */
+ struct usb_function func;
/* port is managed by gserial_{connect,disconnect} */
struct gs_port *ioport;
@@ -59,4 +56,7 @@ void gserial_cleanup(void);
int gserial_connect(struct gserial *, u8 port_num);
void gserial_disconnect(struct gserial *);
+/* functions are bound to configurations by a config or gadget driver */
+int acm_bind_config(struct usb_configuration *c, u8 port_num);
+
#endif /* __U_SERIAL_H */