Date: Tue, 24 May 2011 16:19:27 -0500 From: Jim Bryant <kc5vdj.freebsd@gmail.com> To: freebsd-usb@freebsd.org Cc: freebsd-drivers@freebsd.org Subject: traditional syscalls with DRIVER_MODULE ???? Message-ID: <4DDC20DF.6060805@gmail.com>
next in thread | raw e-mail | index | archive | help
i'm in the process of both learning the driver interface and writing a usb driver for a multimedia product. i'm kind of stuck here, as i'm seeing two distinct, and possibly mutually exclusive interfaces here. the test framework i'm currently using is the DRIVER_MODULE macro, but it lacks the traditional syscalls provided by cdevsw (in particular, i'm wanting open, close, poll, read, and write). if i add such an interface to the current DRIVER_MODULE version, how would i go about *NOT* having DRIVER_MODULE create the devfs entries? i would prefer to have the devfs entries handled by make_dev, so to have access to the desired syscalls. the only thing in the usb framework using the cdevsw framework seems to be usb_dev.c, but it seems to be an abstraction, and not an end-device in the sense that i'm doing. any tips? any pointers? i've done a grep, and found that there is no existing driver that uses DRIVER_MODULE with any *_read, *_write, or *_close. i can do the job with ioctls, but doing so would rule out select in userland code, and for the interrupt endpoints, i would rather have a poll and read interface that allows for select(2) and read(2). also, i would like to thank hans selasky for the pointer to his meetbsd/krakow presentation on the usb stack, i did learn a couple of new things about capabilities from it, but it lacked the detail i'm looking for. jim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DDC20DF.6060805>