From: Frank Mori Hess Date: Tue, 4 Sep 2007 03:22:08 +0000 (+0000) Subject: Patch from Anders Blomdell which makes X-Git-Tag: r0_7_75~37 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b3ece2a7c9c107c086de1b4da5e56c08b25994b8;p=comedi.git Patch from Anders Blomdell which makes some of the addi-data drivers useable: Since I need to use a driver for apci3106, I guess that I'll have to do some cleanup of the addi-data drivers, but after downloading the drivers from addi-data (http://www.addi-data.com/treiber/linux/comedi/comedi_Driver.tar.gz, v_1.13), and comparing them with cvs, I'm at a loss about which drivers to use as a starting point. I have enclosed a [tentative] patch against CVS (patch.addi-data.20070828), that seems to work with apci3106-16-4. There is also the patch against the CVS from late 2005 (patch.addi.2005-11-11) that I sent to weber.serge@addi-data.com, asking him to do additional cleanup and then submit it to the CVS maintainers, obviously this never happened :-( (and hence the last batch of cards was of another brand). --- diff --git a/comedi/drivers/Kbuild b/comedi/drivers/Kbuild index 500248b9..4ed69268 100644 --- a/comedi/drivers/Kbuild +++ b/comedi/drivers/Kbuild @@ -23,6 +23,23 @@ obj-m += das08.o obj-m += mite.o obj-m += ni_labpc.o obj-m += acl7225b.o +obj-m += addi_apci_035.o +obj-m += addi_apci_1032.o +obj-m += addi_apci_1500.o +obj-m += addi_apci_1516.o +obj-m += addi_apci_1564.o +obj-m += addi_apci_16xx.o +#obj-m += addi_apci_1710.o +obj-m += addi_apci_2016.o +obj-m += addi_apci_2032.o +obj-m += addi_apci_2200.o +obj-m += addi_apci_3001.o +obj-m += addi_apci_3120.o +#obj-m += addi_apci_3200.o +#obj-m += addi_apci_3300.o +obj-m += addi_apci_3501.o +obj-m += addi_apci_3xxx.o +#obj-m += addi_apci_all.o obj-m += adl_pci6208.o obj-m += adl_pci7296.o obj-m += adl_pci7432.o diff --git a/comedi/drivers/Makefile.am b/comedi/drivers/Makefile.am index 22bfeb4e..1588d0f3 100644 --- a/comedi/drivers/Makefile.am +++ b/comedi/drivers/Makefile.am @@ -93,6 +93,23 @@ module_PROGRAMS = \ mite.ko \ ni_labpc.ko \ acl7225b.ko \ + addi_apci_035.ko \ + addi_apci_1032.ko \ + addi_apci_1500.ko \ + addi_apci_1516.ko \ + addi_apci_1564.ko \ + addi_apci_16xx.ko \ + addi_apci_1710.ko \ + addi_apci_2016.ko \ + addi_apci_2032.ko \ + addi_apci_2200.ko \ + addi_apci_3001.ko \ + addi_apci_3120.ko \ + addi_apci_3200.ko \ + addi_apci_3300.ko \ + addi_apci_3501.ko \ + addi_apci_3xxx.ko \ + addi_apci_all.ko \ adl_pci6208.ko \ adl_pci7296.ko \ adl_pci7432.ko \ @@ -185,6 +202,23 @@ endif !CONFIG_KBUILD 8255_ko_SOURCES = 8255.c acl7225b_ko_SOURCES = acl7225b.c +addi_apci_all_ko_SOURCES = addi_apci_all.c +addi_apci_035_ko_SOURCES = addi_apci_035.c +addi_apci_1032_ko_SOURCES = addi_apci_1032.c +addi_apci_1500_ko_SOURCES = addi_apci_1500.c +addi_apci_1516_ko_SOURCES = addi_apci_1516.c +addi_apci_1564_ko_SOURCES = addi_apci_1564.c +addi_apci_16xx_ko_SOURCES = addi_apci_16xx.c +addi_apci_1710_ko_SOURCES = addi_apci_1710.c +addi_apci_2016_ko_SOURCES = addi_apci_2016.c +addi_apci_2032_ko_SOURCES = addi_apci_2032.c +addi_apci_2200_ko_SOURCES = addi_apci_2200.c +addi_apci_3001_ko_SOURCES = addi_apci_3001.c +addi_apci_3120_ko_SOURCES = addi_apci_3120.c +addi_apci_3200_ko_SOURCES = addi_apci_3200.c +addi_apci_3300_ko_SOURCES = addi_apci_3300.c +addi_apci_3501_ko_SOURCES = addi_apci_3501.c +addi_apci_3xxx_ko_SOURCES = addi_apci_3xxx.c adl_pci6208_ko_SOURCES = adl_pci6208.c adl_pci7296_ko_SOURCES = adl_pci7296.c adl_pci7432_ko_SOURCES = adl_pci7432.c diff --git a/comedi/drivers/addi-data/addi_common.c b/comedi/drivers/addi-data/addi_common.c index b087d4c0..c97d6aa3 100644 --- a/comedi/drivers/addi-data/addi_common.c +++ b/comedi/drivers/addi-data/addi_common.c @@ -92,24 +92,56 @@ void fpu_end (void) } #include "addi_eeprom.c" -#include "hwdrv_apci3120.c" -#include "hwdrv_apci1032.c" -#include "hwdrv_apci1516.c" -#include "hwdrv_apci2016.c" -#include "hwdrv_apci2032.c" -#include "hwdrv_apci2200.c" -#include "hwdrv_apci1564.c" -#include "hwdrv_apci1500.c" -#include "hwdrv_apci3501.c" -#include "hwdrv_apci035.c" -#include "hwdrv_apci3200.c" -#include "hwdrv_APCI1710.c" -#include "hwdrv_apci16xx.c" -#include "hwdrv_apci3xxx.c" - +#if (defined (CONFIG_APCI_3120) || defined (CONFIG_APCI_3001)) + #include "hwdrv_apci3120.c" +#endif +#ifdef CONFIG_APCI_1032 + #include "hwdrv_apci1032.c" +#endif +#ifdef CONFIG_APCI_1516 + #include "hwdrv_apci1516.c" +#endif +#ifdef CONFIG_APCI_2016 + #include "hwdrv_apci2016.c" +#endif +#ifdef CONFIG_APCI_2032 + #include "hwdrv_apci2032.c" +#endif +#ifdef CONFIG_APCI_2200 + #include "hwdrv_apci2200.c" +#endif +#ifdef CONFIG_APCI_1564 + #include "hwdrv_apci1564.c" +#endif +#ifdef CONFIG_APCI_1500 + #include "hwdrv_apci1500.c" +#endif +#ifdef CONFIG_APCI_3501 + #include "hwdrv_apci3501.c" +#endif +#ifdef CONFIG_APCI_035 + #include "hwdrv_apci035.c" +#endif +#if (defined (CONFIG_APCI_3200) || defined (CONFIG_APCI_3300)) + #include "hwdrv_apci3200.c" +#endif +#ifdef CONFIG_APCI_1710 + #include "hwdrv_APCI1710.c" +#endif +#ifdef CONFIG_APCI_16XX + #include "hwdrv_apci16xx.c" +#endif +#ifdef CONFIG_APCI_3XXX + #include "hwdrv_apci3xxx.c" +#endif + +#ifndef COMEDI_SUBD_TTLIO + #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ +#endif static boardtype boardtypes[] = { +#ifdef CONFIG_APCI_3120 {"apci3120", APCI3120_BOARD_VENDOR_ID, 0x818D, @@ -166,7 +198,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_1032 {"apci1032", APCI1032_BOARD_VENDOR_ID, 0x1003, @@ -223,7 +256,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_1516 {"apci1516", APCI1516_BOARD_VENDOR_ID, 0x1001, @@ -279,7 +313,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_2016 {"apci2016", APCI2016_BOARD_VENDOR_ID, 0x1002, @@ -336,7 +371,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_2032 {"apci2032", APCI2032_BOARD_VENDOR_ID, 0x1004, @@ -392,7 +428,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_2200 {"apci2200", APCI2200_BOARD_VENDOR_ID, 0x1005, @@ -448,7 +485,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_1564 {"apci1564", APCI1564_BOARD_VENDOR_ID, 0x1006, @@ -505,7 +543,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_1500 {"apci1500", APCI1500_BOARD_VENDOR_ID, 0x80fc, @@ -562,8 +601,8 @@ static boardtype boardtypes[] = NULL, NULL }, - - +#endif +#ifdef CONFIG_APCI_3001 {"apci3001", APCI3120_BOARD_VENDOR_ID, 0x828D, @@ -620,7 +659,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_3501 {"apci3501", APCI3501_BOARD_VENDOR_ID, 0x3001, @@ -676,7 +716,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_035 {"apci035", APCI035_BOARD_VENDOR_ID, 0x0300, @@ -733,7 +774,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_3200 {"apci3200", APCI3200_BOARD_VENDOR_ID, 0x3000, @@ -790,7 +832,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_3300 //Begin JK 20.10.2004: APCI-3300 integration {"apci3300", APCI3200_BOARD_VENDOR_ID, @@ -848,8 +891,8 @@ static boardtype boardtypes[] = NULL, NULL }, - - //End JK 20.10.2004: APCI-3300 integration +#endif +#ifdef CONFIG_APCI_1710 {"apci1710",APCI1710_BOARD_VENDOR_ID,APCI1710_BOARD_DEVICE_ID, 128, 8, @@ -904,7 +947,8 @@ static boardtype boardtypes[] = NULL, NULL }, - +#endif +#ifdef CONFIG_APCI_16XX {"apci1648", 0x15B8, 0x1009, @@ -1019,7 +1063,8 @@ static boardtype boardtypes[] = i_APCI16XX_InsnReadTTLIOAllPortValue, i_APCI16XX_InsnBitsWriteTTLIO }, - +#endif +#ifdef CONFIG_APCI_3XXX {"apci3000-16", 0x15B8, 0x3010, @@ -1381,7 +1426,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -1438,7 +1483,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -1495,7 +1540,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -1552,7 +1597,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -1609,7 +1654,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -1666,7 +1711,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -1721,9 +1766,9 @@ static boardtype boardtypes[] = 4095, &range_apci3XXX_ai, &range_apci3XXX_ao, - 4, - 4, - 0xF, + 0, + 0, + 0, 24, &range_apci3XXX_ttl, 0, @@ -1778,9 +1823,9 @@ static boardtype boardtypes[] = 4095, &range_apci3XXX_ai, &range_apci3XXX_ao, - 4, - 4, - 0xF, + 0, + 0, + 0, 24, &range_apci3XXX_ttl, 0, @@ -1835,9 +1880,9 @@ static boardtype boardtypes[] = 4095, &range_apci3XXX_ai, &range_apci3XXX_ao, - 4, - 4, - 0xF, + 0, + 0, + 0, 24, &range_apci3XXX_ttl, 0, @@ -1892,9 +1937,9 @@ static boardtype boardtypes[] = 4095, &range_apci3XXX_ai, &range_apci3XXX_ao, - 4, - 4, - 0xF, + 0, + 0, + 0, 24, &range_apci3XXX_ttl, 0, @@ -1951,7 +1996,7 @@ static boardtype boardtypes[] = &range_apci3XXX_ao, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -2008,7 +2053,7 @@ static boardtype boardtypes[] = &range_apci3XXX_ao, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -2065,7 +2110,7 @@ static boardtype boardtypes[] = &range_apci3XXX_ao, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -2122,7 +2167,7 @@ static boardtype boardtypes[] = &range_apci3XXX_ao, 4, 4, - 0xF, + 1, 24, &range_apci3XXX_ttl, 0, @@ -2179,7 +2224,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 0, NULL, 0, @@ -2235,7 +2280,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 0, NULL, 0, @@ -2291,7 +2336,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 0, NULL, 0, @@ -2347,7 +2392,7 @@ static boardtype boardtypes[] = NULL, 4, 4, - 0xF, + 1, 0, NULL, 0, @@ -2440,6 +2485,7 @@ static boardtype boardtypes[] = i_APCI3XXX_InsnReadTTLIO, i_APCI3XXX_InsnWriteTTLIO }, +#endif }; #define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype)) @@ -2450,7 +2496,7 @@ comedi_driver driver_addi ={ attach: i_ADDI_Attach, detach: i_ADDI_Detach, num_names: n_boardtypes, - board_name: boardtypes, + board_name: &boardtypes[0].pc_DriverName, offset: sizeof(boardtype), }; @@ -2721,10 +2767,12 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it) if (!strcmp(this_board->pc_DriverName,"apci1710")) { +#ifdef CONFIG_APCI_1710 i_ADDI_AttachPCI1710 (dev); // save base address devpriv->s_BoardInfos.ui_Address=io_addr[2]; +#endif } else { @@ -2740,15 +2788,22 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it) dev->read_subdev = s; s->type = COMEDI_SUBD_AI; s->subdev_flags = SDF_READABLE|SDF_RT|SDF_COMMON|SDF_GROUND|SDF_DIFF; - if (this_board->i_NbrAiChannel) - s->n_chan = this_board->i_NbrAiChannel; + if (this_board->i_NbrAiChannel) + { + s->n_chan = this_board->i_NbrAiChannel; + devpriv->b_SingelDiff = 0; + } else - s->n_chan = this_board->i_NbrAiChannelDiff; + { + s->n_chan = this_board->i_NbrAiChannelDiff; + devpriv->b_SingelDiff = 1; + } s->maxdata = this_board->i_AiMaxdata; s->len_chanlist = this_board->i_AiChannelList; s->range_table = this_board->pr_AiRangelist; - + /* Set the initialisation flag */ + devpriv->b_AiInitialisation = 1; s->insn_config=this_board->i_hwdrv_InsnConfigAnalogInput; s->insn_read=this_board->i_hwdrv_InsnReadAnalogInput; @@ -2851,10 +2906,10 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it) s->type = COMEDI_SUBD_TTLIO; s->subdev_flags = SDF_WRITEABLE|SDF_READABLE|SDF_RT|SDF_GROUND|SDF_COMMON; s->n_chan = this_board->i_NbrTTLChannel; - s->maxdata = 0; + s->maxdata = 1; s->io_bits=0; /* all bits input */ s->len_chanlist = this_board->i_NbrTTLChannel; - s->range_table = this_board->pr_TTLRangelist; // to pass arguments in range + s->range_table = &range_digital; s->insn_config = this_board->i_hwdr_ConfigInitTTLIO; s->insn_bits = this_board->i_hwdr_ReadTTLIOBits; s->insn_read = this_board->i_hwdr_ReadTTLIOAllPortValue; @@ -3017,7 +3072,7 @@ static int i_ADDI_Reset(comedi_device *dev) /* +----------------------------------------------------------------------------+ | Function name : | -|static void v_ADDI_Interrupt(int irq, void *d, struct pt_regs *regs) | +|static void v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG) | | | +----------------------------------------------------------------------------+ | Task : Registerd interrupt routine | @@ -3032,10 +3087,10 @@ static int i_ADDI_Reset(comedi_device *dev) +----------------------------------------------------------------------------+ */ -static irqreturn_t v_ADDI_Interrupt(int irq, void *d, struct pt_regs *regs) +static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG) { comedi_device *dev = d; -this_board->v_hwdrv_Interrupt(irq,d,regs); +this_board->v_hwdrv_Interrupt(irq,d); return IRQ_RETVAL(1); } // EEPROM Read Function diff --git a/comedi/drivers/addi-data/addi_common.h b/comedi/drivers/addi-data/addi_common.h index 205efd37..c79c905b 100644 --- a/comedi/drivers/addi-data/addi_common.h +++ b/comedi/drivers/addi-data/addi_common.h @@ -101,11 +101,16 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc #define ADDIDATA_S5933 "S5933" #define ADDIDATA_9054 "9054" +//ADDIDATA Enable Disable +#define ADDIDATA_ENABLE 1 +#define ADDIDATA_DISABLE 0 + + // Structures // structure for the boardtype typedef struct { - PCHAR pc_DriverName; // driver name + const PCHAR pc_DriverName; // driver name INT i_VendorId; //PCI vendor a device ID of card INT i_DeviceId; INT i_IorangeBase0; @@ -137,7 +142,7 @@ typedef struct { UINT ui_MinDelaytimeNs; // Minimum Delay in Nano secs // interrupt and reset - void (*v_hwdrv_Interrupt)(int irq, void *d, struct pt_regs *regs); + void (*v_hwdrv_Interrupt)(int irq, void *d); int (*i_hwdrv_Reset)(comedi_device *dev); //Subdevice functions @@ -496,7 +501,7 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it); static int i_ADDI_Detach(comedi_device *dev); static int i_ADDI_Reset(comedi_device *dev); -static irqreturn_t v_ADDI_Interrupt(int irq, void *d, struct pt_regs *regs); +static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG); static int i_ADDIDATA_InsnReadEeprom(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); diff --git a/comedi/drivers/addi-data/hwdrv_APCI1710.c b/comedi/drivers/addi-data/hwdrv_APCI1710.c index c0bfb18f..a40c5b85 100644 --- a/comedi/drivers/addi-data/hwdrv_APCI1710.c +++ b/comedi/drivers/addi-data/hwdrv_APCI1710.c @@ -196,7 +196,7 @@ void i_ADDI_AttachPCI1710 (comedi_device *dev) int i_APCI1710_Reset(comedi_device *dev); -VOID v_APCI1710_Interrupt(int irq, void *d, struct pt_regs *regs) ; +VOID v_APCI1710_Interrupt(int irq, void *d) ; //for 1710 int i_APCI1710_Reset(comedi_device *dev) @@ -252,7 +252,7 @@ VOID v_APCI1710_Interrupt(int irq, void *d, struct pt_regs *regs) ; -VOID v_APCI1710_Interrupt(int irq, void *d, struct pt_regs *regs) +VOID v_APCI1710_Interrupt(int irq, void *d) { comedi_device *dev = d; BYTE b_ModuleCpt = 0; diff --git a/comedi/drivers/addi-data/hwdrv_apci035.c b/comedi/drivers/addi-data/hwdrv_apci035.c index 7bec2903..8952f3bf 100644 --- a/comedi/drivers/addi-data/hwdrv_apci035.c +++ b/comedi/drivers/addi-data/hwdrv_apci035.c @@ -553,13 +553,12 @@ outl(0x0 , devpriv->iobase+128 + 12);//Disable the warning delay /* +----------------------------------------------------------------------------+ | Function Name : static void v_APCI035_Interrupt | -| (int irq , void *d, struct pt_regs *regs) | +| (int irq , void *d) | +----------------------------------------------------------------------------+ | Task : Interrupt processing Routine | +----------------------------------------------------------------------------+ | Input Parameters : int irq : irq number | | void *d : void pointer | -| struct pt_regs *regs : structure pointer | +----------------------------------------------------------------------------+ | Output Parameters : -- | +----------------------------------------------------------------------------+ @@ -568,7 +567,7 @@ outl(0x0 , devpriv->iobase+128 + 12);//Disable the warning delay | | +----------------------------------------------------------------------------+ */ -static void v_APCI035_Interrupt(int irq, void *d, struct pt_regs *regs) +static void v_APCI035_Interrupt(int irq, void *d) { comedi_device *dev = d; UINT ui_StatusRegister1 = 0; diff --git a/comedi/drivers/addi-data/hwdrv_apci035.h b/comedi/drivers/addi-data/hwdrv_apci035.h index c473bf14..0b275ec2 100644 --- a/comedi/drivers/addi-data/hwdrv_apci035.h +++ b/comedi/drivers/addi-data/hwdrv_apci035.h @@ -131,7 +131,7 @@ INT i_APCI035_ReadAnalogInput(comedi_device *dev,comedi_subdevice *s,comedi_insn //Interrupt -static void v_APCI035_Interrupt(int irq, void *d, struct pt_regs *regs) ; +static void v_APCI035_Interrupt(int irq, void *d) ; //Reset functions INT i_APCI035_Reset(comedi_device *dev); diff --git a/comedi/drivers/addi-data/hwdrv_apci1032.c b/comedi/drivers/addi-data/hwdrv_apci1032.c index 8e692d79..021bd552 100644 --- a/comedi/drivers/addi-data/hwdrv_apci1032.c +++ b/comedi/drivers/addi-data/hwdrv_apci1032.c @@ -227,13 +227,12 @@ INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev,comedi_subdevice *s,comed /* +----------------------------------------------------------------------------+ | Function Name : static void v_APCI1032_Interrupt | -| (int irq , void *d, struct pt_regs *regs) | +| (int irq , void *d) | +----------------------------------------------------------------------------+ | Task : Interrupt handler for the interruptible digital inputs | +----------------------------------------------------------------------------+ | Input Parameters : int irq : irq number | | void *d : void pointer | -| struct pt_regs *regs : structure pointer | +----------------------------------------------------------------------------+ | Output Parameters : -- | +----------------------------------------------------------------------------+ @@ -242,7 +241,7 @@ INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev,comedi_subdevice *s,comed | | +----------------------------------------------------------------------------+ */ -static VOID v_APCI1032_Interrupt(int irq,void* d, struct pt_regs *regs) +static VOID v_APCI1032_Interrupt(int irq,void* d) { comedi_device *dev =d; diff --git a/comedi/drivers/addi-data/hwdrv_apci1032.h b/comedi/drivers/addi-data/hwdrv_apci1032.h index 467fe753..fd8cd587 100644 --- a/comedi/drivers/addi-data/hwdrv_apci1032.h +++ b/comedi/drivers/addi-data/hwdrv_apci1032.h @@ -76,6 +76,6 @@ INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev,comedi_subdevice *s,comed // Interrupt functions..... -static VOID v_APCI1032_Interrupt(int irq, void *d, struct pt_regs *regs) ; +static VOID v_APCI1032_Interrupt(int irq, void *d) ; //Reset INT i_APCI1032_Reset(comedi_device *dev); diff --git a/comedi/drivers/addi-data/hwdrv_apci1500.c b/comedi/drivers/addi-data/hwdrv_apci1500.c index d896d056..a0819e35 100644 --- a/comedi/drivers/addi-data/hwdrv_apci1500.c +++ b/comedi/drivers/addi-data/hwdrv_apci1500.c @@ -2303,13 +2303,12 @@ return insn->n; /* +----------------------------------------------------------------------------+ | Function Name : static void v_APCI1500_Interrupt | -| (int irq , void *d, struct pt_regs *regs) | +| (int irq , void *d) | +----------------------------------------------------------------------------+ | Task : Interrupt handler | +----------------------------------------------------------------------------+ | Input Parameters : int irq : irq number | | void *d : void pointer | -| struct pt_regs *regs : structure pointer | +----------------------------------------------------------------------------+ | Output Parameters : -- | +----------------------------------------------------------------------------+ @@ -2318,7 +2317,7 @@ return insn->n; | | +----------------------------------------------------------------------------+ */ -static VOID v_APCI1500_Interrupt(int irq,void* d, struct pt_regs *regs) +static VOID v_APCI1500_Interrupt(int irq,void* d) { comedi_device *dev =d; diff --git a/comedi/drivers/addi-data/hwdrv_apci1500.h b/comedi/drivers/addi-data/hwdrv_apci1500.h index 631d0fb5..47df6d79 100644 --- a/comedi/drivers/addi-data/hwdrv_apci1500.h +++ b/comedi/drivers/addi-data/hwdrv_apci1500.h @@ -143,7 +143,7 @@ static int i_APCI1500_ReadCounterTimerWatchdog(comedi_device *dev,comedi_subdevi static int i_APCI1500_ReadInterruptMask(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); /*----------INTERRUPT HANDLER------*/ -static void v_APCI1500_Interrupt(int irq, void *d, struct pt_regs *regs); +static void v_APCI1500_Interrupt(int irq, void *d); static int i_APCI1500_ConfigureInterrupt(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); /*----------RESET---------------*/ static int i_APCI1500_Reset(comedi_device *dev) ; diff --git a/comedi/drivers/addi-data/hwdrv_apci1564.c b/comedi/drivers/addi-data/hwdrv_apci1564.c index b18b17a1..b1078b08 100644 --- a/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -791,13 +791,12 @@ int i_APCI1564_ReadInterruptStatus(comedi_device *dev,comedi_subdevice *s,comedi /* +----------------------------------------------------------------------------+ | Function Name : static void v_APCI1564_Interrupt | -| (int irq , void *d, struct pt_regs *regs) | +| (int irq , void *d) | +----------------------------------------------------------------------------+ | Task : Interrupt handler for the interruptible digital inputs | +----------------------------------------------------------------------------+ | Input Parameters : int irq : irq number | | void *d : void pointer | -| struct pt_regs *regs : structure pointer | +----------------------------------------------------------------------------+ | Output Parameters : -- | +----------------------------------------------------------------------------+ @@ -806,7 +805,7 @@ int i_APCI1564_ReadInterruptStatus(comedi_device *dev,comedi_subdevice *s,comedi | | +----------------------------------------------------------------------------+ */ -static VOID v_APCI1564_Interrupt(int irq,void* d, struct pt_regs *regs) +static VOID v_APCI1564_Interrupt(int irq,void* d) { comedi_device *dev =d; UINT ui_DO, ui_DI; diff --git a/comedi/drivers/addi-data/hwdrv_apci1564.h b/comedi/drivers/addi-data/hwdrv_apci1564.h index ffb81f16..d70c2d2e 100644 --- a/comedi/drivers/addi-data/hwdrv_apci1564.h +++ b/comedi/drivers/addi-data/hwdrv_apci1564.h @@ -110,7 +110,7 @@ int i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device *dev,comedi_subd int i_APCI1564_ReadTimerCounterWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); // INTERRUPT -static VOID v_APCI1564_Interrupt(int irq, void *d, struct pt_regs *regs) ; +static VOID v_APCI1564_Interrupt(int irq, void *d) ; // RESET INT i_APCI1564_Reset(comedi_device *dev); diff --git a/comedi/drivers/addi-data/hwdrv_apci2016.h b/comedi/drivers/addi-data/hwdrv_apci2016.h index cf199209..8550941c 100644 --- a/comedi/drivers/addi-data/hwdrv_apci2016.h +++ b/comedi/drivers/addi-data/hwdrv_apci2016.h @@ -69,8 +69,8 @@ int i_APCI2016_ReadWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn * // Interrupt functions..... -// VOID v_APCI2016_Interrupt(int irq, void *d, struct pt_regs *regs) ; +// VOID v_APCI2016_Interrupt(int irq, void *d) ; - //VOID v_APCI2016_Interrupt(int irq, void *d, struct pt_regs *regs); + //VOID v_APCI2016_Interrupt(int irq, void *d); // RESET INT i_APCI2016_Reset(comedi_device *dev); diff --git a/comedi/drivers/addi-data/hwdrv_apci2032.c b/comedi/drivers/addi-data/hwdrv_apci2032.c index 6d1a5730..123c8546 100644 --- a/comedi/drivers/addi-data/hwdrv_apci2032.c +++ b/comedi/drivers/addi-data/hwdrv_apci2032.c @@ -466,13 +466,12 @@ return insn->n; /* +----------------------------------------------------------------------------+ | Function Name : void v_APCI2032_Interrupt | -| (int irq , void *d, struct pt_regs *regs) | +| (int irq , void *d) | +----------------------------------------------------------------------------+ | Task : Writes port value To the selected port | +----------------------------------------------------------------------------+ | Input Parameters : int irq : irq number | | void *d : void pointer | -| struct pt_regs *regs : structure pointer | +----------------------------------------------------------------------------+ | Output Parameters : -- | +----------------------------------------------------------------------------+ @@ -481,7 +480,7 @@ return insn->n; | | +----------------------------------------------------------------------------+ */ - void v_APCI2032_Interrupt(int irq, void *d, struct pt_regs *regs) + void v_APCI2032_Interrupt(int irq, void *d) { comedi_device *dev = d; unsigned int ui_DO; diff --git a/comedi/drivers/addi-data/hwdrv_apci2032.h b/comedi/drivers/addi-data/hwdrv_apci2032.h index 6d67796d..8f8c6292 100644 --- a/comedi/drivers/addi-data/hwdrv_apci2032.h +++ b/comedi/drivers/addi-data/hwdrv_apci2032.h @@ -79,7 +79,7 @@ int i_APCI2032_ReadWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn * // Interrupt functions..... -void v_APCI2032_Interrupt(int irq, void *d, struct pt_regs *regs) ; +void v_APCI2032_Interrupt(int irq, void *d) ; //Reset functions int i_APCI2032_Reset(comedi_device *dev); diff --git a/comedi/drivers/addi-data/hwdrv_apci3120.c b/comedi/drivers/addi-data/hwdrv_apci3120.c index f6929a73..43529bbc 100644 --- a/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -1373,8 +1373,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev) /* +----------------------------------------------------------------------------+ -| Function name : void v_APCI3120_Interrupt(int irq, void *d, | -| struct pt_regs *regs) | +| Function name : void v_APCI3120_Interrupt(int irq, void *d) | | | | | +----------------------------------------------------------------------------+ @@ -1386,7 +1385,6 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev) +----------------------------------------------------------------------------+ | Input Parameters : int irq | | void *d | -| struct pt_regs *regs | | | +----------------------------------------------------------------------------+ | Return Value : void | @@ -1395,7 +1393,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev) */ - void v_APCI3120_Interrupt(int irq, void *d, struct pt_regs *regs) + void v_APCI3120_Interrupt(int irq, void *d) { comedi_device *dev = d; USHORT int_daq; @@ -1524,7 +1522,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev) //UPDATE-0.7.57->0.7.68comedi_done(dev,s); s->async->events |= COMEDI_CB_EOA; - comedi_event(dev,s,s->async->events); + comedi_event(dev,s); break; @@ -1574,7 +1572,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev) /* Clears the timer status register */ /************************************/ inw(dev->iobase+APCI3120_TIMER_STATUS_REGISTER); - v_APCI3120_InterruptDma(irq,d,regs); // do some data transfer + v_APCI3120_InterruptDma(irq,d); // do some data transfer } else { @@ -1650,7 +1648,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev) if (err==0) s->async->events |= COMEDI_CB_OVERFLOW; - comedi_event(dev,s,s->async->events); + comedi_event(dev,s); return 0; } @@ -1659,8 +1657,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev) /* +----------------------------------------------------------------------------+ -| Function name : void v_APCI3120_InterruptDma(int irq, void *d, | -| struct pt_regs *regs) | +| Function name : void v_APCI3120_InterruptDma(int irq, void *d) | | | +----------------------------------------------------------------------------+ | Task : This is a handler for the DMA interrupt | @@ -1669,7 +1666,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev) | For single mode DMA it stop the acquisition. | | | +----------------------------------------------------------------------------+ -| Input Parameters : int irq, void *d, struct pt_regs *regs | +| Input Parameters : int irq, void *d | | | +----------------------------------------------------------------------------+ | Return Value : void | @@ -1677,7 +1674,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev) +----------------------------------------------------------------------------+ */ - void v_APCI3120_InterruptDma(int irq, void *d, struct pt_regs *regs) + void v_APCI3120_InterruptDma(int irq, void *d) { comedi_device *dev = d; comedi_subdevice *s = dev->subdevices + 0; @@ -1793,7 +1790,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev) if (!(devpriv->ui_AiFlags & TRIG_WAKE_EOS)) { s->async->events |= COMEDI_CB_EOS; - comedi_event(dev,s,s->async->events); + comedi_event(dev,s); } } if (!devpriv->b_AiContinuous) @@ -1803,7 +1800,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev) i_APCI3120_StopCyclicAcquisition(dev,s); devpriv->b_AiCyclicAcquisition=APCI3120_DISABLE; s->async->events |= COMEDI_CB_EOA; - comedi_event(dev,s,s->async->events); + comedi_event(dev,s); return; } diff --git a/comedi/drivers/addi-data/hwdrv_apci3120.h b/comedi/drivers/addi-data/hwdrv_apci3120.h index b93cf784..41ad7e5a 100644 --- a/comedi/drivers/addi-data/hwdrv_apci3120.h +++ b/comedi/drivers/addi-data/hwdrv_apci3120.h @@ -238,11 +238,11 @@ int i_APCI3120_StopCyclicAcquisition(comedi_device *dev,comedi_subdevice *s); int i_APCI3120_Reset(comedi_device *dev); int i_APCI3120_CyclicAnalogInput(int mode, comedi_device * dev,comedi_subdevice * s); // Interrupt functions -void v_APCI3120_Interrupt(int irq, void *d, struct pt_regs *regs) ; +void v_APCI3120_Interrupt(int irq, void *d) ; //UPDATE-0.7.57->0.7.68 void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,sampl_t *dma,sampl_t *data,int n); void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,sampl_t *dma_buffer,unsigned int num_samples); int i_APCI3120_InterruptHandleEos(comedi_device *dev); -void v_APCI3120_InterruptDma(int irq, void *d, struct pt_regs *regs) ; +void v_APCI3120_InterruptDma(int irq, void *d) ; diff --git a/comedi/drivers/addi-data/hwdrv_apci3200.c b/comedi/drivers/addi-data/hwdrv_apci3200.c index dce0a6d7..0251970e 100644 --- a/comedi/drivers/addi-data/hwdrv_apci3200.c +++ b/comedi/drivers/addi-data/hwdrv_apci3200.c @@ -2336,7 +2336,7 @@ int i_APCI3200_ReadCJCCalGain(comedi_device *dev,lsampl_t *data) INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data) { UINT ui_Configuration=0; - //INT i_Temp,i_TimeUnit; + INT i_Temp;//,i_TimeUnit; //if(i_Initialised==0) if(s_BoardInfos [dev->minor].i_Initialised==0) @@ -2960,13 +2960,12 @@ int i_APCI3200_Reset(comedi_device *dev) /* +----------------------------------------------------------------------------+ | Function Name : static void v_APCI3200_Interrupt | - | (int irq , void *d, struct pt_regs *regs) | + | (int irq , void *d) | +----------------------------------------------------------------------------+ | Task : Interrupt processing Routine | +----------------------------------------------------------------------------+ | Input Parameters : int irq : irq number | | void *d : void pointer | - | struct pt_regs *regs : structure pointer | +----------------------------------------------------------------------------+ | Output Parameters : -- | +----------------------------------------------------------------------------+ @@ -2975,7 +2974,7 @@ int i_APCI3200_Reset(comedi_device *dev) | | +----------------------------------------------------------------------------+ */ -void v_APCI3200_Interrupt(int irq, void *d, struct pt_regs *regs) +void v_APCI3200_Interrupt(int irq, void *d) { comedi_device *dev = d; UINT ui_StatusRegister=0; @@ -3445,7 +3444,7 @@ int i_APCI3200_InterruptHandleEos(comedi_device *dev) comedi_buf_write_free(s->async, (7+12)*sizeof(lsampl_t)); // Send events - comedi_event(dev,s,s->async->events); + comedi_event(dev,s); //End JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68 //BEGIN JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68 diff --git a/comedi/drivers/addi-data/hwdrv_apci3200.h b/comedi/drivers/addi-data/hwdrv_apci3200.h index 82b608c3..96523646 100644 --- a/comedi/drivers/addi-data/hwdrv_apci3200.h +++ b/comedi/drivers/addi-data/hwdrv_apci3200.h @@ -101,10 +101,6 @@ comedi_lrange range_apci3300_ai={ 4, { #define ADDIDATA_UNIPOLAR 1 #define ADDIDATA_BIPOLAR 2 -//ADDIDATA Enable Disable -#define ADDIDATA_ENABLE 1 -#define ADDIDATA_DISABLE 0 - //BEGIN JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values #define MAX_MODULE 4 //END JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values @@ -184,7 +180,7 @@ INT i_APCI3200_CommandTestAnalogInput(comedi_device *dev,comedi_subdevice *s,com INT i_APCI3200_CommandAnalogInput(comedi_device *dev,comedi_subdevice *s); INT i_APCI3200_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); //Interrupt -void v_APCI3200_Interrupt(int irq, void *d, struct pt_regs *regs) ; +void v_APCI3200_Interrupt(int irq, void *d) ; int i_APCI3200_InterruptHandleEos(comedi_device *dev); //Reset functions INT i_APCI3200_Reset(comedi_device *dev); diff --git a/comedi/drivers/addi-data/hwdrv_apci3501.c b/comedi/drivers/addi-data/hwdrv_apci3501.c index 44f53f46..3c07ee65 100644 --- a/comedi/drivers/addi-data/hwdrv_apci3501.c +++ b/comedi/drivers/addi-data/hwdrv_apci3501.c @@ -679,13 +679,12 @@ return 0; /* +----------------------------------------------------------------------------+ | Function Name : static void v_APCI3501_Interrupt | -| (int irq , void *d, struct pt_regs *regs) | +| (int irq , void *d) | +----------------------------------------------------------------------------+ | Task : Interrupt processing Routine | +----------------------------------------------------------------------------+ | Input Parameters : int irq : irq number | | void *d : void pointer | -| struct pt_regs *regs : structure pointer | +----------------------------------------------------------------------------+ | Output Parameters : -- | +----------------------------------------------------------------------------+ @@ -694,7 +693,7 @@ return 0; | | +----------------------------------------------------------------------------+ */ - void v_APCI3501_Interrupt(int irq, void *d, struct pt_regs *regs) + void v_APCI3501_Interrupt(int irq, void *d) { int i_temp; comedi_device *dev = d; diff --git a/comedi/drivers/addi-data/hwdrv_apci3501.h b/comedi/drivers/addi-data/hwdrv_apci3501.h index 1797eb6b..d233acd9 100644 --- a/comedi/drivers/addi-data/hwdrv_apci3501.h +++ b/comedi/drivers/addi-data/hwdrv_apci3501.h @@ -82,7 +82,7 @@ INT i_APCI3501_ConfigTimerCounterWatchdog (comedi_device *dev,comedi_subdevice * int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); int i_APCI3501_ReadTimerCounterWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); //Interrupt -void v_APCI3501_Interrupt(int irq, void *d, struct pt_regs *regs) ; +void v_APCI3501_Interrupt(int irq, void *d) ; //Reset functions int i_APCI3501_Reset(comedi_device *dev); diff --git a/comedi/drivers/addi-data/hwdrv_apci3xxx.c b/comedi/drivers/addi-data/hwdrv_apci3xxx.c index d1705d04..41bcab7f 100755 --- a/comedi/drivers/addi-data/hwdrv_apci3xxx.c +++ b/comedi/drivers/addi-data/hwdrv_apci3xxx.c @@ -579,7 +579,7 @@ int i_APCI3XXX_InsnReadAnalogInput (comedi_device *dev, printk("Operating mode not configured\n"); i_ReturnValue = -1; } - + printk("%x\n", i_ReturnValue); return (i_ReturnValue); } @@ -588,8 +588,7 @@ int i_APCI3XXX_InsnReadAnalogInput (comedi_device *dev, /* +----------------------------------------------------------------------------+ | Function name : void v_APCI3XXX_Interrupt (int irq, | -| void *d, | -| struct pt_regs *regs) | +| void *d) | +----------------------------------------------------------------------------+ | Task :Interrupt handler for APCI3XXX | | When interrupt occurs this gets called. | @@ -603,7 +602,7 @@ int i_APCI3XXX_InsnReadAnalogInput (comedi_device *dev, */ -void v_APCI3XXX_Interrupt(int irq, void *d, struct pt_regs *regs) +void v_APCI3XXX_Interrupt(int irq, void *d) { comedi_device *dev = d; BYTE b_CopyCpt = 0;