---
name: "usb_function_deactivate"
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_function_deactivate"
---

# usb\_function\_deactivate(9)

prevent function and gadget enumeration

## NAME

usb\_function\_deactivate - prevent function and gadget enumeration

## SYNOPSIS

**int usb\_function\_deactivate(struct usb\_function \*** *function***);**

## ARGUMENTS

*function*

the function that isn't yet ready to respond

## DESCRIPTION

Blocks response of the gadget driver to host enumeration by preventing the data line pullup from being activated. This is normally called during *bind*() processing to change from the initial “ready to respond” state, or when a required resource becomes available.

For example, drivers that serve as a passthrough to a userspace daemon can block enumeration unless that daemon (such as an OBEX, MTP, or print server) is ready to handle host requests.

Not all systems support software control of their USB peripheral data pullups.

Returns zero on success, else negative errno.

## AUTHOR

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

Author.

## COPYRIGHT
