33 #include "../comedidev.h"
34 #include <linux/kernel.h>
39 #define PCI8164_AXIS_X 0x00
40 #define PCI8164_AXIS_Y 0x08
41 #define PCI8164_AXIS_Z 0x10
42 #define PCI8164_AXIS_U 0x18
44 #define PCI8164_MSTS 0x00
45 #define PCI8164_SSTS 0x02
46 #define PCI8164_BUF0 0x04
47 #define PCI8164_BUF1 0x06
49 #define PCI8164_CMD 0x00
50 #define PCI8164_OTP 0x02
52 #define PCI_DEVICE_ID_PCI8164 0x8164
91 data[0] =
inw(dev->
iobase + axis_reg + offset);
93 "%04X:%04X on axis %s\n",
94 action, data[0], data[1], axisname);
102 adl_pci8164_insn_read(dev, s, insn, data,
"MSTS",
PCI8164_MSTS);
111 adl_pci8164_insn_read(dev, s, insn, data,
"SSTS",
PCI8164_SSTS);
120 adl_pci8164_insn_read(dev, s, insn, data,
"BUF0",
PCI8164_BUF0);
129 adl_pci8164_insn_read(dev, s, insn, data,
"BUF1",
PCI8164_BUF1);
143 unsigned int axis, axis_reg;
171 outw(data[0], dev->
iobase + axis_reg + offset);
174 "%04X:%04X on axis %s\n",
175 action, data[0], data[1], axisname);
179 static int adl_pci8164_insn_write_cmd(
struct comedi_device *dev,
184 adl_pci8164_insn_out(dev, s, insn, data,
"CMD",
PCI8164_CMD);
188 static int adl_pci8164_insn_write_otp(
struct comedi_device *dev,
193 adl_pci8164_insn_out(dev, s, insn, data,
"OTP",
PCI8164_OTP);
197 static int adl_pci8164_insn_write_buf0(
struct comedi_device *dev,
202 adl_pci8164_insn_out(dev, s, insn, data,
"BUF0",
PCI8164_BUF0);
206 static int adl_pci8164_insn_write_buf1(
struct comedi_device *dev,
211 adl_pci8164_insn_out(dev, s, insn, data,
"BUF1",
PCI8164_BUF1);
221 comedi_set_hw_dev(dev, &pcidev->
dev);
241 s->
insn_read = adl_pci8164_insn_read_msts;
251 s->
insn_read = adl_pci8164_insn_read_ssts;
261 s->
insn_read = adl_pci8164_insn_read_buf0;
271 s->
insn_read = adl_pci8164_insn_read_buf1;
281 struct pci_dev *pcidev = comedi_to_pci_dev(dev);
290 .driver_name =
"adl_pci8164",
292 .attach_pci = adl_pci8164_attach_pci,
293 .detach = adl_pci8164_detach,
313 static struct pci_driver adl_pci8164_pci_driver = {
314 .name =
"adl_pci8164",
315 .id_table = adl_pci8164_pci_table,
316 .probe = adl_pci8164_pci_probe,