2010/6/3 Jon Povey <[email protected]>: > Hi, > > Did you mean to email privately or forgot list CC's? > My mistake.
> jean-philippe francois wrote: >> What is your use case ? >> I am having a similar problem, but without happy design foresight ;). >> >> I am only using the gadget role, but still I need to detect external >> connection. In my case it may be easier than yours. The use case is >> the following : >> >> When no USB host is connected, the mmc/sd card is mounted in /mmc. >> On USB host connection, I want to unmount /mmc, and give the >> correspondig block device to the file_storage_ gadget. >> >> I achieved this by monitoring '/sys/devices/platform/musb_hdrc/mode' >> in user space. > > We did similar using hotplug events on 2.6.10 for both mmc and usb storage. > But there is no hotplug event in gadget mode . >> What is your example case ? I am not familiar with OTG USB, and while >> I understand what A-B role switching >> means, I need a more practical example of what you are trying to >> achieve. > > It's a portable video recorder which you can plug a USB stick into to record. > You can also (swap cables and) plug into a PC, when it goes into gadget > serial mode to communicate with our setup software. > > We did this on 2.6.10 by having two sets of USB modules build in Host and > Peripheral mode, and our own driver monitor the ID pin and unload/reload > modules. It worked, but OTG would be cleaner, faster to switch and not > needing of nasty build time hacks. > So all the ID pin sensing is in addition to the DM OTG machinery, or is it a replacement for a malfunctionning OTG mode, where you kind of "manually" switch from one role to another ? > It's this, by the way: http://www.videovbox.co.uk/ > > -- > Jon Povey > [email protected] > > Racelogic is a limited company registered in England. Registered number > 2743719 . > Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, > Bucks, MK18 1TB . > > The information contained in this electronic mail transmission is intended by > Racelogic Ltd for the use of the named individual or entity to which it is > directed and may contain information that is confidential or privileged. If > you have received this electronic mail transmission in error, please delete > it from your system without copying or forwarding it, and notify the sender > of the error by reply email so that the sender's address records can be > corrected. The views expressed by the sender of this communication do not > necessarily represent those of Racelogic Ltd. Please note that Racelogic > reserves the right to monitor e-mail communications passing through its > network > > > _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
