'\" t .\" Title: struct usb_device_driver .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Host-Side Data Types and Macros .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "STRUCT USB_DEVICE_DR" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Host-Side Data Types and Macro" .\" ----------------------------------------------------------------- .\" * 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" struct_usb_device_driver \- identifies USB device driver to usbcore .SH "SYNOPSIS" .sp .nf struct usb_device_driver { const char * name; int (* probe) (struct usb_device *udev); void (* disconnect) (struct usb_device *udev); int (* suspend) (struct usb_device *udev, pm_message_t message); int (* resume) (struct usb_device *udev, pm_message_t message); struct usbdrv_wrap drvwrap; unsigned int supports_autosuspend:1; }; .fi .SH "MEMBERS" .PP name .RS 4 The driver name should be unique among USB drivers, and should normally be the same as the module name\&. .RE .PP probe .RS 4 Called to see if the driver is willing to manage a particular device\&. If it is, probe returns zero and uses \fBdev_set_drvdata\fR to associate driver\-specific data with the device\&. If unwilling to manage the device, return a negative errno value\&. .RE .PP disconnect .RS 4 Called when the device is no longer accessible, usually because it has been (or is being) disconnected or the driver\*(Aqs module is being unloaded\&. .RE .PP suspend .RS 4 Called when the device is going to be suspended by the system\&. .RE .PP resume .RS 4 Called when the device is being resumed by the system\&. .RE .PP drvwrap .RS 4 Driver\-model core structure wrapper\&. .RE .PP supports_autosuspend .RS 4 if set to 0, the USB core will not allow autosuspend for devices bound to this driver\&. .RE .SH "DESCRIPTION" .PP USB drivers must provide all the fields listed above except drvwrap\&. .SH "COPYRIGHT" .br