Commit graph

7 commits

Author SHA1 Message Date
Sebastian Andrzej Siewior cf9a08ae5a usb: gadget: convert source sink and loopback to new function interface
This patch converts the f_sourcesink and f_loopback file to the USB-function
module. Both functions shares a few common utility functions which are
currently implemented in g_zero.c itself. This patch moves the common
code into the sourcesink file and creates one module out of the the two
functions (source sink and loop back).
The g_zero gadget is function specific to source sink and loop back to
set a few options. This Symbol dependency enforces a modul load right
now.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-21 20:52:40 +02:00
Sebastian Andrzej Siewior 78f46f09a8 usb: gadget: move loopback's config descriptor out of f_loopback
f_loopback should only include the bare function but it also includes
the config descriptor. This patch moves the config descriptor into
zero.c, the only user of this function.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-21 20:52:39 +02:00
Sebastian Andrzej Siewior eeae54075c usb: gadget: move source sink's config descriptor out of f_sourcesink
f_sourcesink should only include the bare function but it also includes
the config descriptor. This patch moves the config descriptor into
zero.c, the only user of this function.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-21 20:52:38 +02:00
Paul Zimmerman b4036ccdd2 usb: gadget: add isochronous support to gadget zero
Add two isochronous endpoints to the gadget zero source/sink
function. They are enabled by selecting alternate interface 1, so
by default they are not enabled. Module parameters for setting all
the isoc endpoint characteristics are also provided.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04 15:53:08 +03:00
David Brownell ab943a2e12 USB: gadget: gadget zero uses new suspend/resume hooks
Use the new device-level suspend/resume hooks for Gadget Zero;
always enable them with the OTG test mode; and support remote
wakeup on both configurations even in non-OTG mode.

This ensures that both configurations can pass the USBCV remote
wakeup tests when the OTG test mode is enabled.  This changes
behavior by adding autoresume support to the loopback config
even in non-OTG mode; the test failure was that it didn't work
in OTG mode.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
David Brownell e5760fdac8 usb gadget zero: split out loopback config
This splits the gadget zero "loopback" configuration into a standalone
"configuration driver", building on the composite gadget framework code.
It doesn't yet pull the original code out of gadget zero or update how
that driver is built.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:03 -07:00
David Brownell a400cadc07 usb gadget zero: split out source/sink config
This splits the gadget zero "source/sink" configuration into a standalone
"configuration driver", building on the composite gadget framework code.
It doesn't yet pull the original code out of gadget zero or update how
that driver is built.

Neither this, nor its sibling "loopback" configuration, is a function
driver that can be combined with other functions.  (The host "usbtest"
driver wouldn't know how to deal with that!)  However the code becomes
simpler because of this conversion, so it's a net win.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:02 -07:00