Hi, On Tue, Dec 6, 2011 at 10:50 AM, Ondrej Wisniewski <ondrej.wisniewski@xxxxxxxxx> wrote: > Hi, > > so if I understand this correctly, there is no possibility to detect the > connection state today? > Thanks for taking up the discussion. It would be very handy to have this > feature. Please have a look at the "usb_moded". https://meego.gitorious.org/meego-middleware/usb_moded "Usb_moded is a relatively simple daemon which tracks the usb cable connection status and activates a certain USB profile based on that." Warm Regards, Maxin B. John > > > On 12/05/2011 05:19 PM, Alan Stern wrote: >> >> On Mon, 5 Dec 2011, Ondrej Wisniewski wrote: >> >>> Hi all, >>> >>> I am using the /g_file_storage/gadget driver. I was wondering if it is >>> possible to detect if a cable (and USB host) is connected to the USB >>> device port. >>> >>> Looks like the driver prints the following message to dmesg when the >>> host is connected: >>> g_file_storage gadget: full speed config #1 >> >> This is really just a side effect. The gadget driver itself isn't very >> aware of when the gadget is connected to a host. The UDC driver is >> responsible for all that stuff. >> >>> But there is no message when it is disconnected. So how can I check the >>> current status of the connection. Is there some status file in sysfs I >>> can look at? >>> Any other possibility? >> >> Felipe, Sebastian, this sounds like a good candidate for something to >> be added to the UDC core framework. Perhaps a pollable sysfs file >> containing the current connection/PHY status? The UDC driver would >> merely have to invoke a new core routine whenever the status changed. >> >> 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 -- 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