Re: [RFC PATCH] usb: gadget: composite: Provide list of registered functions

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

 



Hi,

On Thu, Nov 06, 2014 at 10:08:55AM +0100, Krzysztof Opasiak wrote:
> > From: Felipe Balbi [mailto:balbi@xxxxxx]
> > Sent: Wednesday, November 05, 2014 8:43 PM
> > To: Krzysztof Opasiak
> > Cc: balbi@xxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx;
> > bigeasy@xxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx;
> > s.wadas@xxxxxxxxxxx; k.lewandowsk@xxxxxxxxxxx;
> > andrzej.p@xxxxxxxxxxx; m.szyprowski@xxxxxxxxxxx
> > Subject: Re: [RFC PATCH] usb: gadget: composite: Provide list of
> > registered functions
> > 
> > On Mon, Oct 20, 2014 at 01:41:37PM +0200, Krzysztof Opasiak wrote:
> > > Driver which provides implementation of some USB functions
> > registers
> > > its usb_function_driver structure in framework.
> > > Function drivers are identifed using registered name.
> > >
> > > When gadget is composed user must know what names has been
> > 
> > "user *must" know", why ?
> 
> Because he has to create directory with suitable name. This means that
> he needs to know that Mass storage module has been registered as
> mass_storage, and that gadget zero provides functions registered as
> Loopback and SourceSink.
> 
> Let's say that you got system and kernel image. You may use uname -r to
> learn about kernel version, let's say that it is 3.17. You may also
> check what kernel modules has been provided with image. But how to learn
> which usb function has been build into kernel?
> 
> I see some analogy to filesystems. When you would like to use -t option
> in mount you have to know how Ext4 or Function FS has been registered in
> fs framework. Kernel allows you to learn about all loaded or build-in
> modules. You may simply do this using /proc/filesystems where you will
> get all fs names registered in kernel. So in a few steps:

that's a good analogy and you're starting to convince me of the need for
this interface.

> 1. I have some disk image with Ext4. I would like to know if I have
> support for this fs type in my kernel and what name should I use to -t
> option.
> 2. I check my kernel modules but Ext4 not found
> 3. cat /proc/filesystems and I see that yes there is Ext4 and it has
> been compiled-in my kernel and it has been registered as "ext4"
> 4. Now I have gather all information and I may simply mount -t ext4 ...
> 
> Don't you think that such scenario should be also doable with usb
> functions?
> 
> User ends up in empty functions dir of some gadget and what now? How to
> allow him to ask kernel what is available? How to learn what functions
> has been build-in and what names has been registered in framework? (ocf
> kernel config but it's not always available)

right, makes sense to me. Care to respin the patch ?

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux