81 #include "../comedidev.h"
84 #include <linux/slab.h>
94 #define CR_C_LO_IO 0x01
96 #define CR_B_MODE 0x04
97 #define CR_C_HI_IO 0x08
99 #define CR_A_MODE(a) ((a)<<5)
107 static int subdev_8255_io(
int dir,
int port,
int data,
unsigned long iobase)
110 outb(data, iobase + port);
113 return inb(iobase + port);
175 unsigned long iobase = spriv->
iobase;
192 static int subdev_8255_insn_config(
struct comedi_device *dev,
202 else if (mask & 0x00ff00)
204 else if (mask & 0x0f0000)
224 subdev_8255_do_config(dev, s);
303 int (*
io) (
int,
int,
int,
unsigned long),
304 unsigned long iobase)
313 spriv->
io =
io ?
io : subdev_8255_io;
328 subdev_8255_do_config(dev, s);
335 int (*
io) (
int,
int,
int,
unsigned long),
336 unsigned long iobase)
345 s->
do_cmd = subdev_8255_cmd;
346 s->
cancel = subdev_8255_cancel;
394 "0x%04lx (I/O port conflict)\n", iobase);
425 .driver_name =
"8255",
427 .attach = dev_8255_attach,
428 .detach = dev_8255_detach,