static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it);
static int mio_cs_detach(comedi_device *dev);
-comedi_driver driver_atmio={
+comedi_driver driver_mio_cs={
driver_name: "mio-cs",
module: &__this_module,
attach: mio_cs_attach,
#include "ni_mio_common.c"
-static int init_stage2(comedi_device *dev,comedi_devconfig *it);
static int ni_getboardtype(comedi_device *dev);
/* clean up allocated resources */
return 0;
}
- return init_stage2(dev,it);
+ return 0;
}
cisparse_t parse;
int manfid = 0, prodid = 0;
int ret;
+ comedi_device *dev;
tuple.TupleData = (cisdata_t *)buf;
tuple.TupleOffset = 0;
CardServices(RequestIRQ, handle, &link->irq);
CardServices(RequestConfiguration, handle, &link->conf);
- printk("irq = %d\n",link->irq.AssignedIRQ);
- printk("iobase = 0x%04x\n",link->io.BasePort1);
- printk("manfid = 0x%04x, 0x%04x\n",manfid,prodid);
-
- tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY
-
-}
-
-static int init_stage2(comedi_device *dev,comedi_devconfig *it)
-{
- int ret;
- int iobase;
- int board;
- int irq;
-
-
- /* reserve our I/O region */
+ dev=comedi_allocate_dev(&driver_mio_cs);
+ dev->iobase=link->io.BasePort1;
+ dev->iosize=link->io.NumPorts1;
+ dev->irq=link->irq.AssignedIRQ;
- iobase=0x200;
- if(it->options[0])iobase=it->options[0];
-
- printk("comedi%d: ni_E: 0x%04x",dev->minor,iobase);
- if(check_region(iobase,NI_SIZE)<0){
- printk(" I/O port conflict\n");
- return -EIO;
- }
- request_region(iobase,NI_SIZE,"ni_E");
+ printk("comedi%d: %s: DAQCard: io %#3lx, irq %d, ",
+ dev->minor,dev->driver->driver_name,dev->iobase,
+ dev->irq);
+ printk("manfid = 0x%04x, 0x%04x\n",manfid,prodid);
- dev->iobase=iobase;
- dev->iosize=NI_SIZE;
-
-
- /* board existence sanity check */
-
-#ifdef DEBUG
+#if 1
{
int i;
}
}
#endif
-
- /* get board type */
+#if 0
board=ni_getboardtype(dev);
if(board<0)return -EIO;
+#else
+ dev->board=0;
+#endif
+#if 0
printk(" %s",ni_boards[board].name);
dev->board_name=ni_boards[board].name;
+#endif
- /* irq stuff */
-
+#if 0
irq=it->options[1];
if(irq!=0){
if(irq<0 || irq>15 || ni_irqpin[irq]==-1){
}
dev->irq=irq;
}
+#endif
+#if 0
/* allocate private area */
-
if((ret=alloc_private(dev,sizeof(ni_private)))<0)
return ret;
dev->board=board;
- /* generic E series stuff in ni-E.c */
-
if( (ret=ni_E_init(dev,it))<0 ){
return ret;
}
-
- return 0;
+#endif
+
+#if 0
+ link->state &= ~DEV_CONFIG_PENDING;
+ //link->dev = &info->node;
+#endif
+
}
+#if 0
static int ni_getboardtype(comedi_device *dev)
{
int device_id=ni_read_eeprom(dev,511);
}
return -1;
}
+#endif
#ifdef MODULE
{
servinfo_t serv;
- comedi_driver_register(&driver_atmio);
+ comedi_driver_register(&driver_mio_cs);
CardServices(GetCardServicesInfo, &serv);
if(serv.Revision != CS_RELEASE_CODE){
printk(KERN_NOTICE "mio_cs: Card Services release "
while(dev_list != NULL)
cs_detach(dev_list);
#endif
- comedi_driver_unregister(&driver_atmio);
+ comedi_driver_unregister(&driver_mio_cs);
}
#endif