RE: Gadget tool proposition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@xxxxxx]
> Sent: Thursday, October 31, 2013 4:23 PM
> To: Krzysztof Opasiak
> Cc: balbi@xxxxxx; linux-usb@xxxxxxxxxxxxxxx; 'Matt Porter'
> Subject: Re: Gadget tool proposition
> 
> Hi,
> 
> On Thu, Oct 31, 2013 at 01:35:45PM +0100, Krzysztof Opasiak wrote:
> > > > Dear List,
> > > >
> > > > After introduction of ConfigFS composite gadget, there
> appeared
> > > an gap
> > > > in the user space. I mean that without this file system,
> creation
> > > of
> > > > gadget is as simple as:
> > > >
> > > > 	$ modprobe g_<gadget_module> [params]
> > > >
> > > > But when we are trying to use ConfigFS we have to write a lot
> of
> > > > commands. The minimal set is:
> > > >
> > > >       $ mkdir <gadget name>
> > > >       $ mkdir configs/<config name>.<config number>
> > > >       $ mkdir functions/<fucion type>.<instance name>
> > > >       $ ln -s functions/<fucion> configs/<configuration>
> > > >       $ echo <udc name> > UDC
> > > >       + setting vendorID, productID and others
> > >
> > > not entirely true. not at all!!! We have provided stubs for the
> > > gadget drivers which were already in tree and you can still use
> > > modprobe g_mass_storage, etc.
> >
> > Ok, fine, but it's done only for backward compatibility. The main
> > method of gadget creation should be configFS.
> 
> yes, this is what I said on line below
> 
> > > For new gadgets, then sure, they need to be done via configfs.
> > >

Not exactly. In my opinion we should tell all around that method
'modprobe g_mass_storage' works but is obsolete and works only due to
backward compatibility. I think that not only new gadgets should be
created using configFS. We should provide gadget templates for modules
which are currently in mainline and encourage users to use them so they
can notice that there is ConfigFS and it is good practice to use it.

> >  Great, I hope you will enjoy using the new tool when it will be
> ready.
> 
> sure, for testing purposes it's awesome, but when building a real
> device, I'd expect application framework to use libgadget directly
> and use your tool as a reference implementation.
> 

Yes. In my opinion loading gadgets from template is so basic think that
at least one format of templates should be supported by library. So I
would like to implement a functions like:

usbg_load_gadget_template(int fd, /*additional params*/);
usbg_load_func_template(int fd, /*additional params*/);
usbg_load_config_template(int fd, /*additional params*/);

This let all applications which will use libusbg to use that same
templates as gadget tool. 

-- 
BR's
Krzysiek


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux