2 comedi/drivers/ni_6514.c
3 driver for National Instruments PCI-6514
5 Copyright (C) 2006 Jon Grierson <jd@renko.co.uk>
6 Copyright (C) 2006 Frank Mori Hess <fmhess@users.sourceforge.net>
8 COMEDI - Linux Control and Measurement Device Interface
9 Copyright (C) 1999,2002,2003 David A. Schleef <ds@schleef.org>
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 Description: National Instruments 65xx static dio boards
29 Author: Jon Grierson <jd@renko.co.uk>,
30 Frank Mori Hess <fmhess@users.sourceforge.net>
32 Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510,
33 PCI-6511, PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514,
34 PXI-6514, PCI-6515, PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519,
35 PCI-6520, PCI-6521, PXI-6521, PCI-6528, PXI-6528
36 Updated: Wed Oct 18 08:59:11 EDT 2006
38 Based on the PCI-6527 driver by ds.
39 The interrupt subdevice (subdevice 3) is probably broken for all boards
40 except maybe the 6514.
45 Manuals (available from ftp://ftp.natinst.com/support/manuals)
47 370106b.pdf 6514 Register Level Programmer Manual
54 #include <linux/interrupt.h>
55 #include <linux/slab.h>
56 #include "../comedidev.h"
60 #define NI6514_DIO_SIZE 4096
61 #define NI6514_MITE_SIZE 4096
63 #define NI_65XX_MAX_NUM_PORTS 12
64 static const unsigned ni_65xx_channels_per_port
= 8;
65 static const unsigned ni_65xx_port_offset
= 0x10;
67 static inline unsigned Port_Data(unsigned port
)
69 return 0x40 + port
* ni_65xx_port_offset
;
72 static inline unsigned Port_Select(unsigned port
)
74 return 0x41 + port
* ni_65xx_port_offset
;
77 static inline unsigned Rising_Edge_Detection_Enable(unsigned port
)
79 return 0x42 + port
* ni_65xx_port_offset
;
82 static inline unsigned Falling_Edge_Detection_Enable(unsigned port
)
84 return 0x43 + port
* ni_65xx_port_offset
;
87 static inline unsigned Filter_Enable(unsigned port
)
89 return 0x44 + port
* ni_65xx_port_offset
;
92 #define ID_Register 0x00
94 #define Clear_Register 0x01
96 #define ClrOverflow 0x04
98 #define Filter_Interval 0x08
100 #define Change_Status 0x02
101 #define MasterInterruptStatus 0x04
102 #define Overflow 0x02
103 #define EdgeStatus 0x01
105 #define Master_Interrupt_Control 0x03
106 #define FallingEdgeIntEnable 0x10
107 #define RisingEdgeIntEnable 0x08
108 #define MasterInterruptEnable 0x04
109 #define OverflowIntEnable 0x02
110 #define EdgeIntEnable 0x01
112 static int ni_65xx_attach(struct comedi_device
*dev
,
113 struct comedi_devconfig
*it
);
114 static void ni_65xx_detach(struct comedi_device
*dev
);
115 static struct comedi_driver driver_ni_65xx
= {
116 .driver_name
= "ni_65xx",
117 .module
= THIS_MODULE
,
118 .attach
= ni_65xx_attach
,
119 .detach
= ni_65xx_detach
,
122 struct ni_65xx_board
{
126 unsigned num_dio_ports
;
127 unsigned num_di_ports
;
128 unsigned num_do_ports
;
129 unsigned invert_outputs
:1;
132 static const struct ni_65xx_board ni_65xx_boards
[] = {
137 .invert_outputs
= 0},
142 .invert_outputs
= 0},
167 .invert_outputs
= 1},
172 .invert_outputs
= 1},
178 .invert_outputs
= 1},
184 .invert_outputs
= 1},
190 .invert_outputs
= 1},
196 .invert_outputs
= 1},
201 .invert_outputs
= 1},
206 .invert_outputs
= 1},
212 .invert_outputs
= 1},
218 .invert_outputs
= 1},
251 #define n_ni_65xx_boards ARRAY_SIZE(ni_65xx_boards)
252 static inline const struct ni_65xx_board
*board(struct comedi_device
*dev
)
254 return dev
->board_ptr
;
257 static inline unsigned ni_65xx_port_by_channel(unsigned channel
)
259 return channel
/ ni_65xx_channels_per_port
;
262 static inline unsigned ni_65xx_total_num_ports(const struct ni_65xx_board
265 return board
->num_dio_ports
+ board
->num_di_ports
+ board
->num_do_ports
;
268 static DEFINE_PCI_DEVICE_TABLE(ni_65xx_pci_table
) = {
269 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x1710)},
270 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7085)},
271 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7086)},
272 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7087)},
273 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7088)},
274 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70a9)},
275 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70c3)},
276 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70c8)},
277 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70c9)},
278 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70cc)},
279 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70CD)},
280 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70d1)},
281 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70d2)},
282 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x70d3)},
283 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7124)},
284 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7125)},
285 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7126)},
286 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7127)},
287 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x7128)},
288 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x718b)},
289 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x718c)},
290 {PCI_DEVICE(PCI_VENDOR_ID_NI
, 0x71c5)},
294 MODULE_DEVICE_TABLE(pci
, ni_65xx_pci_table
);
296 struct ni_65xx_private
{
297 struct mite_struct
*mite
;
298 unsigned int filter_interval
;
299 unsigned short filter_enable
[NI_65XX_MAX_NUM_PORTS
];
300 unsigned short output_bits
[NI_65XX_MAX_NUM_PORTS
];
301 unsigned short dio_direction
[NI_65XX_MAX_NUM_PORTS
];
304 static inline struct ni_65xx_private
*private(struct comedi_device
*dev
)
309 struct ni_65xx_subdevice_private
{
313 static inline struct ni_65xx_subdevice_private
*sprivate(struct comedi_subdevice
316 return subdev
->private;
319 static struct ni_65xx_subdevice_private
*ni_65xx_alloc_subdevice_private(void)
321 struct ni_65xx_subdevice_private
*subdev_private
=
322 kzalloc(sizeof(struct ni_65xx_subdevice_private
), GFP_KERNEL
);
323 if (subdev_private
== NULL
)
325 return subdev_private
;
328 static int ni_65xx_find_device(struct comedi_device
*dev
, int bus
, int slot
);
330 static int ni_65xx_config_filter(struct comedi_device
*dev
,
331 struct comedi_subdevice
*s
,
332 struct comedi_insn
*insn
, unsigned int *data
)
334 const unsigned chan
= CR_CHAN(insn
->chanspec
);
335 const unsigned port
=
336 sprivate(s
)->base_port
+ ni_65xx_port_by_channel(chan
);
338 if (data
[0] != INSN_CONFIG_FILTER
)
341 static const unsigned filter_resolution_ns
= 200;
342 static const unsigned max_filter_interval
= 0xfffff;
345 (filter_resolution_ns
/ 2)) / filter_resolution_ns
;
346 if (interval
> max_filter_interval
)
347 interval
= max_filter_interval
;
348 data
[1] = interval
* filter_resolution_ns
;
350 if (interval
!= private(dev
)->filter_interval
) {
352 private(dev
)->mite
->daq_io_addr
+
354 private(dev
)->filter_interval
= interval
;
357 private(dev
)->filter_enable
[port
] |=
358 1 << (chan
% ni_65xx_channels_per_port
);
360 private(dev
)->filter_enable
[port
] &=
361 ~(1 << (chan
% ni_65xx_channels_per_port
));
364 writeb(private(dev
)->filter_enable
[port
],
365 private(dev
)->mite
->daq_io_addr
+ Filter_Enable(port
));
370 static int ni_65xx_dio_insn_config(struct comedi_device
*dev
,
371 struct comedi_subdevice
*s
,
372 struct comedi_insn
*insn
, unsigned int *data
)
378 port
= sprivate(s
)->base_port
+
379 ni_65xx_port_by_channel(CR_CHAN(insn
->chanspec
));
381 case INSN_CONFIG_FILTER
:
382 return ni_65xx_config_filter(dev
, s
, insn
, data
);
384 case INSN_CONFIG_DIO_OUTPUT
:
385 if (s
->type
!= COMEDI_SUBD_DIO
)
387 private(dev
)->dio_direction
[port
] = COMEDI_OUTPUT
;
388 writeb(0, private(dev
)->mite
->daq_io_addr
+ Port_Select(port
));
391 case INSN_CONFIG_DIO_INPUT
:
392 if (s
->type
!= COMEDI_SUBD_DIO
)
394 private(dev
)->dio_direction
[port
] = COMEDI_INPUT
;
395 writeb(1, private(dev
)->mite
->daq_io_addr
+ Port_Select(port
));
398 case INSN_CONFIG_DIO_QUERY
:
399 if (s
->type
!= COMEDI_SUBD_DIO
)
401 data
[1] = private(dev
)->dio_direction
[port
];
410 static int ni_65xx_dio_insn_bits(struct comedi_device
*dev
,
411 struct comedi_subdevice
*s
,
412 struct comedi_insn
*insn
, unsigned int *data
)
414 unsigned base_bitfield_channel
;
415 const unsigned max_ports_per_bitfield
= 5;
416 unsigned read_bits
= 0;
419 base_bitfield_channel
= CR_CHAN(insn
->chanspec
);
420 for (j
= 0; j
< max_ports_per_bitfield
; ++j
) {
421 const unsigned port_offset
=
422 ni_65xx_port_by_channel(base_bitfield_channel
) + j
;
423 const unsigned port
=
424 sprivate(s
)->base_port
+ port_offset
;
425 unsigned base_port_channel
;
426 unsigned port_mask
, port_data
, port_read_bits
;
428 if (port
>= ni_65xx_total_num_ports(board(dev
)))
430 base_port_channel
= port_offset
* ni_65xx_channels_per_port
;
433 bitshift
= base_port_channel
- base_bitfield_channel
;
434 if (bitshift
>= 32 || bitshift
<= -32)
437 port_mask
>>= bitshift
;
438 port_data
>>= bitshift
;
440 port_mask
<<= -bitshift
;
441 port_data
<<= -bitshift
;
447 private(dev
)->output_bits
[port
] &= ~port_mask
;
448 private(dev
)->output_bits
[port
] |=
449 port_data
& port_mask
;
450 bits
= private(dev
)->output_bits
[port
];
451 if (board(dev
)->invert_outputs
)
454 private(dev
)->mite
->daq_io_addr
+
456 /* printk("wrote 0x%x to port %i\n", bits, port); */
459 readb(private(dev
)->mite
->daq_io_addr
+ Port_Data(port
));
460 /* printk("read 0x%x from port %i\n", port_read_bits, port); */
461 if (s
->type
== COMEDI_SUBD_DO
&& board(dev
)->invert_outputs
) {
462 /* Outputs inverted, so invert value read back from
463 * DO subdevice. (Does not apply to boards with DIO
465 port_read_bits
^= 0xFF;
468 port_read_bits
<<= bitshift
;
470 port_read_bits
>>= -bitshift
;
472 read_bits
|= port_read_bits
;
478 static irqreturn_t
ni_65xx_interrupt(int irq
, void *d
)
480 struct comedi_device
*dev
= d
;
481 struct comedi_subdevice
*s
= dev
->subdevices
+ 2;
484 status
= readb(private(dev
)->mite
->daq_io_addr
+ Change_Status
);
485 if ((status
& MasterInterruptStatus
) == 0)
487 if ((status
& EdgeStatus
) == 0)
490 writeb(ClrEdge
| ClrOverflow
,
491 private(dev
)->mite
->daq_io_addr
+ Clear_Register
);
493 comedi_buf_put(s
->async
, 0);
494 s
->async
->events
|= COMEDI_CB_EOS
;
495 comedi_event(dev
, s
);
499 static int ni_65xx_intr_cmdtest(struct comedi_device
*dev
,
500 struct comedi_subdevice
*s
,
501 struct comedi_cmd
*cmd
)
506 /* step 1: make sure trigger sources are trivially valid */
508 tmp
= cmd
->start_src
;
509 cmd
->start_src
&= TRIG_NOW
;
510 if (!cmd
->start_src
|| tmp
!= cmd
->start_src
)
513 tmp
= cmd
->scan_begin_src
;
514 cmd
->scan_begin_src
&= TRIG_OTHER
;
515 if (!cmd
->scan_begin_src
|| tmp
!= cmd
->scan_begin_src
)
518 tmp
= cmd
->convert_src
;
519 cmd
->convert_src
&= TRIG_FOLLOW
;
520 if (!cmd
->convert_src
|| tmp
!= cmd
->convert_src
)
523 tmp
= cmd
->scan_end_src
;
524 cmd
->scan_end_src
&= TRIG_COUNT
;
525 if (!cmd
->scan_end_src
|| tmp
!= cmd
->scan_end_src
)
529 cmd
->stop_src
&= TRIG_COUNT
;
530 if (!cmd
->stop_src
|| tmp
!= cmd
->stop_src
)
536 /* step 2: make sure trigger sources are unique and mutually
542 /* step 3: make sure arguments are trivially compatible */
544 if (cmd
->start_arg
!= 0) {
548 if (cmd
->scan_begin_arg
!= 0) {
549 cmd
->scan_begin_arg
= 0;
552 if (cmd
->convert_arg
!= 0) {
553 cmd
->convert_arg
= 0;
557 if (cmd
->scan_end_arg
!= 1) {
558 cmd
->scan_end_arg
= 1;
561 if (cmd
->stop_arg
!= 0) {
569 /* step 4: fix up any arguments */
577 static int ni_65xx_intr_cmd(struct comedi_device
*dev
,
578 struct comedi_subdevice
*s
)
580 /* struct comedi_cmd *cmd = &s->async->cmd; */
582 writeb(ClrEdge
| ClrOverflow
,
583 private(dev
)->mite
->daq_io_addr
+ Clear_Register
);
584 writeb(FallingEdgeIntEnable
| RisingEdgeIntEnable
|
585 MasterInterruptEnable
| EdgeIntEnable
,
586 private(dev
)->mite
->daq_io_addr
+ Master_Interrupt_Control
);
591 static int ni_65xx_intr_cancel(struct comedi_device
*dev
,
592 struct comedi_subdevice
*s
)
595 private(dev
)->mite
->daq_io_addr
+ Master_Interrupt_Control
);
600 static int ni_65xx_intr_insn_bits(struct comedi_device
*dev
,
601 struct comedi_subdevice
*s
,
602 struct comedi_insn
*insn
, unsigned int *data
)
608 static int ni_65xx_intr_insn_config(struct comedi_device
*dev
,
609 struct comedi_subdevice
*s
,
610 struct comedi_insn
*insn
,
615 if (data
[0] != INSN_CONFIG_CHANGE_NOTIFY
)
619 private(dev
)->mite
->daq_io_addr
+
620 Rising_Edge_Detection_Enable(0));
622 private(dev
)->mite
->daq_io_addr
+
623 Rising_Edge_Detection_Enable(0x10));
624 writeb(data
[1] >> 16,
625 private(dev
)->mite
->daq_io_addr
+
626 Rising_Edge_Detection_Enable(0x20));
627 writeb(data
[1] >> 24,
628 private(dev
)->mite
->daq_io_addr
+
629 Rising_Edge_Detection_Enable(0x30));
632 private(dev
)->mite
->daq_io_addr
+
633 Falling_Edge_Detection_Enable(0));
635 private(dev
)->mite
->daq_io_addr
+
636 Falling_Edge_Detection_Enable(0x10));
637 writeb(data
[2] >> 16,
638 private(dev
)->mite
->daq_io_addr
+
639 Falling_Edge_Detection_Enable(0x20));
640 writeb(data
[2] >> 24,
641 private(dev
)->mite
->daq_io_addr
+
642 Falling_Edge_Detection_Enable(0x30));
647 static int ni_65xx_attach(struct comedi_device
*dev
,
648 struct comedi_devconfig
*it
)
650 struct comedi_subdevice
*s
;
654 printk(KERN_INFO
"comedi%d: ni_65xx:", dev
->minor
);
656 ret
= alloc_private(dev
, sizeof(struct ni_65xx_private
));
660 ret
= ni_65xx_find_device(dev
, it
->options
[0], it
->options
[1]);
664 ret
= mite_setup(private(dev
)->mite
);
666 printk(KERN_WARNING
"error setting up mite\n");
670 dev
->board_name
= board(dev
)->name
;
671 dev
->irq
= mite_irq(private(dev
)->mite
);
672 printk(KERN_INFO
" %s", dev
->board_name
);
674 printk(KERN_INFO
" ID=0x%02x",
675 readb(private(dev
)->mite
->daq_io_addr
+ ID_Register
));
677 ret
= comedi_alloc_subdevices(dev
, 4);
681 s
= dev
->subdevices
+ 0;
682 if (board(dev
)->num_di_ports
) {
683 s
->type
= COMEDI_SUBD_DI
;
684 s
->subdev_flags
= SDF_READABLE
;
686 board(dev
)->num_di_ports
* ni_65xx_channels_per_port
;
687 s
->range_table
= &range_digital
;
689 s
->insn_config
= ni_65xx_dio_insn_config
;
690 s
->insn_bits
= ni_65xx_dio_insn_bits
;
691 s
->private = ni_65xx_alloc_subdevice_private();
692 if (s
->private == NULL
)
694 sprivate(s
)->base_port
= 0;
696 s
->type
= COMEDI_SUBD_UNUSED
;
699 s
= dev
->subdevices
+ 1;
700 if (board(dev
)->num_do_ports
) {
701 s
->type
= COMEDI_SUBD_DO
;
702 s
->subdev_flags
= SDF_READABLE
| SDF_WRITABLE
;
704 board(dev
)->num_do_ports
* ni_65xx_channels_per_port
;
705 s
->range_table
= &range_digital
;
707 s
->insn_bits
= ni_65xx_dio_insn_bits
;
708 s
->private = ni_65xx_alloc_subdevice_private();
709 if (s
->private == NULL
)
711 sprivate(s
)->base_port
= board(dev
)->num_di_ports
;
713 s
->type
= COMEDI_SUBD_UNUSED
;
716 s
= dev
->subdevices
+ 2;
717 if (board(dev
)->num_dio_ports
) {
718 s
->type
= COMEDI_SUBD_DIO
;
719 s
->subdev_flags
= SDF_READABLE
| SDF_WRITABLE
;
721 board(dev
)->num_dio_ports
* ni_65xx_channels_per_port
;
722 s
->range_table
= &range_digital
;
724 s
->insn_config
= ni_65xx_dio_insn_config
;
725 s
->insn_bits
= ni_65xx_dio_insn_bits
;
726 s
->private = ni_65xx_alloc_subdevice_private();
727 if (s
->private == NULL
)
729 sprivate(s
)->base_port
= 0;
730 for (i
= 0; i
< board(dev
)->num_dio_ports
; ++i
) {
731 /* configure all ports for input */
733 private(dev
)->mite
->daq_io_addr
+
737 s
->type
= COMEDI_SUBD_UNUSED
;
740 s
= dev
->subdevices
+ 3;
741 dev
->read_subdev
= s
;
742 s
->type
= COMEDI_SUBD_DI
;
743 s
->subdev_flags
= SDF_READABLE
| SDF_CMD_READ
;
745 s
->range_table
= &range_unknown
;
747 s
->do_cmdtest
= ni_65xx_intr_cmdtest
;
748 s
->do_cmd
= ni_65xx_intr_cmd
;
749 s
->cancel
= ni_65xx_intr_cancel
;
750 s
->insn_bits
= ni_65xx_intr_insn_bits
;
751 s
->insn_config
= ni_65xx_intr_insn_config
;
753 for (i
= 0; i
< ni_65xx_total_num_ports(board(dev
)); ++i
) {
755 private(dev
)->mite
->daq_io_addr
+ Filter_Enable(i
));
756 if (board(dev
)->invert_outputs
)
758 private(dev
)->mite
->daq_io_addr
+ Port_Data(i
));
761 private(dev
)->mite
->daq_io_addr
+ Port_Data(i
));
763 writeb(ClrEdge
| ClrOverflow
,
764 private(dev
)->mite
->daq_io_addr
+ Clear_Register
);
766 private(dev
)->mite
->daq_io_addr
+ Master_Interrupt_Control
);
768 /* Set filter interval to 0 (32bit reg) */
769 writeb(0x00000000, private(dev
)->mite
->daq_io_addr
+ Filter_Interval
);
771 ret
= request_irq(dev
->irq
, ni_65xx_interrupt
, IRQF_SHARED
,
775 printk(KERN_WARNING
" irq not available");
783 static void ni_65xx_detach(struct comedi_device
*dev
)
785 if (private(dev
) && private(dev
)->mite
786 && private(dev
)->mite
->daq_io_addr
) {
788 private(dev
)->mite
->daq_io_addr
+
789 Master_Interrupt_Control
);
792 free_irq(dev
->irq
, dev
);
795 for (i
= 0; i
< dev
->n_subdevices
; ++i
) {
796 kfree(dev
->subdevices
[i
].private);
797 dev
->subdevices
[i
].private = NULL
;
799 if (private(dev
)->mite
)
800 mite_unsetup(private(dev
)->mite
);
804 static int ni_65xx_find_device(struct comedi_device
*dev
, int bus
, int slot
)
806 struct mite_struct
*mite
;
809 for (mite
= mite_devices
; mite
; mite
= mite
->next
) {
813 if (bus
!= mite
->pcidev
->bus
->number
||
814 slot
!= PCI_SLOT(mite
->pcidev
->devfn
))
817 for (i
= 0; i
< n_ni_65xx_boards
; i
++) {
818 if (mite_device_id(mite
) == ni_65xx_boards
[i
].dev_id
) {
819 dev
->board_ptr
= ni_65xx_boards
+ i
;
820 private(dev
)->mite
= mite
;
825 printk(KERN_WARNING
"no device found\n");
830 static int __devinit
driver_ni_65xx_pci_probe(struct pci_dev
*dev
,
831 const struct pci_device_id
*ent
)
833 return comedi_pci_auto_config(dev
, &driver_ni_65xx
);
836 static void __devexit
driver_ni_65xx_pci_remove(struct pci_dev
*dev
)
838 comedi_pci_auto_unconfig(dev
);
841 static struct pci_driver driver_ni_65xx_pci_driver
= {
842 .id_table
= ni_65xx_pci_table
,
843 .probe
= &driver_ni_65xx_pci_probe
,
844 .remove
= __devexit_p(&driver_ni_65xx_pci_remove
)
847 static int __init
driver_ni_65xx_init_module(void)
851 retval
= comedi_driver_register(&driver_ni_65xx
);
855 driver_ni_65xx_pci_driver
.name
= (char *)driver_ni_65xx
.driver_name
;
856 return pci_register_driver(&driver_ni_65xx_pci_driver
);
859 static void __exit
driver_ni_65xx_cleanup_module(void)
861 pci_unregister_driver(&driver_ni_65xx_pci_driver
);
862 comedi_driver_unregister(&driver_ni_65xx
);
865 module_init(driver_ni_65xx_init_module
);
866 module_exit(driver_ni_65xx_cleanup_module
);
868 MODULE_AUTHOR("Comedi http://www.comedi.org");
869 MODULE_DESCRIPTION("Comedi low-level driver");
870 MODULE_LICENSE("GPL");