Re: [PARPORT] how to make a new driver?

From: rjh@world.std.com
Date: Tue Oct 03 2000 - 15:27:35 EDT

  • Next message: Zak: "Re: [PARPORT] Driver for Creative WebCam 3 (parport) on Linux ?"

    On 2 Oct, jkinoshi@pcs.usp.br wrote:
    > Hello,
    > I have some basic questions:
    > - How do I make a new module for parallel port?

    Do you need to? The ppdev module brings a lot of capability out to the
    user process. Take a good look at it. You might not need to write
    another module.

    I ended up needing to create a new module, but the sequence of events
    that I went through was:

    1) Completely ignore the parport system and implement experimental
     programs that used ioperm() and iopl() to access the hardware directly.
     This bypasses all of Linux. I needed to do this to figure out what my
     device was really doing. (Actually I also used a programmable logic
     analyzer. There are some questions that only a logic analyzer can
     answer.)

    2) I attempted to use the ppdev module as provided. This actually
     worked, except that the performance was too slow and the device has an
     incomplete implementation of 1284. ppdev provided an average
     throughput of 60KB/sec in ECP mode. I needed faster. The rest of the
     capabilities I needed were there in the ioctl()'s from ppdev.

    3) Using ppdev as a starting point, I then made my module. It deals
     with the gaps in 1284 compliance and the performance issues.

    For documentation I suggest:

    a) Linux device drivers, Allessandro Rubin. A little bit outdated but I
     still find it very useful.
    b) Parallel Port Complete, Axelson. This book describes the PC Parallel
     port hardware very well. The examples all assume use of Visual Basic
     on Windows, but you can still read it and understand what is happening
     in the hardware.
    c) the source code for Linux, read the parallel modules' code and
     makefiles, understand it. Writing drivers is like any other kind of
     writing. You need to be able to read and understand first.

    R Horn

    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Tue Oct 03 2000 - 15:41:24 EDT