Does having the udc commands in your driver control this? You can set a gpio for .udc_is_connected...when connected it runs UDC_CMD_CONNECT and when unpluged runs udc disconnect. In the connect/dissconnect you can put your usb gpios to reset those on connect and disconnet...don't know if this will work though, i will test it out later.
Does having the udc commands in your driver control this? You can set a gpio for .udc_is_connected...when connected it runs UDC_CMD_CONNECT and when unpluged runs udc disconnect. In the connect/dissconnect you can put your usb gpios to reset those on connect and disconnet...don't know if this will work though, i will test it out later.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/arm/mach-pxa/balloon3.c;h=20822934251400437fe58738d1565aa795f44504;hb=refs/heads/master
312 static void balloon3_udc_command(int cmd)
313 {
314 if (cmd == PXA2XX_UDC_CMD_CONNECT)
315 UP2OCR |= UP2OCR_DPPUE | UP2OCR_DPPUBE;
316 else if (cmd == PXA2XX_UDC_CMD_DISCONNECT)
317 UP2OCR &= ~UP2OCR_DPPUE;
318 }
319
320 static int balloon3_udc_is_connected(void)
321 {
322 return 1;
323 }
324
325 static struct pxa2xx_udc_mach_info balloon3_udc_info __initdata = { 326 .udc_command = balloon3_udc_command, 327 .udc_is_connected = balloon3_udc_is_connected, 328 .gpio_pullup = -1,
329 };
330
331 static void __init balloon3_udc_init(void)
332 {
333 pxa_set_udc_info(&balloon3_udc_info);
334 platform_device_register(&balloon3_gpio_vbus);
335 }
336 #else
337 static inline void balloon3_udc_init(void) {}
338 #endif
339
I found this patch(on the bottom of the page), but I'm not exactly sure if this will help.