on July 19, 2007 - 1:24am
.\" Title: usb_gadget_disconnect
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1
.\" Date: July 2007
.\" Manual: Kernel Mode Gadget API
.\" Source: Kernel Hackers Manual 2.6.22
.\"
.TH "USB_GADGET_DISCONNEC" "9" "July 2007" "Kernel Hackers Manual 2.6.22" "Kernel Mode Gadget API"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
usb_gadget_disconnect \- software\-controlled disconnect from USB host
.SH "SYNOPSIS"
.HP 26
.BI "int usb_gadget_disconnect(struct\ usb_gadget\ *\ " "gadget" ");"
.SH "ARGUMENTS"
.TP 3n
\fIgadget\fR
the peripheral being disconnected
.SH "DESCRIPTION"
.PP
Disables the D+ (or potentially D\-) pullup, which the host may see as a disconnect (when a VBUS session is active). Not all systems support software pullup controls.
.PP
This routine may be used during the gadget driver
\fBbind\fR
call to prevent the peripheral from ever being visible to the USB host, unless later
\fBusb_gadget_connect\fR
is called. For example, user mode components may need to be activated before the system can talk to hosts.
.PP
Returns zero on success, else negative errno.
.SH "AUTHOR"
.PP
\fBDavid\fR \fBBrownell\fR
.sp -1n
.IP "" 3n
Author.
.SH "COPYRIGHT"