'\" t .\" Title: usb_add_function .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Kernel Mode Gadget API .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "USB_ADD_FUNCTION" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "Kernel Mode Gadget API" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" usb_add_function \- add a function to a configuration .SH "SYNOPSIS" .HP \w'int\ usb_add_function('u .BI "int usb_add_function(struct\ usb_configuration\ *\ " "config" ", struct\ usb_function\ *\ " "function" ");" .SH "ARGUMENTS" .PP \fIstruct usb_configuration * config\fR .RS 4 the configuration .RE .PP \fIstruct usb_function * function\fR .RS 4 the function being added .RE .SH "CONTEXT" .PP single threaded during gadget setup .SH "DESCRIPTION" .PP After initialization, each configuration must have one or more functions added to it\&. Adding a function involves calling its \fIbind\fR() method to allocate resources such as interface and string identifiers and endpoints\&. .PP This function returns the value of the function\*(Aqs \fBbind\fR, which is zero for success else a negative errno value\&. .SH "AUTHOR" .PP \fBDavid Brownell\fR <\&dbrownell@users.sourceforge.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br