On Fri, Aug 10, 2012 at 09:02:21AM +0000, Chen Peter-B29397 wrote: > > > > > > I am a little confused by using phy->state to stand for usb_state that > > I think > > > there is no relationship between usb_state with USB PHY. > > > > well, there's no relationship between usb_state and OTG. The state isn't > > OTG-specific, it's USB specific. This is a difficult detail to find the > > proper owner, but I don't think we should tie the state to OTG, because > > systems without OTG wouldn't be able to track their states too. > > > I mean USB PHY. I mean these USB specific states is no relationship > with USB PHY. > > In my mind, the system without OTG but using struct usb_phy can still > track their states. > > One thing I am always puzzled of current code is the OTG should be no > relationship with USB PHY. > The system without OTG but has USB device or host only function should > still own USB PHY. you don't need to tell me that. We're in the process of redesigning the PHY and OTG apis exactly for that. This is basically legacy from the original PHY patch (back from 2.6.18 or something) which added PHY support considering only OTG systems. At that time we only had these plug&play PHYs and likely no standard host controller on an embedded system. Anyway, it will take some time to finish converting everything, help's welcome though. -- balbi
Attachment:
signature.asc
Description: Digital signature