Subject: Re: USB device attachment
To: Chris G. Demetriou <email@example.com>
From: Lennart Augustsson <firstname.lastname@example.org>
Date: 07/23/1999 23:15:34
"Chris G. Demetriou" wrote:
> this seems reasonable. i wish both SCSI and PCI had 'target'/'card'
> abstractions like this, actually.
> One question:
> How does a 'compound' device present itself to the user?
Every USB device has a number of pipes, at least one (pipe 0, the control
pipe) and at most 16. A pipe can be thought of as a communication channel
to part of the device. The pipes are divided into subsets, called interfaces.
All interfaces share the control pipes, but have distinct pipes otherwise.
Normally there is just one interface, but there might be several like for
my keyboard&mouse. Or for an audio device where the mixer has one
interface and the audio data stream another.
So at the raw driver level you would only see the device as having its
pipes, at least 1 and at most 16 (I've implemented it with multiple device
nodes using the 4 lower bits of the minor number to distingush the pipes).
A user of the raw driver must read the descriptors and figure out how
the interfaces are set up.
(BTW, the account of USB devices above is a little simplified as it does
not take configurations or alternate interface settings into account.)