在网上搜索了很长时间发现init_module的注册函数都是usb_gadget_register_drive,而我的zero.c中的注册函数为usb_composite_register.之后跟踪代码发现
int usb_composite_register(struct usb_composite_driver *driver)
{
if (!driver || !driver->dev || !driver->bind || composite)
return -EINVAL;
if (!driver->name)
driver->name = "composite";
composite_driver.function = (char *) driver->name;
composite_driver.driver.name = driver->name;
composite = driver;
return usb_gadget_register_driver(&composite_driver);
}
原来如此.特此记录.
原来如此.特此记录.