Re: [RFC PATCH 0/2] USB OTG rework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 01, 2011 at 05:29:13PM +0300, Heikki Krogerus wrote:
> Hi guys,
> 
> 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?
Great ideas. So is it right that your OTG framework like below:

otg
	| otg.c
	| vendor_otg.c
	| phy.c
	| vendor_utmi.c
	| vendor_ulpi.c
gadget
	|vendor_udc.c
host
	|ehci-vendor.c

gadget/host's platform suspend/resume routine can call phy's suspend/resume.
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.
- 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?
> 
> 
> Heikki Krogerus (2):
>   usb: Add physical layer utility code
>   usb: otg: OTG 2.0 state machine
> 
>  drivers/usb/otg/otg.c   |  787 +++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/usb/otg/phy.c   |  376 ++++++++++++++++++++++
>  include/linux/usb/otg.h |  120 +++++++
>  include/linux/usb/phy.h |  227 ++++++++++++++
>  4 files changed, 1510 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/usb/otg/phy.c
>  create mode 100644 include/linux/usb/phy.h
> 
> -- 
> 1.7.4.1
> 
> --
> 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
> 

-- 

Best Regards,
Peter Chen

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux