On Thu, Jan 18, 2007 at 08:20:33PM +0100, Gildas Bayard wrote: > Hello, > > I'm trying to understand how USB works on Linux and I'm getting > confused about special devices: > - Documentation/devices.txt says that major 189 is for "USB serial > converters - alternate devices" but any usb device seems to have this > major (as I figure out from /dev/usb/00x/00x kind of special file). Am > I right in assuming that devices.txt lags?
Yes, it does. > - looking in the source I can see that 2 majors are defined for USB > #define USB_MAJOR 180 > #define USB_DEVICE_MAJOR 189 > Could someone tell me which one is used when? USB_MAJOR is for drivers that register with the USB core asking for a major number. USB_DEVICE_MAJOR is for usbfs's interaction with userspace. > - if I want to write a user side driver, do I have to use > /proc/bus/usb/00x/00x or /dev/usb/00x/00x? What are the differences? Neither, if you use libusb, you will not need to care about either. Just be aware that on some distros the proc/... files are not present anymore due to security issues. That is why they show up in two places. Hope this helps, greg k-h ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel