[PARPORT] PATCH: parport_device_id support, "version 2.0"

From: Adam J. Richter (adam@yggdrasil.com)
Date: Sun Dec 24 2000 - 22:01:20 EST

  • Next message: Guido Milanese: "[PARPORT] Imation LS 120 on parallel port"

            The following kernel patch implements MODULE_DEVICE_TABLE
    support in the form that we have been discussing on this list.
    Here is a list of changes. The numbering of these items corresponds
    to my original proposal of December 12th:

            1. A device's IEEE-1284.3 ID is now reread from hardware whenever
               the corresponding /proc/sys/dev/parport*/parport* file is read.
               However, the results are still stored in struct parport for now
               so that each driver does not have to requery each parallel port
               device. At some point in the future, parport probably should
               get a registration interface similar to the new PCI interface and
               the USB interface where some centrally-called routine does all
               of the matching and tells the drivers which devices they match.

            2. The printer ID parsing code has been replaced.
               /proc/sys/dev/parport*/parport* now return the IEEE-1284.3 string
               verbatim, including length bytes, whether they are correct or not.
               The only processing done is that a new line is added to the end.
               So, for example, you can now write a program to test if your
               printer is providing an incorrect length value, not including
               a semicolon, etc.

            3. parport_device_id's can now be used for matching parallel port
               devices. They will cause depmod to add appropriate entries in
               /lib/modules/<version>/modules.parportmap is you add a
               MODULE_DEVICE_TABLE declaration. Please see drivers/char/lp.c
               and drivers/media/video/{c-qcam,cpia_pp}.c for examples.
               Matching is done by matching semicolon-separated key:value
               pairs. There is more detailed documentation on the matching
               scheme in the comments above parport_match_str in
               drivers/parport/probe.c

            4. As discussed on this list previously, I have already submitted
               the corresponding patches to depmod to Keith Owens, and he
               has already made a new release. So, if you are running the
               latest modutils, you do not have to update it further to
               support this.

            5. A GPL'ed user level agent for loading parport modules based on
               IEEE-1284.3 ID's and the contents of
               /lib/modules/<version>/modules.parportmap is now available from
               ftp://ftp.yggdrasil.com/pub/dist/device_control/parportmodules/.

            6. As mentioned in #3, there are now MODULE_DEVICE_TABLE entries
               for drivers/char/lp.c (tested with parportmodules)
               and drivers/media/video/{c-qcam,cpia_pp}.c (untested). Note
               that these declarations do not use __initdata or __devinitdata
               because I think it will soon be possible for them to be
               referenced after initdata variables have been discarded if
               the parallel ports are rescanned to match any newly attached
               devices (possibly coming soon). I would welcome IEEE-1284.3
               device ID strings or, better yet, patches for any of the
               following drivers:

    ./drivers/block/paride/paride.c
    ./drivers/char/ppdev.c
    ./drivers/char/joystick/db9.c
    ./drivers/char/joystick/gamecon.c
    ./drivers/char/joystick/turbografx.c
    ./drivers/i2c/i2c-philips-par.c
    ./drivers/media/video/bw-qcam.c
    ./drivers/net/hamradio/soundmodem/sm.c
    ./drivers/net/hamradio/baycom_epp.c
    ./drivers/net/hamradio/baycom_par.c
    ./drivers/scsi/imm.c
    ./drivers/scsi/ppa.c

            7. A printcap generator using ieee1284.3 ID's is still on my
               TODO list.

    -- 
    Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
    adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
    +1 408 261-6630         | g g d r a s i l   United States of America
    fax +1 408 261-6631      "Free Software For The Rest Of Us."
    


    -- 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 : Sun Dec 24 2000 - 22:07:20 EST