On Wed, Jun 05, 2002 at 11:58:42PM -0400, Doug Alcorn wrote:
> Greg KH <[EMAIL PROTECTED]> writes:
> 
> > Nice, does the driver use the usb-storage spec, or is it a vendor
> > specific protocol?
> 
> The more I look at it the more I think it doesn't follow the
> mass-storage spec.  Keep in mind that I'm pretty new to all this.  So,
> it takes me about three to four times as long to figure this stuff out
> as Matt Dharm :).
> 
> This week I've been reading lots of documentation (both from DataPlay
> and on kernel hacking).  Is there a template for a usb device driver
> module that would be good to follow?  Alternatively, what is the
> smallest and simplest USB driver that's already existing.  I think I
> have a pretty good idea how/where to start.  It would just be helpful
> to have something easy to understand to follow.  As such, maybe the
> first thing I should do is write a drivers/usb/dummy_drv.[ch] that
> could serve as a template for future hackers too?

Already done, sorry: drivers/usb/usb-skeleton.c

Also see Documentation/DocBook/writing_usb_driver.* in the 2.5 tree for
an explanation of the skeleton driver.  And the USB Programmers guide
linked to off of linux-usb.org is quite good, if a bit out of date (it's
on my list of things to do to merge the two pieces of documentation and
put it in the kernel tree so it has a chance of keeping up to date...)

Also see the kernel api documentation (generated by 'make psdocs') in
the 2.5 tree.  There's a quite large USB section that is much more up to
date and correct than the 2.4 documentation is.  It will be part of the
2.5 backport to go into 2.4.20.

And after all of that, take a look at the different drivers themselves,
some are written quite well, others not :)  As most USB drivers are just
shims between the USB subsystem and another kernel subsystem (tty, scsi,
v4l, etc.) the size of the driver ranges depending on the usage, and the
specific protocol used by the device (see the size difference between
drivers/usb/serial/omninet.c and drivers/usb/serial/io_edgeport.c for
an example of the difference in protocol for the same kind of kernel
driver.)

Anyway, if you have any specific questions, the people on this list are
very helpful too.

Hope all of this helps,

greg k-h

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to