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

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

 



On Tue, Aug 02, 2011 at 12:29:22PM +0300, Heikki Krogerus wrote:
> 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)
> 
Great, then, the controller's driver can call phy's driver's export functions.
> > > > - 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.
You mean phy.c take charge of charge detect? So, does the phy.c will register 
charger interrupt handler or vbus interrupt handler? 
my meaning of pull up dp is the enable charger detector at phy, 
in that case, the dp will be around 0.6v. This charger should be enabled
before charger detect routine, and disabled after charger detect routine
or the signal will be poor.
> 
> Br,
> 
> -- 
> heikki
> 

-- 

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