Skip to contentSkip to conversation

Parallel Port and USB Device Drivers

DISCUSSION Adam Luchjenbroers 3 participants 3 messages Jun 12, 2002

lore
Share & tools
lore
#0 lore raw

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?

#1 lore raw
Quoted 2 lines · Adam Luchjenbroers

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.

Quoted 4 lines

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.

Quoted 2 lines

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

Signature · 1 line
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
#2 lore raw
In reply to Adam Luchjenbroers
Quoted 2 lines · Adam Luchjenbroers

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