lkml.org 
[lkml]   [2012]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectEnabling multiple gadgets on top of composite driver
Hi,

I have a query regarding enabling multiple gadgets (like g_webcam, g_zero etc..)
on top of the Composite driver.

My use case is very simple:
- I want to expose a USB composite device to a standard USB host, where
the Composite device supports a webcam gadget + zero gadget + some other gadget..

On the older kernels like 2.6.27, this was easily possible, but the latest
gadget code doesn't seem to support the same:
- I can see that first a 'choicemenu' is provided which allows selection of only
one gadget at a time.

- The "common" stuff like "composite.c", "epautoconfig.c" have been included in
each f_* function driver (for e.g. f_uvc.c, f_sourcesink.c, etc..), so even if
I somehow tweak the 'choicemenu' stuff, I get redeclaration errors.

- If I somehow separate the "common" stuff and compile the same separately and
then compile zero gadget, webcam gadget etc.., I see that the 'usb_composite_probe'
call of only the 1st gadget passes correctly, but from the 2nd gadget driver
onwards as 'composite' is already present the following check in 'usb_composite_probe'
fails:

if(!driver || !driver->dev || !bind || composite)
return -EINVAL;

I am hoping someone else must also have faced an issue like this before..

What is the best way to enable multiple gadgets (like g_webcam, g_zero etc..)
on top of the Composite driver or am I missing something here?

Regards,
Bhupesh




\
 
 \ /
  Last update: 2012-04-13 12:55    [W:0.031 / U:1.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site