Hi all ! I need some help about USB. My company has a self-made board that we want to use as an USB peripheral. For some reasons, we are still in kernel version 2.6.31.14 and we use a ISP1504. To use the board in a peripheral mode, we use the module "fsl_usb2_udc" and "g_file_storage". It works fine but we switch with the "g_ether" module too. For that, we would like to load the module (chosen by the user) only when the USB cable is plugged into a computer (so only when it is in use). I need some help about it. Is there some information/events that I can read to know when the USB cable has been plugged ? I wanted to see around the USB power but I don't really understand how it works. It seems to be linked with SRP but I am not sure of that and where to read this information ! Can I detect when the host has powered the peripheral via USB ? And, for you, is it better to keep modules always loaded and removed it only when the user wants to switch (for example, always load the modules "fsl_usb2_udc" and "g_file_storage" by default and change the "g_file_storage" by "g_ether" only when the user wants to) or always load the "fsl_usb2_udc" and load the module "g_ether" or "g_file_storage" only when the user wants to use the USB (and so when there is a USB cable plugged) and remove the modules once the user has finished (and so unplugged the cable) ? Thank you in advance for any help ! :) -- Mylène JOSSERAND -- 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