> From: Greg KH [mailto:[EMAIL PROTECTED]]
>
> On Mon, Dec 03, 2001 at 09:33:49AM +0100, Svein Erling Seldal wrote:
> > Hi,
> >
> > I'm making a generic linux device driver for some USB devices.
>
> What kind of devices?

Its for some generic USB development cards that I've built. They have no
official assigned VID/PID, and thus they will never be "public". Anyway,
we're talking about a couple of bulk endpoints and no predefined
class/protocol. The specific function that each endpoint performs is
dependent on the USB firmware and is not specified.

The purpose of the device driver is to provide a transparent link between
the userspace application and the bulk endpoint, as the driver will be used
for different cards with different functions. In windows this is solved by
opening the endpoint the user wants to talk to, e.g. \\.\avrusb0\in2 to
access avrusb device number 0, IN endpoint 2.

> > What is the "normal" convention of accessing the endpoints? I would
> > initially guess that the minor number would be perfect to
> access endpoint1,
> > endpoint2, etc. But I see from the list of major/minors that
> the "space" is
> > quite sparse, and thus you allocate only one minor number pr. device.
>
> No, you get 16 devices per driver.  But you have to convince us to give
> you a minor to use :)

Thats my point. You get "only" 16 devices pr. driver, and from what I've
seen, you allocate one minor # for each physical device present - up to a
total of 16 instances/cards. I need to be able to select which endpoint i
talk to from userspace. I've implemented this by issuing a special "Select
endpoint" ioctl. There seems to be the best way to do it.

Today I'm just using a random minor. This driver will never be commercially
available, thus I believe that its perfectly legal for me to just pick a
number. The ultimate solution would be for the driver to aquire a
minor-number dynamically.


Thanks, I got the answers I wanted.

Svein E. Seldal


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to