On 11/28/2012 09:10 AM, Andrzej Pietrasiewicz wrote:
Here I understand it. This is to some point a limitation of the gadget
framework. We do know the number of interface that will be available
before we bind. We simply don't know the endpoint number. There are two
exceptions to what I just wrote:
- g_zero drops the ISO endpoints if the UDC has no UDC support for it.
This should not happen on-the-fly.
- UAC2 may want to make the number interfaces (and therefore configure
able) and function (play / record) configurable.
So do we know everything before bind or we don't?
After some sleep I think we do.
That was wrong. Pushing it into configs is better but I am not sure we
need it. I understand the need for things that pop later like interfaceXX
but couldn't the user manually create them if he needs them?
What name shall the user use? How to know which user-created directory
should correspond to which actual interface? If there are, say,
3 interfaces, what would:
$ mkdir interface873246
mean?
And in general, what would
$ mkdir rykcq1234
mean?
Let's go one directory deeper in the hierarchy and suppose there is
no programmatic directories creation. So we
$ cd interface<something>
so that we can create the endpoint directories.
And now what? What names shall the user use for the endpoint
directories? Oh, that's simple: just see what the endpoint
directories' names are. But wait, aren't we just creating them?
Please also see Michał's point about user interface.
Yeah I did. Now I'm okay with creating new directories but we should
keep this to a minimum and encode as much information possible in
directory's name.
Andrzej
Sebastian
--
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