种豆资源网

当前位置:首页 > 百科 > 百科综合 / 正文

usb_driver

(2021-07-02 19:00:04) 百科综合

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.

标 签

搜索
随机推荐

Powered By 种豆资源网||