I can think of two ways and hopefully some knows a better way:
1. Monitor the /var/log/messages file to see when the gadget is connected. Seems simple but inelegant. 2. Use gadgetfs to have a user space driver app that can monitor for a new connection. When a new connection is detected it can unmount the sd card and load the file backed storage module and exit. The host would see a device appear (gadgetfs), then disappear (gadgetfs) and then a new device appear (file backed storage). This also seems a little weird but should be workable. I hope someone else can give a better solution. Sincerely, Chase Maupin Software Applications Catalog DSP Products e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> phone: (281) 274-3285 ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Briggs Sent: Friday, August 08, 2008 2:24 PM To: [email protected] Subject: DM6446 USB peripheral mode - detect hotplug events I'm hoping someone can offer a direction here. I have a DM6446 and am using the USB controller as a peripheral and the g_file_storage module to present the internal SD card as a disk device to a PC. Is there a recommended way to detect when the PC connects? Ultimately, I would like to be able to have the embedded app use the sd card until the PC connects, drop the local mount point, let the PC connect update some files, and then the embedded app take over when the PC disconnects. Is this even possible? -tom -------------------------------------------------------- Tom Briggs [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
_______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
