The Linux 2.4 Parallel Port Subsystem

Tim Waugh

      
     

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".


Table of Contents
1. Design goals
1.1. The problems
1.2. The solutions
2. Standard transfer modes
3. Structure
3.1. Sharing core
3.2. Parports and their overrides
3.3. IEEE 1284 transfer modes
3.4. Pardevices and parport_drivers
3.5. The IEEE 1284.3 API
4. Device driver's view
5. Port drivers
6. The printer driver
7. User-level device drivers
7.1. Introduction to ppdev
7.2. User-level or kernel-level driver?
7.3. Programming interface
7.3.1. Starting and stopping: open and close
7.3.2. Control: ioctl
7.3.3. Transferring data: read and write
7.3.4. Waiting for events: poll and select
7.4. Examples
A. Linux parallel port driver API reference
parport_device_num --  convert device coordinates
parport_device_coords --  convert canonical device number
parport_find_device --  find a specific device
parport_find_class --  find a device in a specified class
parport_register_driver --  register a parallel port device driver
parport_unregister_driver --  deregister a parallel port device driver
parport_get_port --  increment a port's reference count
parport_put_port --  decrement a port's reference count
parport_find_number --  find a parallel port by number
parport_find_base --  find a parallel port by base address
parport_register_device --  register a device on a parallel port
parport_unregister_device --  deregister a device on a parallel port
parport_open --  find a device by canonical device number
parport_close --  close a device opened with parport_open
parport_claim --  claim access to a parallel port device
parport_claim_or_block --  claim access to a parallel port device
parport_release --  give up access to a parallel port device
parport_yield --  relinquish a parallel port temporarily
parport_yield_blocking --  relinquish a parallel port temporarily
parport_negotiate --  negotiate an IEEE 1284 mode
parport_write --  write a block of data to a parallel port
parport_read --  read a block of data from a parallel port
parport_set_timeout --  set the inactivity timeout for a device
B. The Linux 2.2 Parallel Port Subsystem
C. GNU Free Documentation License