Hi all,
I have a problem using gadget usb on a MSC Q7 IMX6 board, with kernel 3.0.35 (revision 14.03.01 from MSC).
My device is connected to a Windows computer via usb, and everything works well if the usb cable is plugged BEFORE initiating the gadgetfs.
I can then unplug and plug again without problems.
If I plug the usb cable AFTER starting my application on the device I never get interrupts to configure the gadget.
I've searched for a patch, but found nothing.
Is there anything wrong in my understanding of the process, or did I miss a patch?
Here is dmesg:
*** the part I have in bith cases:
[ 1336.172033] gadgetfs: bound to fsl-usb2-udc driver
[ 1336.172039] Suspend udc for OTG auto detect
[ 1336.172058] j=103574 [fsl_otg_set_peripheral] ID pin=1
[ 1336.172061]
[ 1336.172075] USB Gadget resume begins
[ 1336.172081] fsl_udc_resume, Wait for wakeup thread finishes
[ 1336.172088] fsl_udc_resume(): stopped 1 suspended 1
[ 1336.175353] dr_controller_run: udc out low power mode
[ 1336.175360] USB Gadget resume ends
[ 1336.175366] fsl-usb2-udc: bind to driver gadgetfs
*** the following is only reached when the cable is plugged at init:
[ 1336.178409] suspend_irq begins
[ 1336.178416] gadgetfs: suspended from state 2
[ 1336.178427] suspend_irq ends
[ 1336.352873] suspend_irq begins
[ 1336.352880] gadgetfs: suspended from state 2
[ 1336.352890] suspend_irq ends
[ 1337.441513] gadgetfs: connected
[ 1337.445113] gadgetfs: disconnected
[ 1337.550344] gadgetfs: connected
[ 1337.565407] gadgetfs: configuration #1
[ 1337.565779] udc: fsl_ep_enable ep.name=ep1in
[ 1337.565957] udc: fsl_ep_enable ep.name=ep1out
Best regards
Olivier GERARD