USB_COMPOSITE_PROBE
Section: Kernel Mode Gadget API (9)
Updated: February 2011
Index
Return to Main Contents
NAME
usb_composite_probe - register a composite driver
SYNOPSIS
-
int usb_composite_probe(struct usb_composite_driver * driver, int (*bind) (struct usb_composite_dev *cdev));
ARGUMENTS
driver
-
- the driver to register
bind
-
the callback used to allocate resources that are shared across the whole device, such as string IDs, and add its configurations using
usb_add_config(). This may fail by returning a negative errno value; it should return zero on successful initialization.
CONTEXT
single threaded during gadget setup
DESCRIPTION
This function is used to register drivers using the composite driver framework. The return value is zero, or a negative errno value. Those values normally come from the driver's
bind
method, which does all the work of setting up the driver to match the hardware.
On successful return, the gadget is ready to respond to requests from the host, unless one of its components invokes
usb_gadget_disconnect
while it was binding. That would usually be done in order to wait for some userspace participation.
AUTHOR
David Brownell <dbrownell@users.sourceforge.net>
-
Author.
COPYRIGHT