usb_driver

unix 驅動編程

結構體定義:void (*disconnect)(struct usb_interface *intf);

int (*ioctl) (struct usb_interface *intf, unsigned int code,

void *buf);

基本介紹

  • 中文名:usb_driver
  • void:disconnect
  • int:struct usb_interface *intf,
  • struct:usb_driver
適用平台,結構體定義,成員變數,

適用平台

unix 驅動編程

結構體定義

struct usb_driver
{
const char *name;
int (*probe) (struct usb_interface *intf,
const struct usb_device_id *id);
void (*disconnect)(struct usb_interface *intf);
int (*ioctl) (struct usb_interface *intf, unsigned int code,
void *buf);
int (*suspend) (struct usb_interface *intf, pm_message_tmessage);
int (*resume) (struct usb_device *udev, pm_message_tmessage);
struct usbdrv_wrap drvwrap;
unsigned int supports_autosuspend:1;
}

成員變數

/**
* struct usb_driver - identifies USB interface driver to usbcore
* @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
interface on a device. If it is, probe returns zero and uses
usb_set_intfdata() to associate driver-specific data with the
interface. It may also use usb_set_interface() to specify the
appropriate altsetting. If unwilling to manage the interface,
return -ENODEV, if genuine IO errors occured, an appropriate
negative errno value.

相關詞條

熱門詞條

聯絡我們