Hi, On Mon, Aug 01, 2011 at 05:29:13PM +0300, Heikki Krogerus wrote: > I want to hear you opinion before going ahead with this. These are > ideas for small architectural changes to the OTG utility we currently > have in Linux. > > The ideas I'm suggesting are these: > > > Separate USB transceivers from the OTG utility > > This would clarify things. Now we have these "otg drivers" that deal > with the controller and the transceiver. They are confusing and hard > to maintain (the langwell_otg.c as an example). Usually the > transceiver drivers are quite simple and the transceivers in most > cases completely autonomous. In most cases they also don't have to > deal with any of the OTG related tasks at all. If I remember > correctly, Felipe already suggested this some time ago. > > > Support for USB charging > > This is only an idea how I would do it. The utility has one > usb_charger per transceiver and the chargers will implement a power > supply. There are still issues that need to be addressed but nothing > too bad. I'm sure that you guys agree that it's time we had the > support for USB charging already. > > > OTG state machine provided by the utility > > I'm quite sure that you agree that this is a good idea. There is > nothing preventing us from doing it like this and there are so many > benefits that come with it. > > > We planned to implement a new platform independent driver for the > ChipIdea UDC, the one with four drivers in Linux at the moment, and > use these utilities with it. Since this is only adding new utility, > old drivers don't need to be converted immediately. > > I already have several questions, but before asking them, I really > would like to hear you are OK with this design. > > What do you guys think? I would start by splitting <linux/usb/otg.h> into things which are really otg specific and things are only related to transceivers... then I would rename struct otg_transceiver to struct usb_xceiv (yeah, I hate typing long names :-) only then I would start adding the PHY layer. Also, keep in mind that this will be a gigantic amount of work and all drivers in mainline need to be changed :-( I will review the two patches tomorrow... but here's my first 2 cents :-D -- balbi
Attachment:
signature.asc
Description: Digital signature