2002-06-12 05:26:11

by Adam Luchjenbroers

[permalink] [raw]
Subject: Parallel Port and USB Device Drivers

Could someone tell me where I can find some documentation regarding
implementing LPT and USB device drivers.

Also, is it possible to have a function called timed to the LPT output (since
LPT data rates are very slow it would be more efficient for the driver to be
called when the port is ready to output the next byte instead of having it
perform a few delay loops).

Any information regarding how I'd go about building these drivers as kernel
modules would be nice.

And just a quick theoretical question.

How does the Linux kernel cope with the Pentium 4 clock throttling feature
given that it uses bogomips for timing purposes?


2002-06-12 05:42:58

by Brad Hards

[permalink] [raw]
Subject: Re: Parallel Port and USB Device Drivers

On Wed, 12 Jun 2002 15:28, Adam Luchjenbroers wrote:
> Could someone tell me where I can find some documentation regarding
> implementing LPT and USB device drivers.
USB Printer Class spec + USS720 data sheet + a quick search of drivers/usb for
files called printer.c and uss720.c might help.

> Also, is it possible to have a function called timed to the LPT output
> (since LPT data rates are very slow it would be more efficient for the
> driver to be called when the port is ready to output the next byte instead
> of having it perform a few delay loops).
You normally get buffering with the device.

> Any information regarding how I'd go about building these drivers as kernel
> modules would be nice.
CONFIG_USB_PRINTER=m
CONFIG_USB_USS720=m
is probably enough :)

Brad
--
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.

2002-06-12 06:21:17

by Greg KH

[permalink] [raw]
Subject: Re: Parallel Port and USB Device Drivers

On Wed, Jun 12, 2002 at 02:58:54PM +0930, Adam Luchjenbroers wrote:
> Could someone tell me where I can find some documentation regarding
> implementing LPT and USB device drivers.

There's a document in the Documentation/DocBook/ directory called
writing_usb_drivers that should be a good place to start. Also take a
look at the linux-usb.org site, where a link to the (a bit outdated, but
still quite good) Linux USB Programmers guide is.

One of these days I'll merge the two...

Hope this helps,

greg k-h