title: How to access Parallel port in Linux
body: <p>On my Linux machine (Debian Wheezy), I tried to access the parallel port by <code>request_region()</code> but it failed because the system had already loaded the kernel module <code>parport</code>... </p>
  
  <p>So, I <code>rmmod</code> the modules <code>lp</code>, <code>ppdev</code>, <code>parport_pc</code> and <code>parport</code>. Then, I could successfully insert my module. </p>
  
  <p>However, from the base address <code>inb()</code> returned <code>0xff</code>, no matter what value was written. </p>
  
  <p>Before <code>rmmod</code> those module from kernel, I could wrote and read this register. Then I blacklisted those module from being loaded at system start up, and I could read and write these registers and my module also worked. It seems that the <code>clearup</code> function of <code>parport_pc</code> did something that made the hardware unusable. (At least the status of the port is not the same as it was before the module loaded). </p>
  
  <p>My question is why, and what should I do to recover the port instead of reload <code>parport_pc</code> ?</p>