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

_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to