On Mon, 23 Jul 2012, Valentin Sitdikov wrote:

> Hello All,
> 
> Could somebody recommend me what is the standard way to share
> resources between host and gadget?

There isn't really any standard way.

> I have seen at least two implementation:
> 1. Using suspend/resume: OTG driver resumes or suspends host and
> device accordingly to otg state (value ID pin for example)
> 2. Device registration/unregistration: OTG driver
> registers/unregisters host device accordingly to otg state .
> 
> What is most preferable way to implement?

In my opinion the second way is better.  If all you do is suspend the 
host, someone might try to resume it at the wrong time.

> How should user-space applications handle possibility of switching
> between host and gadget mode (for example libusb if controller is
> working as gadget ?)

The same way they handle detection and removal of the host controller 
or the device controller.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to