Re: Adding OTG support to xHCI

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

 



On Tue, 21 Feb 2012, Pavan Kondeti wrote:

> Summary of the problem:
> 
> OTG driver monitors VBUS and ID lines. When VBUS is valid & ID is float,
> it activates gadget by calling usb_gadget_vbus_connect() API. When Id is
> grounded, OTG should activate HCD. But there is no standard USB core API
> for this. Some MSM SoC has ci13xxx USB controller in which host and
> device share the same register address space. To make
> sure that HCD never access (via sysfs/debugfs & runtime PM/system PM)
> hardware when peripheral mode is active, we unload HCD (usb_remove_hcd).
> When Id is groundedm HCD is loaded by calling usb_add_hcd(). This works
> great for Micro-A/B cable connect and disconnect. But we can not meet
> HNP (Host Negotiation Protocol i.e switching to host mode from
> peripheral mode) timings.
> 
> As per my knowledge, dwc has separate address space for host and gadget.
> So we might not need to completely load/unload HCD. But we should have
> an API in USB core or struct hc_driver to notify host that it is no
> longer active. But if we don't unload HCD completely, khubd exists for
> root hub and will be running for every system resume cycle. I am not
> sure of side-effects of it.

We ought to be able to inactivate the HCD by setting the root hub to
configuration 0 and then suspending it with wakeup disabled.  That will
take khubd out of the picture.  The HCD would have to avoid enabling
any interrupt sources in this situation.  Also, a little work would be
needed to avoid resuming the root hub during every system resume cycle,
but it wouldn't be too hard.

However, even then I don't know if we would be enable to meet the 
required HNP timings.

Alan Stern

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