请输入您要查询的百科知识:

 

词条 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_device_driver - identifies USB device 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

* 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.

*

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

*/

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/27 23:59:37