---
name: "usb_add_function"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_add_function"
---

# usb\_add\_function(9)

add a function to a configuration

## NAME

usb\_add\_function - add a function to a configuration

## SYNOPSIS

**int usb\_add\_function(struct usb\_configuration \*** *config***, struct usb\_function \*** *function***);**

## ARGUMENTS

*config*

the configuration

*function*

the function being added

## CONTEXT

single threaded during gadget setup

## DESCRIPTION

After initialization, each configuration must have one or more functions added to it. Adding a function involves calling its *bind*() method to allocate resources such as interface and string identifiers and endpoints.

This function returns the value of the function's **bind**, which is zero for success else a negative errno value.

## AUTHOR

**David Brownell** \<dbrownell@users.sourceforge.net\>

Author.

## COPYRIGHT
