Re: configfs hierarchy (WAS: Re: [RFCv4 PATCH 02/13] usb: gadget: Add USB Functions Gadget)

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

 



On Mon, 26 Nov 2012, Sebastian Andrzej Siewior wrote:

> On 11/26/2012 05:57 PM, Alan Stern wrote:
> > On Mon, 26 Nov 2012, Sebastian Andrzej Siewior wrote:
> >
> >> Step two is a folder where we setup individual configuration of a function.
> >>
> >> /functions/ttyS0
> >> /functions/ttyS1
> >> /functions/storage
> >>
> >> each one of the function folder has the file called "name". So for the
> >> folder ttyS0 the file name contains "acm" because we use the ACM
> >> function. The same is true for ttyS1 and for storage we write
> >> "mass_storage" if that is what function will be called.

> >> After name is written it will request the module and special
> >> configuration related files pop up. For ACM it will be almost nothing
> >> while for storage we get nofua or something like that and we will be
> >> able to create the lunX folder.
> >
> > Is there really any significant configuration to be done at this level?
> > I would expect functions to be written so that different settings can
> > be applied to different instances.
> >
> > For example, if a config had two mass-storage interfaces, they should
> > be configurable separately.  There should be very little, or nothing,
> > that would apply across all the instances.
> 
> I don't follow. acm_ttyS0 and acm_ttyS1 are different instances and can
> have different settings. The first one comes up with GS0 the latter
> with GS1 as its node name.
> Same would apply to mass storage.
> Is it possible that I missed your point?

It's more likely that I missed your point.  :-)

In your example, what files would appear under under
/functions/storage?  I gather that the "storage" part is just a
placeholder name with no real meaning.  The meaning is conveyed
when the user writes "mass_storage" to /functions/storage/name.

When this happens, would the additional files created in this directory
be those required specifically by the mass_storage function driver?  
And nothing else?

On the other hand, why have two separate directories for
/functions/ttyS0 and /functions/ttyS1?  Aren't these two different
instances of the same function?  So if the user then writes "acm"  to
/functions/ttyS0/name and /functions/ttyS1/name, wouldn't your
framework get an error when it tried to load the acm function module a
second time?

Alan Stern

--
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