hi The USB controller in our SOC can support otg/ehci/udc, and there is a PHY around the controller. It means that when we want to enable otg or ehci or udc, we have to enable the PHY. Then i want to add a PHY driver, but the PHY does not bind to OTG. It means that if we want only udc fucntion, we still need the phy. The struct usb_phy has a pointer to usb_otg. To make use of the phy driver, can i have the following callings? 1. write a phy driver, and initialize phy->init and phy->shutdown. Then in probe function invoke usb_add_phy(phy, USB_PHY_TYPE_USB2) 2. in the udc driver in probe function, call usb_get_phy(USB_PHY_TYPE_USB2), and when want to start udc, call phy->init() to initialize the PHY, and when want to stop udc, call phy->shutdown to shutdown the phy when udc is started, and usally we will check whether phy->otg is NULL or not, if it is not NULL, invoke otg_set_peripheral to set the OTG to be device-B. It means that if we have otg enabled, the phy->otg will not be NULL, otherwise we only have udc supported. 3. in the otg driver in the probe function, initialize the otg(struct usb_otg), then call usb_get_phy(USB_PHY_TYPE_USB2), and set phy->otg = otg. 4. in the ehci driver in the probe function, call usb_get_phy(USB_PHY_TYPE_USB2), and when want to enable ehci, call phy->init first. when start ehci, we will check whether phy->otg is NULL or not, if it is not NULL, invoke otg_set_host to make otg be host-A. -- 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