Hi al,
Short version of my question:
Is it possible for a Linux application to determine if a USB host is connected to its USB device port? If yes, what is the suggested method to make the determination?
Longer version:
We are running Linux on an AM1808-based embedded system. The system is powered from 5V that is provided to a USB mini-B connector. Power is provided either by a host PC OR by an external wall brick. Shortly after boot we would like to know whether power is being provided by the PC or by the wall brick. We're hoping there is some way to call into the Linux USB device driver stack running on the AM1808 to determine if a host is present or not present. If it would help in the determination process, the Linux application could install the Linux driver (module) that causes the AM1808 appear as a mass storage device to the PC.
Thanks,
Doug