traditional syscalls with DRIVER_MODULE ????
kc5vdj.freebsd at gmail.com
Tue May 24 21:19:33 UTC 2011
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
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
More information about the freebsd-usb