Re: Drivers in 2.2.x: Best way to get minor number from within xxx_read()

David Schleef (ds@stm.lbl.gov)
Tue, 16 Nov 1999 19:56:00 -0800


On Tue, Nov 16, 1999 at 05:51:27PM -0800, Drew Bertola wrote:
> I have an ISA I/O board called tsio and based on 4 82C55s. It has 16
> 8-bit ports, 12 for I/O and 4 for "control words". I want to create
> 16 device nodes, 1 for each port, so that I can read/write to each
> independently. I set the nodes up so that each device has it's minor
> number the same as it's offset from the base I/O port address (0-15).
>
> If anyone has the time, I would like a review of the code for
> suggestions. It's only 250 lines w/ comments, so I've included it
> below.

Comedi provides a generic driver for the 8255 that uses the same
interface as all the other Linux data acquisition drivers. Although
your board isn't specifically supported, since it is just 8255s
connected to the ISA bus, the generic driver supports it. You
might want to check it out (http://stm.lbl.gov/comedi).

It only supports 8255 mode 0, so if you want some of the other
features of the 8255, you would have to add them yourself.

dave...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/