[PARPORT] user-space drivers


Tim Waugh (tim@cyberelk.demon.co.uk)
Fri, 4 Jun 1999 09:06:02 +0100 (GMT)


The ppuser driver has to change, in order to keep in step with the parport
interface changes that will soon appear in 2.3.

I've been discussing this with one of the guys at VMware, and it came to
light that ppuser needed: (a) a way of being told to claim exclusive
access to the port, and (b) interrupt reporting.

Here's what I've come up with so far:

open do nothing, set up default IEEE 1284 protocol to be COMPAT
close release port and unregister device (if necessary)
ioctl
  EXCL register device exclusively (may fail)
  CLAIM (register device first time) parport_claim_or_block
  RELEASE parport_release
  MODE set the IEEE 1284 protocol to use for read/write
  DATADIR data_forward / data_reverse
  WDATA write_data
  RDATA read_data
  WCTR write_control
  RCTR read_control
  FCTR frob_control
  RSTR read_status
  NEGOT parport_negotiate
read/write read or write in current IEEE 1284 protocol
select wait for interrupt (readfds)

Here, select() just reports interrupts; it doesn't necessarily mean that
there is any data to read from the device.

Can anyone see any problems or improvements?

Tim.
*/

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Fri 04 Jun 1999 - 04:18:22 EDT