Skip to content
USB Gadget Configfs Library
C
Branch: master
Clone or download
tmlind and ohporter libusbg: Fix usbg_disable_gadget to actually clear the UDC
Currently usbg_disable_gadget() does not actually write anything
to UDC to clear it and the configured UDC name stays there.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Matt Porter <mporter@linaro.org>
Latest commit d800fae Sep 20, 2014
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc libusbg: doc: Add document about gadget schemes Sep 10, 2014
examples libusbg: Fix out-of-tree builds Sep 23, 2014
include/usbg libusbg: Add functions to get import error text and line Sep 10, 2014
m4 Initial release Sep 4, 2013
src libusbg: Fix usbg_disable_gadget to actually clear the UDC Sep 23, 2014
AUTHORS libusbg: update preferred email address Jan 21, 2014
COPYING Initial release Sep 4, 2013
COPYING.LGPL Initial release Sep 4, 2013
ChangeLog libusbg: tag v0.1.0 release Jan 21, 2014
DoxygenLayout.xml Initial release Sep 4, 2013
INSTALL libusbg: rename gadget_*() -> usbg_*(), libusbg, and usbg.h Jan 21, 2014
Makefile.am libusbg: rename gadget_*() -> usbg_*(), libusbg, and usbg.h Jan 21, 2014
NEWS Initial release Sep 4, 2013
README
acinclude.m4 Initial release Sep 4, 2013
aminclude.am Initial release Sep 4, 2013
configure.ac libusbg: Add dependency to libconfig Aug 22, 2014
doxygen.cfg libusbg: rename gadget_*() -> usbg_*(), libusbg, and usbg.h Jan 21, 2014
libusbg.pc.in libusbg: Add dependency to libconfig Aug 22, 2014

README

libusbg
-------

libusbg is a C library encapsulating the kernel USB gadget-configfs
userspace API functionality.

It provides routines for creating and parsing USB gadget devices using
the configfs API. Currently, all USB gadget configfs functions that can
be enabled in kernel release 3.11 (Linux for Workgroups!) are supported.

See the Doxygen docs and examples for complete details on the
programming API and INSTALL for installation of the library and
examples.

To run the examples:

$ mount -t configfs none /sys/kernel/config
$ gadget-acm-ecm
$ show-gadgets
ID 1d6b:0104 'g1'
  UDC			3f120000.usbotg
  bDeviceClass		0x00
  bDeviceSubClass	0x00
  bDeviceProtocol	0x00
  bMaxPacketSize0	0x40
  bcdDevice		0x0311
  bcdUSB		0x0000
  idVendor		0x1d6b
  idProduct		0x0104
  Serial Number		0123456789
  Manufacturer		Foo Inc.
  Product		Bar Gadget
  Function 'acm.usb0'
    port_num		0
  Function 'acm.usb1'
    port_num		1
  Function 'ecm.usb0'
    dev_addr		32:1b:dc:a4:bc:a2
    host_addr		82:b7:58:62:f6:31
    ifname		usb0
    qmult		5
  Configuration 'c.1'
    MaxPower		2
    bmAttributes	0x80
    configuration	CDC 2xACM+ECM
    acm.GS0 -> acm.usb0
    acm.GS1 -> acm.usb0
    ecm.usb0 -> ecm.usb0
You can’t perform that action at this time.