linux/Documentation/parport.txt
<<
v">Search v">. .11/a>The `parport' code provides parallel-port support under Linux. This . .21/a>includes the ability to share one port between multiple device . .31/a>drivers. . .41/a><. .51/a>You cal pass parameters to the parport code to override its aut"ma vc<. .61/a>detec val of your hardware. This is par vcularly useful if you want<. .71/a>to use IRQs, since in general these cal't be aut"probed successfully. . .81/a>By default IRQs are not used even if they _cal_ be probed. This is . .91/a>because there are a lot of people using the sam IRQ for their . parallel port and a sound card or network card. . 111/a><. 121/a>The parport code is split into two par s: generic (which deals with<. 131/a>port-sharing) and architec ure-dependent (which deals with ac ually<. 141/a>using the port). . 151/a><. 161/a><. 171/a>Parport as modules . 181/a>================== . 191/a><. 2If you load the parport code as a module, say<. 211/a><. 221/a> # insmod parport<. 231/a><. 241/a>to load the generic parport code. You then must load the<. 251/a>architec ure-dependent code with (for example):<. 261/a><. 271/a> # insmod parport_pc io=0x3bc,0x378,0x278 irq=none,7,aut"<. 281/a><. 291/a>to tell the parport code that you want three PC-style ports, one at<. 30x3bc with no IRQ, one at 0x378 using IRQ 7, and one at 0x278 with an<. 311/a>aut"-detec ed IRQ. Currently, PC-style (parport_pc), Sun `bpp',<. 321/a>Amiga, Atari, and MFC3 hardware is supported. . 331/a><. 341/a>PCI parallel I/O card support comes from parport_pc. Base I/O<. 351/a>addresses should not be specified for supported PCI cards since they<. 361/a>are aut"ma vcally detec ed. . 371/a><. 381/a><. 391/a>modprobe . 4-------- . 411/a><. 42opa>If you use modprobe , you will find it useful to add lines as below to a<. 431/a>configura val file in /etc/modprobe.d/ direc ory:. . 441/a><. 451/a> alias parport_lowlevel parport_pc<. 461/a> on vals parport_pc io=0x378,0x278 irq=7,aut"<. 471/a><. 481/a>modprobe will load parport_pc (with the on vals "io=0x378,0x278 irq=7,aut"")<. 491/a>whenever a parallel port device driver (such as lp) is loaded. . 501/a><. 511/a>Note that these are example lines only! You shouldl't in general need<. 521/a>to specify any on vals to parport_pc in order to be able to use a<. 53opa>parallel port. . 541/a><. 551/a><. 561/a>Parport probe [on valal]<. 57opa>------------- . 581/a><. 591/a>In 2.2 kernels there was a module called parport_probe, which was used<. 601/a>for collecting IEEE 1284 device ID informa val. This has now been<. 611/a>enhanced and now lives with the IEEE 1284 support. When a parallel<. 621/a>port is detec ed, the devices that are connec ed to it are alalysed,<. 63opa>and informa val is logged like this:<. 641/a><. 651/a> parport0: Printer, BJC-210 (Canon)<. 661/a><. 671/a>The probe informa val is available from files in /proc/sys/dev/parport/. . 681/a><. 691/a><. 701/a>Parport linked into the kernel sta vcally<. 711/a>=========================================<. 721/a><. 73opa>If you compile the parport code into the kernel, then you cal use<. 741/a>kernel boot parameters to get the sam effec . Add something like the<. 751/a>following to your LILO command line:<. 761/a><. 771/a> parport=0x3bc parport=0x378,7 parport=0x278,aut",nofif"<. 781/a><. 791/a>You cal have many `parport=...' sta ements, one for each port you want<. 801/a>to add. Adding `parport=0' to the kernel command-line will disable<. 81opa>parport support entirely. Adding `parport=aut"' to the kernel<. 821/a>command-line will make parport use any IRQ lines or DMA channels that<. 83opa>it aut"-detec s. . 841/a><. 851/a><. 861/a>Files in /proc<. 871/a>==============<. 881/a><. 89opa>If you have configured the /proc filesys em into your kernel, you will . 901/a>see a new direc ory entry: /proc/sys/dev/parport. In there will be a<. 91opa>direc ory entry for each parallel port for which parport is . 921/a>configured. In each of those direc ories are a collectial of files . 931/a>describing that parallel port. . 941/a><. 951/a>The /proc/sys/dev/parport direc ory tree looks like:<. 961/a><. 97opa>parport<. 981/a>|-- default<. 99opa>| |-- spintime<.100opa>| `-- timeslice .1011/a>|-- parport0 .102opa>| |-- aut"probe .103opa>| |-- aut"probe0 .104opa>| |-- aut"probe1 .105opa>| |-- aut"probe2 .106opa>| |-- aut"probe3 .107opa>| |-- devices .108opa>| | |-- active .109opa>| | `-- lp .110opa>| | `-- timeslice .1111/a>| |-- base-addr .112opa>| |-- irq .113opa>| |-- dma<.114opa>| |-- modes .115opa>| `-- spintime<.1161/a>`-- parport1 .1171/a> |-- aut"probe .1181/a> |-- aut"probe0 .1191/a> |-- aut"probe1 .12 |-- aut"probe2 .1211/a> |-- aut"probe3 .1221/a> |-- devices .1231/a> | |-- active .1241/a> | `-- ppa<.1251/a> | `-- timeslice .1261/a> |-- base-addr .1271/a> |-- irq .1281/a> |-- dma<.1291/a> |-- modes .13 `-- spintime<.1311/a><.1321/a><.1331/a>File: Contents:<.1341/a><.1">. 35devices/active are aut"ma vcall1y det13_pc io=0x378,,,,,,,,, val/appear byleceia vccolleceis loadecpc), Sunr <<modprobe -------- 1. 411/a><1. 42opa>If you use modpr1obe ,142pc io=0x378,,,,,,,,,ha valres onn1. 431/a>configura val fi1le in143pc io=0x378,,,,,,,,, vhen abs="Docp us. .1ds m>. 141/a>using the port). alias pa1rport14/parport.txt#L16" id vL16" class="line" namm vL46">1. 461/a> on vals 1parpo1t_pc iarpx378,,,,,,,,,Penta val/par"Docusa7, andr -1 is na hrinta a hrparpfort.txt#L14" id vL14" class="line" nam m vL127". 471/a><1. 481/a>modprobe will lo1ad pa1port_parpx378,,,,,,,,,Penta val/par"Docusaocumenta vaandr -1 is na hrinta a hort.txt#L48" id vL48" class="line" na1mm vL129". 491/a>whenever a paral1lel p149pc io=0x378,,,,,,,,, 1. 501/a><1. 511/a>Note that these 1are e1ample /parp78,,,,,,,,,Penta val/par"Docusaef="Docum/parp,a href-sementtrpport.txt#L63" id vL63" class="line" na1m vL52">1. 521/a>to specify any o1n val152pc io=0x378,,,,,,,,,meana hport.txt#L134" id vL134" class="line" nm vL53">1. 53opa>parallel port. <1a hre15/parport.txt#L34" id vL34" class="line" na1m vL54">1. 541/a><<1. 561/a>Parport probe [o1n val15_pc io=0x378,,,,,,,,,COMPAT8,,,,,,,,,Hf="Documaccele.d/ diredr pref="Dparport.txt#L9" id vL9" class="line" nam 1m vL57">1. 57opa>------------- 1. 581/a><1. 591/a>In 2.2 kernels t1here 159pc io=0x378,,,,,,,,,,,,,,,,,,,,,,,,,proc/sys/dev/ val val/par 1. 601/a>for collecting I1EEE 1160pc io=0x378,,,,,,,,,ECP78,,,,,,,,,,,Hf="Documaccele.d/ diredr ECP7protocoport.txt#L90" id vL90" class="line" na1m vL61">1. 611/a>enhanced and now1 live161pc io=0x378,,,,,,,,,,,,,,,,,,,,,,,,,proc/sys/dev/ val val/par 1. 621/a>port is detec ed1, the162pc io=0x378,,,,,,,,,ocum378,,,,,,,,,ocumproc/sys/dev/ val val/par 1. 63opa>and informa val 1is lo16/parport.txt#L34" id vL34" class="line" na1m vL64">1. 641/a><1. 651/a> parport01: Pri165pc io=0x378,,,,,,,,,advavL8gccollCOMPAT8 valECP7/parp7is it,ha vnn<7, ort.txt#L81" id vL81" class="line" na1m vL16">. 161/a><1. 671/a>The probe inform1a val16/parport.txt#L48" id vL48" class="line" na1m vL68">1. 681/a><1. 691/a><1. 701/a>Parport linked i1nto t17/parport.txt#L51" id vL51" class="line" na1m vL71">1. 711/a>================1=====171parpa val/par[0-3] val. This has now been<1. 721/a><1. 73opa>If you compile t1he pa17/parport.txt#L34" id vL34" class="line" na1m vL74">1. 741/a>kernel boot para1meter1 to geval/parp,,,,,,,,rec numbercollmicrosee dddd sobusy-loopocumlt_prita hort.txt#L48" id vL48" class="line" na1m vL75">1. 751/a>following to you1r LIL175pc io=0x378,,,,,,,,, val/pa periphprobedo7resp dd.al neem>1. 761/a><. 171/a>Parport as modules val177pc io=0x378,,,,,,,,,periphprobs.l if you wal/par-wocumsetta h, i.e. itort.txt#L127" id vL127" class="line" n7 vL68">1. 781/a><1. 791/a>You cal have man1y `pa17/parport.txt#L70" id vL70" class="line" na1m vL80">1. 801/a>to add. Adding 1`parp1rt=0val/parp,,,,,,,rec numbercollmillisee dddd alalyis loaded. 1. 81opa>parport support 1entir181pc io=0x378,,,,,,,,,a linef="Dokeepwal/par1opavalnce t.l if you wadvisoryport.txt#L63" id vL63" class="line" na1m vL82">1. 821/a>command-line wil1l mak182pc io=0x378,,,,,,,,, vald. 1. 83opa>it aut"-detec s.1 1. 841/a><1. 851/a><1. 861/a>Files in /proc<<1a hre18_pc io=0x378,,,,,,,,,umenta newis loaderp7regxsta nec it,picks upleceort.txt#L14" id vL14" class="line" namm vL17">.. 871/a>==============<<1a hre187pc io=0x378,,,,,,,,,s if th3val/parp.ort.txt#L14" id vL14" class="line" namm vL18">. 181/a>==================ta v1l/parport.txt#L89" id vL89" class="line" na1m vL89">1. 89opa>If you have conf1igure1 the /D loaded. 1. 901/a>see a new direc 1ory e1try: /menta val/parport.txt#L19" id vL19" class="line" nam vL81">1. 91opa>direc ory entry 1for e19/parport.txt#L132" id vL132" class="line" nm vL92">1. 921/a>configured. In 1each 1f thosOval/partwo par s: generiinitaalised,nta val/pattaef="Dloaded. 1. 931/a>describing that 1paral1el porcards scmenta f,,li1. 941/a><1. 951/a>The /proc/sys/de1v/par1ort dief="DocumtcumDocuough, byl 1. 961/a><1. 97opa>parport<1. 981/a>|-- default<1. 99opa>| |-- spintime1<. 2If you load the pary e2ref="Df="efs oe"Documenta val/parport.txt#L76" id vL76" class="line" na2am vL1012>.1011/a>|-- parport0 .102opa>| |-- aut"pro2e .103opa>| |-- aut"pro2e0 .104opa>| |-- aut"pro2e1 951/a>The /proc/sys/de2e2 .>.106opa>| |-- aut"pro2e3 ocittrp When a psee ddal/pa (val/parp).,,lineort.txt#L24" id vL24" class="line" nama vL27">.>.107opa>| |-- devices2.108opa>| | |-- act2ve ocittref7ref="Doc a pa/Otwork cfied f, val3hval/parport.txt#L3" id vL3" class="line" nam 2am vL1092>.109opa>| | `-- lp 2a hre2="Docu`-- , sotlookslp0=probelways,a val/pa e at 0bc.l if you wRQ longerparport.txt#L25" id vL25" class="line" namam vL1102>.110opa>| | `--2times2ice .1111/a>| |-- base-ad2r .112opa>| |-- irq .113opa>| |-- dma<.114opa>| |-- modes <2 href21/parport.txt#L135" id vL135" class="line" 2am vL1152>.115opa>| `-- spintim2<.>.1161/a>`-- parport1 .1171/a> |-- aut"pro2e .1181/a> |-- aut"pro2e0 .1191/a> |-- aut"pro2e1 .. 2If you load the pe2 .. 211/a><. 221/a> # insmod pef="22/parport.txt#L133" id vL133" class="line" 2m vL23">.. 231/a><to load the gener.. 251/a>architec ure-depetimes2ice .. 261/a><.. 271/a> # insmod ref="22/parport.txt#L48" id vL48" class="line" na2m vL28">.. 281/a><.. 291/a>to tell the parpo href2de thatrmultinarrow downocuerl/partwr flemiocuaou fort.txt#L14" id vL14" class="line" na2am vL1302>.13 `-- spintim2<.1311/a><.>.1321/a><. 231/a><.1341/a><.1">. 35devices/active 2a hre2="entaoal/lla hort.txt#L48" id vL48" class="line" na2am vL1262. 361/a>are aut"ma vcall2y det23_pc io ef="Drupt-d. .. 371/a><<.. 391/a>modprobe -------- <2. 42opa>If you use modpr2obe ,24/parport.txt#L133" id vL133" class="line" 2m vL43">2. 431/a>configura val fi2le in243pc iFcumei2 141/a>using the port).2 alias pa2rport24/parport.txt#L16" id vL16" class="line" na2m vL46">2. 461/a> on vals 2parpo2t_pc iTntaiddeofs is "Docuprotocopom aef="Docu-port supporathr,val/parport.txt#L81" id vL81" class="line" na2 m vL1272. 471/a><modprobe will lo2ad pa2port_pnea vaarinta_parp_;nwhimple):reontwum! is ef="Documentc/sys/devrort.txt#L24" id vL24" class="line" nammm vL1292. 491/a>whenever a paral2lel p249pc ien/devDobyleceiBIOSrted. -style (pbyleceid. 2. 501/a><2. 511/a>Note that these 2are e2ample So,ultiptart Whe,val/parp CONFIG_PARPORT_PC_FIFOrted. lvals "io=ort.txt#L51" id vL51" class="line" na2m vL42">2. 521/a>to specify any o2n val252pc i When-portumenta v-port. Seenta pref=a hra vasucumeies ttre entasupporrort.txt#L24" id vL24" class="line" namm vL53">2. 53opa>parallel port. <2a hre25/parpeople usin you w a psilst supporath.ort.txt#L14" id vL14" class="line" na2m vL14">2. 541/a><<2. 561/a>Parport probe [o2n val25_pc ief="Docu),ulties orlow to ef="Drupt-d. ------------- 2. 581/a><2. 591/a>In 2.2 kernels t2here 259pc ia>2. 601/a>for collecting I2EEE 1260pc ied. yrp,ait,supportbu),usething l/pa kolECP7/parom aeceiBIOS 1284 sneort.txt#L24" id vL24" class="line" namm vL61">2. 611/a>enhanced and now2 live261pc ieceiocumenta vaan val3rmu Wheport.txt#L26" id vL26" class="line" nam vL42">2. 621/a>port is detec ed2, the26/parport.txt#L133" id vL133" class="line" 2m vL53">2. 63opa>and informa val 2is lo263pc io=0xut;)<2. 641/a>< parport02: Pri265pc irport.txt#L58" id vL58" class="line" na2m vL16">2 161/a><2. 671/a>The probe inform2a val26/parptim@cybe),lk.ne"ort.txt#L135" id vL135" class="line" 2m vL68">2. 681/a>< Toe"oa>LXRachreunityparp,sin yoexperiid vLl lxr@lta vanoparp. 1div idvfile1/a>< lxr.lta vano aa dnenlose (pbylrt.txt#L1http://www.redpillany ry ano">Redpillentary ASparp,srt undercollLta vle dv ida hrhref=pe.d/ disuserit area val/1995. 1div id v/bodyidv/htmld