>> >> >> >> + /* Notify OTG disconnect event, only for USB device which is >> >> + * directly connected to root hub */ >> >> + if (udev->parent && udev->parent->parent == NULL) >> >> + otg_notify_event(USB_OTG_DISCON); >> > >> >I thought we went through this already, why not just use the _existing_ >> >notification process? No need to create your own here. >> > >> >> Hi Greg, >> >> Thanks for your help on code review. >> >> Could you help to tell me which existing notification process is >> recommended for this purpose? > >What's wrong with the existing driver core bus notifiers? Do you mean the usb_notifier_list defined in usb/core/notify.c? I think usb_notifier_list may not be the best one for below reasons: # usb_notifier_list is used for USB devices or USB bus being added or removed. It seems for USB host case. But the otg_notify_event function is defined as an unified interface for both USB host side and USB peripheral (gadget/udc) side. # usb_notifier_list is blocking_notifier and may not be time effective, not only OTG 1.3 but also OTG 2.0, there are a lot of timing requirement per spec. For some case, we need the event notification happened asap. So I add an unified interface here and then let each otg implementation to bind its actual handler for these events. # usb_notifier_list is now used by wusb/mon/usbdev/usbfs, but I think none of them really needs OTG events from the notifier. Please let me know if more comments. Thanks. Hao -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html