Documentation/admin-guide/parport.rst

Source file repositories/reference/linux-study-clean/Documentation/admin-guide/parport.rst

File Facts

System
Linux kernel
Corpus path
Documentation/admin-guide/parport.rst
Extension
.rst
Size
9500 bytes
Lines
287
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

Parport
+++++++

The ``parport`` code provides parallel-port support under Linux.  This
includes the ability to share one port between multiple device
drivers.

You can pass parameters to the ``parport`` code to override its automatic
detection of your hardware.  This is particularly useful if you want
to use IRQs, since in general these can't be autoprobed successfully.
By default IRQs are not used even if they **can** be probed.  This is
because there are a lot of people using the same IRQ for their
parallel port and a sound card or network card.

The ``parport`` code is split into two parts: generic (which deals with
port-sharing) and architecture-dependent (which deals with actually
using the port).


Parport as modules
==================

If you load the `parport`` code as a module, say::

	# insmod parport

to load the generic ``parport`` code.  You then must load the
architecture-dependent code with (for example)::

	# insmod parport_pc io=0x3bc,0x378,0x278 irq=none,7,auto

to tell the ``parport`` code that you want three PC-style ports, one at
0x3bc with no IRQ, one at 0x378 using IRQ 7, and one at 0x278 with an
auto-detected IRQ.  Currently, PC-style (``parport_pc``), Sun ``bpp``,
Amiga, Atari, and MFC3 hardware is supported.

PCI parallel I/O card support comes from ``parport_pc``.  Base I/O
addresses should not be specified for supported PCI cards since they
are automatically detected.


modprobe
--------

If you use modprobe , you will find it useful to add lines as below to a
configuration file in /etc/modprobe.d/ directory::

	alias parport_lowlevel parport_pc
	options parport_pc io=0x378,0x278 irq=7,auto

modprobe will load ``parport_pc`` (with the options ``io=0x378,0x278 irq=7,auto``)
whenever a parallel port device driver (such as ``lp``) is loaded.

Note that these are example lines only!  You shouldn't in general need
to specify any options to ``parport_pc`` in order to be able to use a
parallel port.


Parport probe [optional]
------------------------

In 2.2 kernels there was a module called ``parport_probe``, which was used
for collecting IEEE 1284 device ID information.  This has now been
enhanced and now lives with the IEEE 1284 support.  When a parallel
port is detected, the devices that are connected to it are analysed,
and information is logged like this::

	parport0: Printer, BJC-210 (Canon)

The probe information is available from files in ``/proc/sys/dev/parport/``.

Annotation

Implementation Notes