On 11/26/2012 07:46 PM, Alan Stern wrote:
On Mon, 26 Nov 2012, Michal Nazarewicz wrote:
On Mon, Nov 26 2012, Alan Stern wrote:
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?
Specifically by a single instance.
Ah, now I see. I missed the part where Sebastian said that these
directories would be symlinked under
/gadgets/gadget1/default-configuration.
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?
This would just create another instance of the same function.
This actually gave me an idea. Why not:
mkdir functions/acm # the f_acm module is loaded
mkdir functions/acm/blah # instance of the function is created
That does seem to make more sense.
With one tiny detail:
I suggested
<function-name>_<common-name>
mkdir functions/acm_ttyS0
cat functions/acm_ttyS0/port_num
0
# assume acm_bind_config(c, 0);
mkdir functions/acm_ttyS1
cat functions/acm_ttyS1/port_num
1
# assume acm_bind_config(c, 1);
Alan Stern
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html