[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120703161523.GB23380@arwen.pp.htv.fi>
Date: Tue, 3 Jul 2012 19:15:24 +0300
From: Felipe Balbi <balbi@...com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Kyungmin Park <kyungmin.park@...sung.com>,
Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joel Becker <jlbec@...lplan.org>,
Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [RFC 0/2] USB gadget - configfs
On Mon, Jun 25, 2012 at 10:11:43AM -0400, Alan Stern wrote:
> On Sun, 24 Jun 2012, Sebastian Andrzej Siewior wrote:
>
> > On 06/21/2012 12:55 PM, Andrzej Pietrasiewicz wrote:
> > > $ echo 1> /cfg/usb-function-gadget/G1/connect
> > > $ file.img> /cfg/usb-function-gadget/G1/C1/F1/f_mass_storage/lun0/file
> >
> > connect should be available at UDC level which triggers the
> > pull-up/down of the UDC. The gadget itself should be configured once
> > and made available / bound to the UDC. And you may have more
> > than once UDC at a time within a single a system.
> >
> > > Each function, after creating its corresponding directory
> > > (/cfg/usb-function-gadget/G1/C1/F1), must be "personalized" by storing
> > > its name in the "name" attribute. After that it is possible to create
> > > a child item of the same name ("f_mass_storage" here). The common code
> > > handles everything from top of the hierarchy up to the function directory.
> > > Under the function directory a function-specific stuff provided by each
> > > function is used. The function-specific code is abstracted by the above
> > > mentioned struct ufg_fn. In the example, the mass storage function is
> > > supplied with one LUN.
> >
> > The hierarchy looks good. C1 vs config1 is just taste.
>
> My taste prefers "config1". Same for "gadget1" and "func1" (or
> "function1"). Words -- even short or abbreviated words -- are a lot
> more meaningful to people than single letters are.
I agree with Alan here, though I'd prefer function1 instead of func1.
> > > 4. Do we need module parameters for USB descriptors like iManufacturer
> > > and similar?
> > No. No modules parameters at all. With one exception: Currently we set
> > those things via modprobe. As a for compatibility interface I guess we
> > have to keep this. In the end I would like have f_mass_storage gone as
> > it. We would have a new gadget_storage which provides only the function
> > and relies on configfs module and nothing else. The replacement
> > g_mass_storage would simply be a small module which takes the
> > iManufacturer parameters and others and configures the gadget the way
> > the old gadget did i.e. without echo this and echo that.
>
> In any case, iManufacturer should not be adjustable by the user. It
> should always be managed by the composite-gadget layer, since it
> contains nothing but the index number of the Manufacturer string
> descriptor.
that's a misname, actually. The iManufacturer parameter is waiting for
the actual manufacturer string.
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists