1 The `parport' code provides parallel-port support under Linux. This
2 includes the ability to share one port between multiple device
5 You can pass parameters to the parport code to override its automatic
6 detection of your hardware. This is particularly useful if you want
7 to use IRQs, since in general these can't be autoprobed successfully.
8 By default IRQs are not used even if they _can_ be probed. This is
9 because there are a lot of people using the same IRQ for their
10 parallel port and a sound card or network card.
12 The parport code is split into two parts: generic (which deals with
13 port-sharing) and architecture-dependent (which deals with actually
20 If you load the parport code as a module, say
24 to load the generic parport code. You then must load the
25 architecture-dependent code with (for example):
27 # insmod parport_pc.o io=0x3bc,0x378,0x278 irq=none,7,auto
29 to tell the parport code that you want three PC-style ports, one at
30 0x3bc with no IRQ, one at 0x378 using IRQ 7, and one at 0x278 with an
31 auto-detected IRQ. Currently, PC-style (parport_pc), Sun Ultra/AX
32 (parport_ax), Amiga, Atari, and MFC3 hardware is supported.
38 If you use kmod, you will find it useful to edit /etc/conf.modules.
39 Here is an example of the lines that need to be added:
41 post-install parport modprobe -k parport_pc
42 options parport_pc io=0x378,0x278 irq=7,auto
44 KMod will then automatically load parport_pc (with the options
45 "io=0x378,0x278 irq=7,auto") whenever a parallel port device driver
46 (such as lp) is loaded.
49 Parport probe [optional]
52 In 2.2 kernels there was a module called parport_probe, which was used
53 for collecting IEEE 1284 device ID information. This has now been
54 enhanced and now lives with the IEEE 1284 support. When a parallel
55 port is detected, the devices that are connected to it are analysed,
56 and information is logged like this:
58 parport0: Printer, BJC-210 (Canon)
60 The probe information is available from files in /proc/sys/dev/parport/.
63 Parport linked into the kernel statically
64 =========================================
66 If you compile the parport code into the kernel, then you can use
67 kernel boot parameters to get the same effect. Add something like the
68 following to your LILO command line:
70 parport=0x3bc parport=0x378,7 parport=0x278,auto,nofifo
72 You can have many `parport=...' statements, one for each port you want
73 to add. Adding `parport=0' to the kernel command-line will disable
74 parport support entirely. Adding `parport=auto' to the kernel
75 command-line will make parport use any IRQ lines or DMA channels that
82 If you have configured the /proc filesystem into your kernel, you will
83 see a new directory entry: /proc/sys/dev/parport. In there will be a
84 directory entry for each parallel port for which parport is
85 configured. In each of those directories are a collection of files
86 describing that parallel port.
88 The /proc/sys/dev/parport directory tree looks like:
122 devices/active A list of the device drivers using that port. A "+"
123 will appear by the name of the device currently using
124 the port (it might not appear against any). The
125 string "none" means that there are no device drivers
128 hardware Parallel port's base address, IRQ line and DMA channel.
130 autoprobe Any IEEE-1284 device ID information that has been
131 acquired from the (non-IEEE 1284.3) device.
133 autoprobe[0-3] IEEE 1284 device ID information retrieved from
134 daisy-chain devices that conform to IEEE 1284.3.
136 spintime The number of microseconds to busy-loop while waiting
137 for the peripheral to respond. You might find that
138 adjusting this improves performance, depending on your
139 peripherals. This is a port-wide setting, i.e. it
140 applies to all devices on a particular port.
142 timeslice The number of miliseconds that a device driver is
143 allowed to keep a port claimed for. This is advisory,
144 and driver can ignore it if it must.
146 default/* The defaults for spintime and timeslice. When a new
147 port is registered, it picks up the default spintime.
148 When a new device is registered, it picks up the
154 Once the parport code is initialised, you can attach device drivers to
155 specific ports. Normally this happens automatically; if the lp driver
156 is loaded it will create one lp device for each port found. You can
157 override this, though, by using parameters either when you load the lp
160 # insmod lp.o parport=0,2
162 or on the LILO command line:
164 lp=parport0 lp=parport2
166 Both the above examples would inform lp that you want /dev/lp0 to be
167 the first parallel port, and /dev/lp1 to be the _third_ parallel port,
168 with no lp device associated with the second port (parport1). Note
169 that this is different to the way older kernels worked; there used to
170 be a static association between the I/O port address and the device
171 name, so /dev/lp0 was always the port at 0x3bc. This is no longer the
172 case - if you only have one port, it will default to being /dev/lp0,
173 regardless of base address.
177 * If you selected the IEEE 1284 support at compile time, you can say
178 `lp=auto' on the kernel command line, and lp will create devices
179 only for those ports that seem to have printers attached.
181 * If you give PLIP the `timid' parameter, either with `plip=timid' on
182 the command line, or with `insmod plip timid=1' when using modules,
183 it will avoid any ports that seem to be in use by other devices.
185 * IRQ autoprobing works only for a few port types at the moment.
188 Philip.Blundell@pobox.com
189 tim@cyberelk.demon.co.uk