From: Felipe Balbi <balbi@ti.com>
To: Bhupesh SHARMA <bhupesh.sharma@st.com>
Cc: "balbi@ti.com" <balbi@ti.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>
Subject: Re: Enabling multiple gadgets on top of composite driver
Date: Fri, 13 Apr 2012 13:59:23 +0300 [thread overview]
Message-ID: <20120413105921.GM7154@arwen.pp.htv.fi> (raw)
In-Reply-To: <D5ECB3C7A6F99444980976A8C6D896384FA30FA942@EAPEX1MAIL1.st.com>
[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]
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.
> 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.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-04-13 11:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 10:51 Bhupesh SHARMA
2012-04-13 10:59 ` Felipe Balbi [this message]
2012-04-16 8:15 ` Bhupesh SHARMA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120413105921.GM7154@arwen.pp.htv.fi \
--to=balbi@ti.com \
--cc=bhupesh.sharma@st.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®