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? > 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 :) > My question is then: If you have a device with several endpoints, how do you > make it possible for the userspace application to address a specific > endpoint? Are there "standardized" methodes for this, or do I have to > implement it myself in my driver as ioctl's? "normally" a usb driver will present to userspace a device type that corresponds with the proper device. For example, the usb-serial drivers show up as a tty device, the usb-storage driver presents a scsi disk, the usb printer driver presents a lpr port, the usb video drivers present a v4l device, etc. So for every type of device, a different model is used. So my first question is the most important one, what kind of devices are you writing a driver for? That will dictate the kind of interface you use. > When using register_chrdev() on normal char-devices you can use 0 to get > dynamic assignments (IMHO you should unless you have a device with an > assigned majornumber). Is there a similar scheme in USB (for the minornumer > in struct usb_driver)? No, USB does not have that kind of interface right now. Hope this helps, greg k-h _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel