Date: Mon, 29 May 2006 17:01:39 +0200 From: Volker <volker@vwsoft.com> To: hackers@freebsd.org Subject: USB device with multiple interfaces, sample code anyone? Message-ID: <447B0CD3.1080309@vwsoft.com>
next in thread | raw e-mail | index | archive | help
Hi hackers, I'm trying to correctly implement a driver for an USB device which has multiple (serial) interfaces (at least 3). Each interface should be seen by the kernel as a tty device entry /dev(/cuaU* or /dev/ttyU*). After reading the usb kernel sources I'm not quite sure how to deal with that. As the device entry is being created in ucom.c (ucom_attach calls ttycreate) I'm not quite sure which code is responsible for scanning (enumerating) and correctly attaching to the usb device interfaces or if there's just a wrong enumeration return code. I haven't found any usb code which deals with more than 1 interface per usb device (except sound/pcm/uaudio but while doing a quick read of that code I do not understand much of uaudio). Does any of the hackers have a piece of sample code on how to scan usb device interfaces and attach a device file entry (/dev/) to it? Or any pseudo-code or graphical explanation on how the usb code is actually doing device enumeration? Thanks, Volker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?447B0CD3.1080309>