Hi, On Tue, Aug 02, 2011 at 04:34:03PM +0800, Peter Chen wrote: > > > My questions are: > > > - The vendor_utmi.c will call usb_register_transceiver to register a phy, > > > how host matches a specific phys? At some platform, the otg host uses utmi, > > > but the host only port uses external ulpi phys. > > > > Interesting case. Do you mean that this platform has both a host only > > port and an otg port, or that this platform may come with host only > > port _or_ otg? How is it handled now? > > > One otg port and several host only port. > Most of platforms like this, the otg port for device (or otg) use, the host only > port for 3G use. Hmm, and since the host ports are ehci, how much need is there to interact with the controller in the code? Maybe I have misunderstood your question. You did notice that: The transceiver drivers: usb_register_trasceiver() The udc drivers and the host drivers: usb_get_transceiver(name of the transceiver) > > > - Usually, charger detect routine should be before bus enumeration due to > > > pullup dp will be used to detect charger. How your usb_charger_work co-work > > > with vendor_udc.c? > > > > The charger expects that the udc drivers have filled the link_connect > > and the link_data members. If you look at the usb_charger_work() you > > will see that with SDP and CDP the code always tries to call the > > link_connect hook after detection. > So the real charger detect code is at udc, the phy.c just get the result > of charger detect, then post this result to power class. No, not the udc. link_connect() hook is called _after detection_. The udc implements link_connect hook. It is used by the phy utility _after_ charger detection to notify it is safe to enable data pull ups and start the enumeration process. Br, -- heikki -- 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