Jay William Stubblefield

Creating a Linux Gadget USB Composite Device for i.MX28

Discussion created by Jay William Stubblefield on Mar 15, 2012
Latest reply on Mar 15, 2012 by Jay William Stubblefield

Does anyone know if I can create a Linux Gadget USB composite device? I am trying to create a device that can be both Mass Storage and a serial device at the same time. When I try to create a serial port when I already am using the OTG port for Mass Storage, I get a device busy message. I see that there is an option for "Multifunction Composite Gadget (EXPERIMENTAL)" under "USB Gadget Support" in the LTIB configuration. If I choose this option, how do I select/configure/use the Mass Storage and Serial option?

 

Here are the screen shot of the problem I'm talking about:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

root@freescale ~$ modprobe g_file_storage file=/fsg.block stall=0

g_file_storage gadget: File-backed Storage Gadget, version: 20 November 2008

g_file_storage gadget: Number of LUNs=1

g_file_storage gadget-lun0: ro=0, file: /fsg.block fsl-usb2-udc: bind to driver g_file_storage

root@freescale ~$ g_file_storage gadget: high speed config #1

g_file_storage gadget: high speed config #1

g_file_storage gadget: high speed config #1

 

root@freescale ~$ modprobe g_serial

modprobe: failed to load module g_serial (/lib/modules/2.6.35.3-571-gcca29a0/ker nel/drivers/usb/gadget/g_serial.ko): Device or resource busy

rroot@freescale ~$ rnmod g_file_storage

unregistered gadget driver 'g_file_storage'

 root@freescale ~$ modprobe g_serial

g_serial gadget: Gadget Serial v2.4

g_serial gadget: g_serial ready

fsl-usb2-udc: bind to driver g_serial

root@freescale ~$

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Outcomes