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) and Sun Ultra/AX
32 (parport_ax) hardware is supported; more is in the works.
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 alias parport_lowlevel 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 Once the architecture-dependent part of the parport code is loaded
53 into the kernel, you can insert the parport_probe module with:
55 # insmod parport_probe.o
57 This will perform an IEEE1284 probe of any attached devices and log a
60 parport0: Printer, BJC-210 (Canon)
62 (If you are using kmod and have configured parport_probe as a module,
63 this will just happen.)
65 The probe information is available in /proc/parport/?/autoprobe.
68 Parport linked into the kernel statically
69 =========================================
71 If you compile the parport code into the kernel, then you can use
72 kernel boot parameters to get the same effect. Add something like the
73 following to your LILO command line:
75 parport=0x3bc parport=0x378,7 parport=0x278,auto
77 You can have many `parport=...' statements, one for each port you want
78 to add. Adding `parport=0' to the kernel command-line will disable
79 parport support entirely. Adding `parport=auto' to the kernel
80 command-line will make parport use any IRQ lines or DMA channels that
87 If you have configured the /proc filesystem into your kernel, you will
88 see a new directory entry: /proc/parport. In there will be a
89 directory entry for each parallel port for which parport is
90 configured. In each of those directories are four files describing
91 that parallel port. For example:
95 /proc/parport/0/devices A list of the device drivers using
96 that port. A "+" will appear by the
97 name of the device currently using the
98 port (it might not appear against any).
100 /proc/parport/0/hardware Parallel port's base address, IRQ line
103 /proc/parport/0/irq The IRQ that parport is using for that
104 port. This is in a separate file to
105 allow you to alter it by writing a new
106 value in (IRQ number or "none").
108 /proc/parport/0/autoprobe Any IEEE-1284 device ID information
109 that has been acquired.
115 Once the parport code is initialised, you can attach device drivers to
116 specific ports. Normally this happens automatically; if the lp driver
117 is loaded it will create one lp device for each port found. You can
118 override this, though, by using parameters either when you load the lp
121 # insmod lp.o parport=0,2
123 or on the LILO command line:
125 lp=parport0 lp=parport2
127 Both the above examples would inform lp that you want /dev/lp0 to be
128 the first parallel port, and /dev/lp1 to be the _third_ parallel port,
129 with no lp device associated with the second port (parport1). Note
130 that this is different to the way older kernels worked; there used to
131 be a static association between the I/O port address and the device
132 name, so /dev/lp0 was always the port at 0x3bc. This is no longer the
133 case - if you only have one port, it will default to being /dev/lp0,
134 regardless of base address.
138 * If you selected the IEEE-1284 autoprobe at compile time, you can say
139 `lp=auto' on the kernel command line, and lp will create devices
140 only for those ports that seem to have printers attached.
142 * If you give PLIP the `timid' parameter, either with `plip=timid' on
143 the command line, or with `insmod plip timid=1' when using modules,
144 it will avoid any ports that seem to be in use by other devices.
146 * IRQ autoprobing works only for a few port types at the moment.
149 Philip.Blundell@pobox.com
150 tim@cyberelk.demon.co.uk