2 comedi/drivers/jr3_pci.c
3 hardware driver for JR3/PCI force sensor board
5 COMEDI - Linux Control and Measurement Device Interface
6 Copyright (C) 2007 Anders Blomdell <anders.blomdell@control.lth.se>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 Description: JR3/PCI force sensor board
26 Author: Anders Blomdell <anders.blomdell@control.lth.se>
28 Devices: [JR3] PCI force sensor board (jr3_pci)
30 The DSP on the board requires initialization code, which can
31 be loaded by placing it in /lib/firmware/comedi.
32 The initialization code should be somewhere on the media you got
33 with your card. One version is available from http://www.comedi.org
34 in the comedi_nonfree_firmware tarball.
36 Configuration options:
37 [0] - PCI bus number - if bus number and slot number are 0,
38 then driver search for first unused card
43 #include "../comedidev.h"
45 #include <linux/delay.h>
46 #include <linux/ctype.h>
47 #include <linux/firmware.h>
48 #include <linux/jiffies.h>
49 #include <linux/slab.h>
50 #include <linux/timer.h>
51 #include <linux/kernel.h>
54 #define PCI_VENDOR_ID_JR3 0x1762
55 #define PCI_DEVICE_ID_JR3_1_CHANNEL 0x3111
56 #define PCI_DEVICE_ID_JR3_1_CHANNEL_NEW 0x1111
57 #define PCI_DEVICE_ID_JR3_2_CHANNEL 0x3112
58 #define PCI_DEVICE_ID_JR3_3_CHANNEL 0x3113
59 #define PCI_DEVICE_ID_JR3_4_CHANNEL 0x3114
61 struct jr3_pci_dev_private {
63 struct pci_dev *pci_dev;
65 volatile struct jr3_t *iobase;
67 struct timer_list timer;
76 struct jr3_pci_subdev_private {
77 volatile struct jr3_channel *channel;
78 unsigned long next_time_min;
79 unsigned long next_time_max;
80 enum { state_jr3_poll,
81 state_jr3_init_wait_for_offset,
82 state_jr3_init_transform_complete,
83 state_jr3_init_set_full_scale_complete,
84 state_jr3_init_use_offset_complete,
92 struct comedi_krange range;
94 const struct comedi_lrange *range_table_list[8 * 7 + 2];
95 unsigned int maxdata_list[8 * 7 + 2];
100 /* Hotplug firmware loading stuff */
101 static int comedi_load_firmware(struct comedi_device *dev, char *name,
102 int (*cb)(struct comedi_device *dev,
103 const u8 *data, size_t size))
106 const struct firmware *fw;
108 static const char *prefix = "comedi/";
109 struct jr3_pci_dev_private *devpriv = dev->private;
111 firmware_path = kmalloc(strlen(prefix) + strlen(name) + 1, GFP_KERNEL);
112 if (!firmware_path) {
115 firmware_path[0] = '\0';
116 strcat(firmware_path, prefix);
117 strcat(firmware_path, name);
118 result = request_firmware(&fw, firmware_path,
119 &devpriv->pci_dev->dev);
124 result = cb(dev, fw->data, fw->size);
125 release_firmware(fw);
127 kfree(firmware_path);
132 static struct poll_delay_t poll_delay_min_max(int min, int max)
134 struct poll_delay_t result;
141 static int is_complete(volatile struct jr3_channel *channel)
143 return get_s16(&channel->command_word0) == 0;
153 static void set_transforms(volatile struct jr3_channel *channel,
154 struct transform_t transf, short num)
158 num &= 0x000f; /* Make sure that 0 <= num <= 15 */
159 for (i = 0; i < 8; i++) {
161 set_u16(&channel->transforms[num].link[i].link_type,
162 transf.link[i].link_type);
164 set_s16(&channel->transforms[num].link[i].link_amount,
165 transf.link[i].link_amount);
167 if (transf.link[i].link_type == end_x_form)
172 static void use_transform(volatile struct jr3_channel *channel,
175 set_s16(&channel->command_word0, 0x0500 + (transf_num & 0x000f));
178 static void use_offset(volatile struct jr3_channel *channel, short offset_num)
180 set_s16(&channel->command_word0, 0x0600 + (offset_num & 0x000f));
183 static void set_offset(volatile struct jr3_channel *channel)
185 set_s16(&channel->command_word0, 0x0700);
197 static void set_full_scales(volatile struct jr3_channel *channel,
198 struct six_axis_t full_scale)
200 printk("%d %d %d %d %d %d\n",
203 full_scale.fz, full_scale.mx, full_scale.my, full_scale.mz);
204 set_s16(&channel->full_scale.fx, full_scale.fx);
205 set_s16(&channel->full_scale.fy, full_scale.fy);
206 set_s16(&channel->full_scale.fz, full_scale.fz);
207 set_s16(&channel->full_scale.mx, full_scale.mx);
208 set_s16(&channel->full_scale.my, full_scale.my);
209 set_s16(&channel->full_scale.mz, full_scale.mz);
210 set_s16(&channel->command_word0, 0x0a00);
213 static struct six_axis_t get_min_full_scales(volatile struct jr3_channel
216 struct six_axis_t result;
217 result.fx = get_s16(&channel->min_full_scale.fx);
218 result.fy = get_s16(&channel->min_full_scale.fy);
219 result.fz = get_s16(&channel->min_full_scale.fz);
220 result.mx = get_s16(&channel->min_full_scale.mx);
221 result.my = get_s16(&channel->min_full_scale.my);
222 result.mz = get_s16(&channel->min_full_scale.mz);
226 static struct six_axis_t get_max_full_scales(volatile struct jr3_channel
229 struct six_axis_t result;
230 result.fx = get_s16(&channel->max_full_scale.fx);
231 result.fy = get_s16(&channel->max_full_scale.fy);
232 result.fz = get_s16(&channel->max_full_scale.fz);
233 result.mx = get_s16(&channel->max_full_scale.mx);
234 result.my = get_s16(&channel->max_full_scale.my);
235 result.mz = get_s16(&channel->max_full_scale.mz);
239 static int jr3_pci_ai_insn_read(struct comedi_device *dev,
240 struct comedi_subdevice *s,
241 struct comedi_insn *insn, unsigned int *data)
244 struct jr3_pci_subdev_private *p;
248 channel = CR_CHAN(insn->chanspec);
249 if (p == NULL || channel > 57) {
255 if (p->state != state_jr3_done ||
256 (get_u16(&p->channel->errors) & (watch_dog | watch_dog2 |
258 /* No sensor or sensor changed */
259 if (p->state == state_jr3_done) {
260 /* Restart polling */
261 p->state = state_jr3_poll;
265 for (i = 0; i < insn->n; i++) {
270 filter = channel / 8;
271 if (p->state != state_jr3_done) {
325 data[i] = F + 0x4000;
327 } else if (channel == 56) {
328 if (p->state != state_jr3_done) {
332 get_u16(&p->channel->model_no);
334 } else if (channel == 57) {
335 if (p->state != state_jr3_done) {
339 get_u16(&p->channel->serial_no);
347 static int jr3_pci_open(struct comedi_device *dev)
350 struct jr3_pci_dev_private *devpriv = dev->private;
352 dev_dbg(dev->hw_dev, "jr3_pci_open\n");
353 for (i = 0; i < devpriv->n_channels; i++) {
354 struct jr3_pci_subdev_private *p;
356 p = dev->subdevices[i].private;
358 dev_dbg(dev->hw_dev, "serial: %p %d (%d)\n", p,
359 p->serial_no, p->channel_no);
365 int read_idm_word(const u8 * data, size_t size, int *pos, unsigned int *val)
368 if (pos != 0 && val != 0) {
369 /* Skip over non hex */
370 for (; *pos < size && !isxdigit(data[*pos]); (*pos)++) {
374 for (; *pos < size; (*pos)++) {
376 value = hex_to_bin(data[*pos]);
379 *val = (*val << 4) + value;
387 static int jr3_download_firmware(struct comedi_device *dev, const u8 * data,
391 * IDM file format is:
392 * { count, address, data <count> } *
395 int result, more, pos, OK;
402 unsigned int count, addr;
404 more = more && read_idm_word(data, size, &pos, &count);
405 if (more && count == 0xffff) {
409 more = more && read_idm_word(data, size, &pos, &addr);
410 while (more && count > 0) {
412 more = more && read_idm_word(data, size, &pos, &dummy);
421 struct jr3_pci_dev_private *p = dev->private;
423 for (i = 0; i < p->n_channels; i++) {
424 struct jr3_pci_subdev_private *sp;
426 sp = dev->subdevices[i].private;
430 unsigned int count, addr;
432 && read_idm_word(data, size, &pos, &count);
433 if (more && count == 0xffff)
436 && read_idm_word(data, size, &pos, &addr);
437 dev_dbg(dev->hw_dev, "Loading#%d %4.4x bytes at %4.4x\n",
439 while (more && count > 0) {
441 /* 16 bit data, never seen in real life!! */
445 && read_idm_word(data,
449 /* printk("jr3_data, not tested\n"); */
450 /* jr3[addr + 0x20000 * pnum] = data1; */
452 /* Download 24 bit program */
453 unsigned int data1, data2;
456 && read_idm_word(data,
460 && read_idm_word(data, size,
486 static struct poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice *s)
488 struct poll_delay_t result = poll_delay_min_max(1000, 2000);
489 struct jr3_pci_subdev_private *p = s->private;
493 volatile struct jr3_channel *channel = p->channel;
494 int errors = get_u16(&channel->errors);
496 if (errors != p->errors) {
497 printk("Errors: %x -> %x\n", p->errors, errors);
500 if (errors & (watch_dog | watch_dog2 | sensor_change)) {
501 /* Sensor communication lost, force poll mode */
502 p->state = state_jr3_poll;
506 case state_jr3_poll:{
507 u16 model_no = get_u16(&channel->model_no);
508 u16 serial_no = get_u16(&channel->serial_no);
509 if ((errors & (watch_dog | watch_dog2)) ||
510 model_no == 0 || serial_no == 0) {
512 * Still no sensor, keep on polling. Since it takes up to 10 seconds
513 * for offsets to stabilize, polling each second should suffice.
515 result = poll_delay_min_max(1000, 2000);
519 state_jr3_init_wait_for_offset;
520 result = poll_delay_min_max(1000, 2000);
524 case state_jr3_init_wait_for_offset:{
526 if (p->retries < 10) {
527 /* Wait for offeset to stabilize (< 10 s according to manual) */
528 result = poll_delay_min_max(1000, 2000);
530 struct transform_t transf;
533 get_u16(&channel->model_no);
535 get_u16(&channel->serial_no);
538 ("Setting transform for channel %d\n",
540 printk("Sensor Model = %i\n",
542 printk("Sensor Serial = %i\n",
545 /* Transformation all zeros */
546 for (i = 0; i < ARRAY_SIZE(transf.link); i++) {
547 transf.link[i].link_type =
549 transf.link[i].link_amount = 0;
552 set_transforms(channel, transf, 0);
553 use_transform(channel, 0);
555 state_jr3_init_transform_complete;
556 result = poll_delay_min_max(20, 100); /* Allow 20 ms for completion */
559 case state_jr3_init_transform_complete:{
560 if (!is_complete(channel)) {
562 ("state_jr3_init_transform_complete complete = %d\n",
563 is_complete(channel));
564 result = poll_delay_min_max(20, 100);
567 struct six_axis_t min_full_scale;
568 struct six_axis_t max_full_scale;
571 get_min_full_scales(channel);
572 printk("Obtained Min. Full Scales:\n");
573 printk(KERN_DEBUG "%i ", (min_full_scale).fx);
574 printk(KERN_CONT "%i ", (min_full_scale).fy);
575 printk(KERN_CONT "%i ", (min_full_scale).fz);
576 printk(KERN_CONT "%i ", (min_full_scale).mx);
577 printk(KERN_CONT "%i ", (min_full_scale).my);
578 printk(KERN_CONT "%i ", (min_full_scale).mz);
579 printk(KERN_CONT "\n");
582 get_max_full_scales(channel);
583 printk("Obtained Max. Full Scales:\n");
584 printk(KERN_DEBUG "%i ", (max_full_scale).fx);
585 printk(KERN_CONT "%i ", (max_full_scale).fy);
586 printk(KERN_CONT "%i ", (max_full_scale).fz);
587 printk(KERN_CONT "%i ", (max_full_scale).mx);
588 printk(KERN_CONT "%i ", (max_full_scale).my);
589 printk(KERN_CONT "%i ", (max_full_scale).mz);
590 printk(KERN_CONT "\n");
592 set_full_scales(channel,
596 state_jr3_init_set_full_scale_complete;
597 result = poll_delay_min_max(20, 100); /* Allow 20 ms for completion */
601 case state_jr3_init_set_full_scale_complete:{
602 if (!is_complete(channel)) {
604 ("state_jr3_init_set_full_scale_complete complete = %d\n",
605 is_complete(channel));
606 result = poll_delay_min_max(20, 100);
608 volatile struct force_array *full_scale;
610 /* Use ranges in kN or we will overflow arount 2000N! */
611 full_scale = &channel->full_scale;
612 p->range[0].range.min =
613 -get_s16(&full_scale->fx) * 1000;
614 p->range[0].range.max =
615 get_s16(&full_scale->fx) * 1000;
616 p->range[1].range.min =
617 -get_s16(&full_scale->fy) * 1000;
618 p->range[1].range.max =
619 get_s16(&full_scale->fy) * 1000;
620 p->range[2].range.min =
621 -get_s16(&full_scale->fz) * 1000;
622 p->range[2].range.max =
623 get_s16(&full_scale->fz) * 1000;
624 p->range[3].range.min =
625 -get_s16(&full_scale->mx) * 100;
626 p->range[3].range.max =
627 get_s16(&full_scale->mx) * 100;
628 p->range[4].range.min =
629 -get_s16(&full_scale->my) * 100;
630 p->range[4].range.max =
631 get_s16(&full_scale->my) * 100;
632 p->range[5].range.min =
633 -get_s16(&full_scale->mz) * 100;
634 p->range[5].range.max =
635 get_s16(&full_scale->mz) * 100;
636 p->range[6].range.min = -get_s16(&full_scale->v1) * 100; /* ?? */
637 p->range[6].range.max = get_s16(&full_scale->v1) * 100; /* ?? */
638 p->range[7].range.min = -get_s16(&full_scale->v2) * 100; /* ?? */
639 p->range[7].range.max = get_s16(&full_scale->v2) * 100; /* ?? */
640 p->range[8].range.min = 0;
641 p->range[8].range.max = 65535;
645 for (i = 0; i < 9; i++) {
646 printk("%d %d - %d\n",
657 use_offset(channel, 0);
659 state_jr3_init_use_offset_complete;
660 result = poll_delay_min_max(40, 100); /* Allow 40 ms for completion */
664 case state_jr3_init_use_offset_complete:{
665 if (!is_complete(channel)) {
667 ("state_jr3_init_use_offset_complete complete = %d\n",
668 is_complete(channel));
669 result = poll_delay_min_max(20, 100);
672 ("Default offsets %d %d %d %d %d %d\n",
673 get_s16(&channel->offsets.fx),
674 get_s16(&channel->offsets.fy),
675 get_s16(&channel->offsets.fz),
676 get_s16(&channel->offsets.mx),
677 get_s16(&channel->offsets.my),
678 get_s16(&channel->offsets.mz));
680 set_s16(&channel->offsets.fx, 0);
681 set_s16(&channel->offsets.fy, 0);
682 set_s16(&channel->offsets.fz, 0);
683 set_s16(&channel->offsets.mx, 0);
684 set_s16(&channel->offsets.my, 0);
685 set_s16(&channel->offsets.mz, 0);
689 p->state = state_jr3_done;
693 case state_jr3_done:{
694 poll_delay_min_max(10000, 20000);
698 poll_delay_min_max(1000, 2000);
706 static void jr3_pci_poll_dev(unsigned long data)
709 struct comedi_device *dev = (struct comedi_device *)data;
710 struct jr3_pci_dev_private *devpriv = dev->private;
715 spin_lock_irqsave(&dev->spinlock, flags);
718 /* Poll all channels that are ready to be polled */
719 for (i = 0; i < devpriv->n_channels; i++) {
720 struct jr3_pci_subdev_private *subdevpriv =
721 dev->subdevices[i].private;
722 if (now > subdevpriv->next_time_min) {
723 struct poll_delay_t sub_delay;
725 sub_delay = jr3_pci_poll_subdevice(&dev->subdevices[i]);
726 subdevpriv->next_time_min =
727 jiffies + msecs_to_jiffies(sub_delay.min);
728 subdevpriv->next_time_max =
729 jiffies + msecs_to_jiffies(sub_delay.max);
730 if (sub_delay.max && sub_delay.max < delay) {
732 * Wake up as late as possible -> poll as many channels as possible
735 delay = sub_delay.max;
739 spin_unlock_irqrestore(&dev->spinlock, flags);
741 devpriv->timer.expires = jiffies + msecs_to_jiffies(delay);
742 add_timer(&devpriv->timer);
745 static int jr3_pci_attach(struct comedi_device *dev,
746 struct comedi_devconfig *it)
749 struct pci_dev *card = NULL;
750 int opt_bus, opt_slot, i;
751 struct jr3_pci_dev_private *devpriv;
753 opt_bus = it->options[0];
754 opt_slot = it->options[1];
756 if (sizeof(struct jr3_channel) != 0xc00) {
757 dev_err(dev->hw_dev, "sizeof(struct jr3_channel) = %x [expected %x]\n",
758 (unsigned)sizeof(struct jr3_channel), 0xc00);
762 result = alloc_private(dev, sizeof(struct jr3_pci_dev_private));
766 devpriv = dev->private;
767 init_timer(&devpriv->timer);
769 card = pci_get_device(PCI_VENDOR_ID_JR3, PCI_ANY_ID, card);
774 switch (card->device) {
775 case PCI_DEVICE_ID_JR3_1_CHANNEL:{
776 devpriv->n_channels = 1;
779 case PCI_DEVICE_ID_JR3_1_CHANNEL_NEW:{
780 devpriv->n_channels = 1;
783 case PCI_DEVICE_ID_JR3_2_CHANNEL:{
784 devpriv->n_channels = 2;
787 case PCI_DEVICE_ID_JR3_3_CHANNEL:{
788 devpriv->n_channels = 3;
791 case PCI_DEVICE_ID_JR3_4_CHANNEL:{
792 devpriv->n_channels = 4;
796 devpriv->n_channels = 0;
799 if (devpriv->n_channels >= 1) {
800 if (opt_bus == 0 && opt_slot == 0) {
801 /* Take first available card */
803 } else if (opt_bus == card->bus->number &&
804 opt_slot == PCI_SLOT(card->devfn)) {
805 /* Take requested card */
812 dev_err(dev->hw_dev, "no jr3_pci found\n");
815 devpriv->pci_dev = card;
816 dev->board_name = "jr3_pci";
819 result = comedi_pci_enable(card, "jr3_pci");
823 devpriv->pci_enabled = 1;
824 devpriv->iobase = ioremap(pci_resource_start(card, 0),
825 offsetof(struct jr3_t, channel[devpriv->n_channels]));
826 if (!devpriv->iobase)
829 result = alloc_subdevices(dev, devpriv->n_channels);
833 dev->open = jr3_pci_open;
834 for (i = 0; i < devpriv->n_channels; i++) {
835 dev->subdevices[i].type = COMEDI_SUBD_AI;
836 dev->subdevices[i].subdev_flags = SDF_READABLE | SDF_GROUND;
837 dev->subdevices[i].n_chan = 8 * 7 + 2;
838 dev->subdevices[i].insn_read = jr3_pci_ai_insn_read;
839 dev->subdevices[i].private =
840 kzalloc(sizeof(struct jr3_pci_subdev_private), GFP_KERNEL);
841 if (dev->subdevices[i].private) {
842 struct jr3_pci_subdev_private *p;
845 p = dev->subdevices[i].private;
846 p->channel = &devpriv->iobase->channel[i].data;
847 dev_dbg(dev->hw_dev, "p->channel %p %p (%tx)\n",
848 p->channel, devpriv->iobase,
849 ((char *)(p->channel) -
850 (char *)(devpriv->iobase)));
852 for (j = 0; j < 8; j++) {
855 p->range[j].length = 1;
856 p->range[j].range.min = -1000000;
857 p->range[j].range.max = 1000000;
858 for (k = 0; k < 7; k++) {
859 p->range_table_list[j + k * 8] =
860 (struct comedi_lrange *)&p->
862 p->maxdata_list[j + k * 8] = 0x7fff;
865 p->range[8].length = 1;
866 p->range[8].range.min = 0;
867 p->range[8].range.max = 65536;
869 p->range_table_list[56] =
870 (struct comedi_lrange *)&p->range[8];
871 p->range_table_list[57] =
872 (struct comedi_lrange *)&p->range[8];
873 p->maxdata_list[56] = 0xffff;
874 p->maxdata_list[57] = 0xffff;
875 /* Channel specific range and maxdata */
876 dev->subdevices[i].range_table = 0;
877 dev->subdevices[i].range_table_list =
879 dev->subdevices[i].maxdata = 0;
880 dev->subdevices[i].maxdata_list = p->maxdata_list;
885 devpriv->iobase->channel[0].reset = 0;
887 result = comedi_load_firmware(dev, "jr3pci.idm", jr3_download_firmware);
888 dev_dbg(dev->hw_dev, "Firmare load %d\n", result);
893 * TODO: use firmware to load preferred offset tables. Suggested
895 * model serial Fx Fy Fz Mx My Mz\n
897 * comedi_load_firmware(dev, "jr3_offsets_table", jr3_download_firmware);
901 * It takes a few milliseconds for software to settle as much as we
902 * can read firmware version
904 msleep_interruptible(25);
905 for (i = 0; i < 0x18; i++) {
906 dev_dbg(dev->hw_dev, "%c\n",
907 get_u16(&devpriv->iobase->channel[0].
908 data.copyright[i]) >> 8);
911 /* Start card timer */
912 for (i = 0; i < devpriv->n_channels; i++) {
913 struct jr3_pci_subdev_private *p = dev->subdevices[i].private;
915 p->next_time_min = jiffies + msecs_to_jiffies(500);
916 p->next_time_max = jiffies + msecs_to_jiffies(2000);
919 devpriv->timer.data = (unsigned long)dev;
920 devpriv->timer.function = jr3_pci_poll_dev;
921 devpriv->timer.expires = jiffies + msecs_to_jiffies(1000);
922 add_timer(&devpriv->timer);
928 static void jr3_pci_detach(struct comedi_device *dev)
931 struct jr3_pci_dev_private *devpriv = dev->private;
934 del_timer_sync(&devpriv->timer);
936 if (dev->subdevices) {
937 for (i = 0; i < devpriv->n_channels; i++)
938 kfree(dev->subdevices[i].private);
941 iounmap((void *)devpriv->iobase);
942 if (devpriv->pci_enabled)
943 comedi_pci_disable(devpriv->pci_dev);
944 if (devpriv->pci_dev)
945 pci_dev_put(devpriv->pci_dev);
949 static struct comedi_driver jr3_pci_driver = {
950 .driver_name = "jr3_pci",
951 .module = THIS_MODULE,
952 .attach = jr3_pci_attach,
953 .detach = jr3_pci_detach,
956 static int __devinit jr3_pci_pci_probe(struct pci_dev *dev,
957 const struct pci_device_id *ent)
959 return comedi_pci_auto_config(dev, &jr3_pci_driver);
962 static void __devexit jr3_pci_pci_remove(struct pci_dev *dev)
964 comedi_pci_auto_unconfig(dev);
967 static DEFINE_PCI_DEVICE_TABLE(jr3_pci_pci_table) = {
968 { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_1_CHANNEL) },
969 { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_1_CHANNEL_NEW) },
970 { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_2_CHANNEL) },
971 { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_3_CHANNEL) },
972 { PCI_DEVICE(PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_4_CHANNEL) },
975 MODULE_DEVICE_TABLE(pci, jr3_pci_pci_table);
977 static struct pci_driver jr3_pci_pci_driver = {
979 .id_table = jr3_pci_pci_table,
980 .probe = jr3_pci_pci_probe,
981 .remove = __devexit_p(jr3_pci_pci_remove),
983 module_comedi_pci_driver(jr3_pci_driver, jr3_pci_pci_driver);
985 MODULE_AUTHOR("Comedi http://www.comedi.org");
986 MODULE_DESCRIPTION("Comedi low-level driver");
987 MODULE_LICENSE("GPL");
988 MODULE_FIRMWARE("comedi/jr3pci.idm");