1STRUCT USB_DEVICE_DR(9) Host-Side Data Types and Macro STRUCT USB_DEVICE_DR(9)
2
3
4

NAME

6       struct_usb_device_driver - identifies USB device driver to usbcore
7

SYNOPSIS

9       struct usb_device_driver {
10         const char * name;
11         int (* probe) (struct usb_device *udev);
12         void (* disconnect) (struct usb_device *udev);
13         int (* suspend) (struct usb_device *udev, pm_message_t message);
14         int (* resume) (struct usb_device *udev, pm_message_t message);
15         struct usbdrv_wrap drvwrap;
16         unsigned int supports_autosuspend:1;
17       };
18

MEMBERS

20       name
21           The driver name should be unique among USB drivers, and should
22           normally be the same as the module name.
23
24       probe
25           Called to see if the driver is willing to manage a particular
26           device. If it is, probe returns zero and uses dev_set_drvdata to
27           associate driver-specific data with the device. If unwilling to
28           manage the device, return a negative errno value.
29
30       disconnect
31           Called when the device is no longer accessible, usually because it
32           has been (or is being) disconnected or the driver's module is being
33           unloaded.
34
35       suspend
36           Called when the device is going to be suspended by the system.
37
38       resume
39           Called when the device is being resumed by the system.
40
41       drvwrap
42           Driver-model core structure wrapper.
43
44       supports_autosuspend
45           if set to 0, the USB core will not allow autosuspend for devices
46           bound to this driver.
47

DESCRIPTION

49       USB drivers must provide all the fields listed above except drvwrap.
50
52Kernel Hackers Manual 3.10         June 2019           STRUCT USB_DEVICE_DR(9)
Impressum