Hi Vamsi, For Otg perspective, you need to 1st implement USB Host, USB Gadget and then USB OTG driver, by using Linux USB core. About the Scenarios: when user want to use USB OTG, so at that time Host, Gadget and otg (in same order) should be loaded into the kernel or memory. So OTG can shift to the respective ROLE host or gadget. SRP if OTG want to start communication again with Gadget. HNP, if Otg want to reverse the ROLE like from Host to Gaget. In Freescale implementation they have given complete State machine So ur burden will reduce from implementation front. This will give u complete OTG. See this patch linux-2.6.16-mx31-usb-2.patch Regards Vivek -----Original Message----- From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Vamsi Krishna S Sent: Thursday, September 25, 2008 12:01 PM To: Greg KH Cc: kernelnewbies@xxxxxxxxxxxx Subject: Re: basic otg support >> I dont want to implmenent the HNP or SRP protocols but i would like to >> switch my driver mode to either Host or Peripheral based on cable type. >> >> if mini-A cable is connected i want to load host contoller driver and if >> mini b is connected i want to load a peripheral driver. >> >> is there any existing framework in linux for this scenario? >> > > There is support for doing this, but with the driver built in, not a > dynamic loading of the different modules depending on the cable. > I'm looking at the omap udc driver and isp1301 tarnsceiver driver on how to implement this functionality. But i have some questions: are there any specific scenarios where we require the host and udc driver always needs to be in the memory? will it be more modular and easy to understand if transceiver driver generates an event by which userspace can load the appropriate driver? are there any protocol(otg) restrictions which makes it difficult to implement the above approach? -vk PS:in future i want to extend my driver to support complete otg as well and i want to pick the best approach. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ