lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <D5ECB3C7A6F99444980976A8C6D896384FA41864D4@EAPEX1MAIL1.st.com>
Date:	Mon, 16 Apr 2012 16:15:00 +0800
From:	Bhupesh SHARMA <bhupesh.sharma@...com>
To:	"balbi@...com" <balbi@...com>
Cc:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stern@...land.harvard.edu" <stern@...land.harvard.edu>
Subject: RE: Enabling multiple gadgets on top of composite driver

Hi Felipe,

> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@...com]
> Sent: Friday, April 13, 2012 4:29 PM
> To: Bhupesh SHARMA
> Cc: balbi@...com; gregkh@...uxfoundation.org; linux-
> usb@...r.kernel.org; linux-kernel@...r.kernel.org;
> stern@...land.harvard.edu
> Subject: Re: Enabling multiple gadgets on top of composite driver
> 
> On Fri, Apr 13, 2012 at 06:51:26PM +0800, Bhupesh SHARMA wrote:
> > 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..
> 
> look at how nokia.c does it.

Ok.
 
> > 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.
> 
> Answer M instead of Y to "USB Gadget Drivers"
> 
> > 	- 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.
> 
> yeah, that still needs to be cleaned up. The story behind that is very
> long.
> 
> > 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?
> 
> Either you want multiple gadgets or you want a composite gadget, what
> is it ? If you want a composite gadget, you need to write a small C
> file which combines multiple functions together (see nokia.c), if you
> want multiple gadget drivers, just make them all modules. I always
> compile all gadget drivers as modules and can use any one of them at
> any time.
> 

Thanks for your help.
I need to support multiple functions over a composite gadget. I will now
have a quick look at the 'nokia.c' driver.

Regards,
Bhupesh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ