struct_usb_device_driver(9)

struct_usb_device_driver9

Identifies usb device driver to usbcore

Usage

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;

Members

name

The driver name should be unique among USB drivers, and should normally be the same as the module name.

probe

Called to see if the driver is willing to manage a particular device. If it is, probe returns zero and uses dev_set_drvdata to associate driver-specific data with the device. If unwilling to manage the device, return a negative errno value.

disconnect

Called when the device is no longer accessible, usually because it has been (or is being) disconnected or the driver's module is being unloaded.

suspend

Called when the device is going to be suspended by the system.

resume

Called when the device is being resumed by the system.

drvwrap

Driver-model core structure wrapper.

supports_autosuspend

if set to 0, the USB core will not allow autosuspend for devices bound to this driver.

Overview

USB drivers must provide all the fields listed above except drvwrap.

Releases

6 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.