我们先看下面一段代码: static struct usb_driver usb_storage_driver = { .owner = THIS_MODULE, .name = \"usb-storage\", .probe = storage_probe, .disconnect = storage_disconnect, .id_table = storage_usb_ids, }; 1. 2. 3. 4. 5. 6. 我们在阅读GNU/Linux内核代码时,我们会经常遇到上述...
我们先看下面一段代码: staticstructusb_driverusb_storage_driver={.owner=THIS_MODULE,.name=\"usb-storage\",.probe=storage_probe,.disconnect=storage_disconnect,.id_table=storage_usb_ids,}; 我们在阅读GNU/Linux内核代码时,我们会经常遇到上述这样一种特殊的结构初始化方式,这种方式称为指定初始化。这种初...
我们先看下面一段代码: staticstructusb_driverusb_storage_driver={.owner=THIS_MODULE,.name=\"usb-storage\",.probe=storage_probe,.disconnect=storage_disconnect,.id_table=storage_usb_ids,}; 我们在阅读GNU/Linux内核代码时,我们会经常遇到上述这样一种特殊的结构初始化方式,这种方式称为指定初始化。这种初...
@@ -4790,10 +4790,8 @@ static struct usb_driver btusb_driver = { .disable_hub_initiated_lpm = 1, #ifdef CONFIG_DEV_COREDUMP .drvwrap = { .driver = { .coredump = btusb_coredump, }, .driver = { .coredump = btusb_coredump, }, #endif }; 2 changes: 1 addition & 1 deletion ...
* A USB controller is usually a PCI device, for example. The device model * represents the actual connections between buses and the devices they control. * A bus is represented by the bus_type structure. It contains the name, the
static struct usb_driver usb_storage_driver = { .owner = THIS_MODULE, .name = "usb-storage", .probe = storage_probe, .disconnect = storage_disconnect, .id_table = storage_usb_ids, }; 乍⼀看,这与我们之前学过的结构体初始化差距甚远。其实这就是前⾯所说的指定初始化在Linux设备驱动程序...
USB_DEVICE(vendor, product) 创建一个structusb_device_id, 可用来只匹配特定供应商和产品 ID 值. 这是非常普遍用的, 对于需要特定驱动的 USB 设备. USB_DEVICE_VER(vendor, product, lo, hi) 创建一个structusb_device_id, 用来在一个版本范围中只匹配特定供应商和产品 ID 值. ...
相比PCI、USB,它主要用于描述SOC上的片上资源。platform 所描述的资源有一个共同点:在CPU 的总线上直接取址。 平台设备会分到一个名称(用在驱动绑定中)以及一系列诸如地址和中断请求号(IRQ)之类的资源。 设备用platform_device表示,驱动用platform_driver进行注册。
USBH_HOST_DRIVER_INST;1516typedefstructUSBH_GLOBAL {17U8 ConfigCompleted;18U8 InitCompleted;19USBH_HC_HANDLE hHC;//Context for the host controller driver20USBH_HC_BD_HANDLE hHCBD;//Handle of the bus driver of a host controller21USBH_HOST_DRIVER_INST DriverInst;//22USBH_HOST_DRIVER * ...
usb_client_attach(9F) usb_client_detach(9F) usb_clr_feature(9F) usb_create_pm_components(9F) usb_free_bulk_req(9F) usb_free_ctrl_req(9F) usb_free_descr_tree(9F) usb_free_dev_data(9F) usb_free_intr_req(9F) usb_free_isoc_req(9F) usb_get_addr(9F) usb_get_alt_if(9F) usb_ge...