3 * Velleman USB Board Low-Level Driver
5 * Copyright (C) 2009 Manuel Gebele <forensixs@gmx.de>, Germany
7 * COMEDI - Linux Control and Measurement Device Interface
8 * Copyright (C) 2000 David A. Schleef <ds@schleef.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
23 * Description: Velleman USB Board Low-Level Driver
24 * Devices: [Velleman] K8055 (K8055/VM110), K8061 (K8061/VM140),
25 * VM110 (K8055/VM110), VM140 (K8061/VM140)
26 * Author: Manuel Gebele <forensixs@gmx.de>
27 * Updated: Sun, 10 May 2009 11:14:59 +0200
39 #include <linux/kernel.h>
40 #include <linux/module.h>
41 #include <linux/mutex.h>
42 #include <linux/errno.h>
43 #include <linux/input.h>
44 #include <linux/slab.h>
45 #include <linux/poll.h>
46 #include <linux/uaccess.h>
48 #include "../comedi_usb.h"
55 #define VMK8055_DI_REG 0x00
56 #define VMK8055_DO_REG 0x01
57 #define VMK8055_AO1_REG 0x02
58 #define VMK8055_AO2_REG 0x03
59 #define VMK8055_AI1_REG 0x02
60 #define VMK8055_AI2_REG 0x03
61 #define VMK8055_CNT1_REG 0x04
62 #define VMK8055_CNT2_REG 0x06
64 #define VMK8061_CH_REG 0x01
65 #define VMK8061_DI_REG 0x01
66 #define VMK8061_DO_REG 0x01
67 #define VMK8061_PWM_REG1 0x01
68 #define VMK8061_PWM_REG2 0x02
69 #define VMK8061_CNT_REG 0x02
70 #define VMK8061_AO_REG 0x02
71 #define VMK8061_AI_REG1 0x02
72 #define VMK8061_AI_REG2 0x03
74 #define VMK8055_CMD_RST 0x00
75 #define VMK8055_CMD_DEB1_TIME 0x01
76 #define VMK8055_CMD_DEB2_TIME 0x02
77 #define VMK8055_CMD_RST_CNT1 0x03
78 #define VMK8055_CMD_RST_CNT2 0x04
79 #define VMK8055_CMD_WRT_AD 0x05
81 #define VMK8061_CMD_RD_AI 0x00
82 #define VMK8061_CMR_RD_ALL_AI 0x01 /* !non-active! */
83 #define VMK8061_CMD_SET_AO 0x02
84 #define VMK8061_CMD_SET_ALL_AO 0x03 /* !non-active! */
85 #define VMK8061_CMD_OUT_PWM 0x04
86 #define VMK8061_CMD_RD_DI 0x05
87 #define VMK8061_CMD_DO 0x06 /* !non-active! */
88 #define VMK8061_CMD_CLR_DO 0x07
89 #define VMK8061_CMD_SET_DO 0x08
90 #define VMK8061_CMD_RD_CNT 0x09 /* TODO: completely pointless? */
91 #define VMK8061_CMD_RST_CNT 0x0a /* TODO: completely pointless? */
92 #define VMK8061_CMD_RD_VERSION 0x0b /* internal usage */
93 #define VMK8061_CMD_RD_JMP_STAT 0x0c /* TODO: not implemented yet */
94 #define VMK8061_CMD_RD_PWR_STAT 0x0d /* internal usage */
95 #define VMK8061_CMD_RD_DO 0x0e
96 #define VMK8061_CMD_RD_AO 0x0f
97 #define VMK8061_CMD_RD_PWM 0x10
99 #define IC3_VERSION BIT(0)
100 #define IC6_VERSION BIT(1)
107 static const struct comedi_lrange vmk8061_range = {
114 struct vmk80xx_board {
116 enum vmk80xx_model model;
117 const struct comedi_lrange *range;
119 unsigned int ai_maxdata;
122 unsigned int cnt_maxdata;
124 unsigned int pwm_maxdata;
127 static const struct vmk80xx_board vmk80xx_boardinfo[] = {
129 .name = "K8055 (VM110)",
130 .model = VMK8055_MODEL,
131 .range = &range_unipolar5,
133 .ai_maxdata = 0x00ff,
136 .cnt_maxdata = 0xffff,
139 .name = "K8061 (VM140)",
140 .model = VMK8061_MODEL,
141 .range = &vmk8061_range,
143 .ai_maxdata = 0x03ff,
146 .cnt_maxdata = 0, /* unknown, device is not writeable */
148 .pwm_maxdata = 0x03ff,
152 struct vmk80xx_private {
153 struct usb_endpoint_descriptor *ep_rx;
154 struct usb_endpoint_descriptor *ep_tx;
155 struct semaphore limit_sem;
156 unsigned char *usb_rx_buf;
157 unsigned char *usb_tx_buf;
158 enum vmk80xx_model model;
161 static void vmk80xx_do_bulk_msg(struct comedi_device *dev)
163 struct vmk80xx_private *devpriv = dev->private;
164 struct usb_device *usb = comedi_to_usb_dev(dev);
167 unsigned int tx_pipe;
168 unsigned int rx_pipe;
171 tx_addr = devpriv->ep_tx->bEndpointAddress;
172 rx_addr = devpriv->ep_rx->bEndpointAddress;
173 tx_pipe = usb_sndbulkpipe(usb, tx_addr);
174 rx_pipe = usb_rcvbulkpipe(usb, rx_addr);
177 * The max packet size attributes of the K8061
178 * input/output endpoints are identical
180 size = usb_endpoint_maxp(devpriv->ep_tx);
182 usb_bulk_msg(usb, tx_pipe, devpriv->usb_tx_buf,
183 size, NULL, devpriv->ep_tx->bInterval);
184 usb_bulk_msg(usb, rx_pipe, devpriv->usb_rx_buf, size, NULL, HZ * 10);
187 static int vmk80xx_read_packet(struct comedi_device *dev)
189 struct vmk80xx_private *devpriv = dev->private;
190 struct usb_device *usb = comedi_to_usb_dev(dev);
191 struct usb_endpoint_descriptor *ep;
194 if (devpriv->model == VMK8061_MODEL) {
195 vmk80xx_do_bulk_msg(dev);
200 pipe = usb_rcvintpipe(usb, ep->bEndpointAddress);
201 return usb_interrupt_msg(usb, pipe, devpriv->usb_rx_buf,
202 usb_endpoint_maxp(ep), NULL,
206 static int vmk80xx_write_packet(struct comedi_device *dev, int cmd)
208 struct vmk80xx_private *devpriv = dev->private;
209 struct usb_device *usb = comedi_to_usb_dev(dev);
210 struct usb_endpoint_descriptor *ep;
213 devpriv->usb_tx_buf[0] = cmd;
215 if (devpriv->model == VMK8061_MODEL) {
216 vmk80xx_do_bulk_msg(dev);
221 pipe = usb_sndintpipe(usb, ep->bEndpointAddress);
222 return usb_interrupt_msg(usb, pipe, devpriv->usb_tx_buf,
223 usb_endpoint_maxp(ep), NULL,
227 static int vmk80xx_reset_device(struct comedi_device *dev)
229 struct vmk80xx_private *devpriv = dev->private;
233 size = usb_endpoint_maxp(devpriv->ep_tx);
234 memset(devpriv->usb_tx_buf, 0, size);
235 retval = vmk80xx_write_packet(dev, VMK8055_CMD_RST);
238 /* set outputs to known state as we cannot read them */
239 return vmk80xx_write_packet(dev, VMK8055_CMD_WRT_AD);
242 static int vmk80xx_ai_insn_read(struct comedi_device *dev,
243 struct comedi_subdevice *s,
244 struct comedi_insn *insn,
247 struct vmk80xx_private *devpriv = dev->private;
252 down(&devpriv->limit_sem);
253 chan = CR_CHAN(insn->chanspec);
255 switch (devpriv->model) {
258 reg[0] = VMK8055_AI1_REG;
260 reg[0] = VMK8055_AI2_REG;
264 reg[0] = VMK8061_AI_REG1;
265 reg[1] = VMK8061_AI_REG2;
266 devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_AI;
267 devpriv->usb_tx_buf[VMK8061_CH_REG] = chan;
271 for (n = 0; n < insn->n; n++) {
272 if (vmk80xx_read_packet(dev))
275 if (devpriv->model == VMK8055_MODEL) {
276 data[n] = devpriv->usb_rx_buf[reg[0]];
281 data[n] = devpriv->usb_rx_buf[reg[0]] + 256 *
282 devpriv->usb_rx_buf[reg[1]];
285 up(&devpriv->limit_sem);
290 static int vmk80xx_ao_insn_write(struct comedi_device *dev,
291 struct comedi_subdevice *s,
292 struct comedi_insn *insn,
295 struct vmk80xx_private *devpriv = dev->private;
301 down(&devpriv->limit_sem);
302 chan = CR_CHAN(insn->chanspec);
304 switch (devpriv->model) {
306 cmd = VMK8055_CMD_WRT_AD;
308 reg = VMK8055_AO1_REG;
310 reg = VMK8055_AO2_REG;
312 default: /* NOTE: avoid compiler warnings */
313 cmd = VMK8061_CMD_SET_AO;
314 reg = VMK8061_AO_REG;
315 devpriv->usb_tx_buf[VMK8061_CH_REG] = chan;
319 for (n = 0; n < insn->n; n++) {
320 devpriv->usb_tx_buf[reg] = data[n];
322 if (vmk80xx_write_packet(dev, cmd))
326 up(&devpriv->limit_sem);
331 static int vmk80xx_ao_insn_read(struct comedi_device *dev,
332 struct comedi_subdevice *s,
333 struct comedi_insn *insn,
336 struct vmk80xx_private *devpriv = dev->private;
341 down(&devpriv->limit_sem);
342 chan = CR_CHAN(insn->chanspec);
344 reg = VMK8061_AO_REG - 1;
346 devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_AO;
348 for (n = 0; n < insn->n; n++) {
349 if (vmk80xx_read_packet(dev))
352 data[n] = devpriv->usb_rx_buf[reg + chan];
355 up(&devpriv->limit_sem);
360 static int vmk80xx_di_insn_bits(struct comedi_device *dev,
361 struct comedi_subdevice *s,
362 struct comedi_insn *insn,
365 struct vmk80xx_private *devpriv = dev->private;
366 unsigned char *rx_buf;
370 down(&devpriv->limit_sem);
372 rx_buf = devpriv->usb_rx_buf;
374 if (devpriv->model == VMK8061_MODEL) {
375 reg = VMK8061_DI_REG;
376 devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_DI;
378 reg = VMK8055_DI_REG;
381 retval = vmk80xx_read_packet(dev);
384 if (devpriv->model == VMK8055_MODEL)
385 data[1] = (((rx_buf[reg] >> 4) & 0x03) |
386 ((rx_buf[reg] << 2) & 0x04) |
387 ((rx_buf[reg] >> 3) & 0x18));
389 data[1] = rx_buf[reg];
394 up(&devpriv->limit_sem);
399 static int vmk80xx_do_insn_bits(struct comedi_device *dev,
400 struct comedi_subdevice *s,
401 struct comedi_insn *insn,
404 struct vmk80xx_private *devpriv = dev->private;
405 unsigned char *rx_buf = devpriv->usb_rx_buf;
406 unsigned char *tx_buf = devpriv->usb_tx_buf;
410 if (devpriv->model == VMK8061_MODEL) {
411 reg = VMK8061_DO_REG;
412 cmd = VMK8061_CMD_DO;
413 } else { /* VMK8055_MODEL */
414 reg = VMK8055_DO_REG;
415 cmd = VMK8055_CMD_WRT_AD;
418 down(&devpriv->limit_sem);
420 if (comedi_dio_update_state(s, data)) {
421 tx_buf[reg] = s->state;
422 ret = vmk80xx_write_packet(dev, cmd);
427 if (devpriv->model == VMK8061_MODEL) {
428 tx_buf[0] = VMK8061_CMD_RD_DO;
429 ret = vmk80xx_read_packet(dev);
432 data[1] = rx_buf[reg];
438 up(&devpriv->limit_sem);
440 return ret ? ret : insn->n;
443 static int vmk80xx_cnt_insn_read(struct comedi_device *dev,
444 struct comedi_subdevice *s,
445 struct comedi_insn *insn,
448 struct vmk80xx_private *devpriv = dev->private;
453 down(&devpriv->limit_sem);
454 chan = CR_CHAN(insn->chanspec);
456 switch (devpriv->model) {
459 reg[0] = VMK8055_CNT1_REG;
461 reg[0] = VMK8055_CNT2_REG;
465 reg[0] = VMK8061_CNT_REG;
466 reg[1] = VMK8061_CNT_REG;
467 devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_CNT;
471 for (n = 0; n < insn->n; n++) {
472 if (vmk80xx_read_packet(dev))
475 if (devpriv->model == VMK8055_MODEL)
476 data[n] = devpriv->usb_rx_buf[reg[0]];
477 else /* VMK8061_MODEL */
478 data[n] = devpriv->usb_rx_buf[reg[0] * (chan + 1) + 1]
479 + 256 * devpriv->usb_rx_buf[reg[1] * 2 + 2];
482 up(&devpriv->limit_sem);
487 static int vmk80xx_cnt_insn_config(struct comedi_device *dev,
488 struct comedi_subdevice *s,
489 struct comedi_insn *insn,
492 struct vmk80xx_private *devpriv = dev->private;
493 unsigned int chan = CR_CHAN(insn->chanspec);
498 down(&devpriv->limit_sem);
500 case INSN_CONFIG_RESET:
501 if (devpriv->model == VMK8055_MODEL) {
503 cmd = VMK8055_CMD_RST_CNT1;
504 reg = VMK8055_CNT1_REG;
506 cmd = VMK8055_CMD_RST_CNT2;
507 reg = VMK8055_CNT2_REG;
509 devpriv->usb_tx_buf[reg] = 0x00;
511 cmd = VMK8061_CMD_RST_CNT;
513 ret = vmk80xx_write_packet(dev, cmd);
519 up(&devpriv->limit_sem);
521 return ret ? ret : insn->n;
524 static int vmk80xx_cnt_insn_write(struct comedi_device *dev,
525 struct comedi_subdevice *s,
526 struct comedi_insn *insn,
529 struct vmk80xx_private *devpriv = dev->private;
530 unsigned long debtime;
536 down(&devpriv->limit_sem);
537 chan = CR_CHAN(insn->chanspec);
540 cmd = VMK8055_CMD_DEB1_TIME;
542 cmd = VMK8055_CMD_DEB2_TIME;
544 for (n = 0; n < insn->n; n++) {
549 /* TODO: Prevent overflows */
553 val = int_sqrt(debtime * 1000 / 115);
554 if (((val + 1) * val) < debtime * 1000 / 115)
557 devpriv->usb_tx_buf[6 + chan] = val;
559 if (vmk80xx_write_packet(dev, cmd))
563 up(&devpriv->limit_sem);
568 static int vmk80xx_pwm_insn_read(struct comedi_device *dev,
569 struct comedi_subdevice *s,
570 struct comedi_insn *insn,
573 struct vmk80xx_private *devpriv = dev->private;
574 unsigned char *tx_buf;
575 unsigned char *rx_buf;
579 down(&devpriv->limit_sem);
581 tx_buf = devpriv->usb_tx_buf;
582 rx_buf = devpriv->usb_rx_buf;
584 reg[0] = VMK8061_PWM_REG1;
585 reg[1] = VMK8061_PWM_REG2;
587 tx_buf[0] = VMK8061_CMD_RD_PWM;
589 for (n = 0; n < insn->n; n++) {
590 if (vmk80xx_read_packet(dev))
593 data[n] = rx_buf[reg[0]] + 4 * rx_buf[reg[1]];
596 up(&devpriv->limit_sem);
601 static int vmk80xx_pwm_insn_write(struct comedi_device *dev,
602 struct comedi_subdevice *s,
603 struct comedi_insn *insn,
606 struct vmk80xx_private *devpriv = dev->private;
607 unsigned char *tx_buf;
612 down(&devpriv->limit_sem);
614 tx_buf = devpriv->usb_tx_buf;
616 reg[0] = VMK8061_PWM_REG1;
617 reg[1] = VMK8061_PWM_REG2;
619 cmd = VMK8061_CMD_OUT_PWM;
622 * The followin piece of code was translated from the inline
623 * assembler code in the DLL source code.
626 * mov eax, k ; k is the value (data[n])
627 * and al, 03h ; al are the lower 8 bits of eax
628 * mov lo, al ; lo is the low part (tx_buf[reg[0]])
630 * shr eax, 2 ; right shift eax register by 2
631 * mov hi, al ; hi is the high part (tx_buf[reg[1]])
634 for (n = 0; n < insn->n; n++) {
635 tx_buf[reg[0]] = (unsigned char)(data[n] & 0x03);
636 tx_buf[reg[1]] = (unsigned char)(data[n] >> 2) & 0xff;
638 if (vmk80xx_write_packet(dev, cmd))
642 up(&devpriv->limit_sem);
647 static int vmk80xx_find_usb_endpoints(struct comedi_device *dev)
649 struct vmk80xx_private *devpriv = dev->private;
650 struct usb_interface *intf = comedi_to_usb_interface(dev);
651 struct usb_host_interface *iface_desc = intf->cur_altsetting;
652 struct usb_endpoint_descriptor *ep_desc;
655 if (iface_desc->desc.bNumEndpoints != 2)
658 for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) {
659 ep_desc = &iface_desc->endpoint[i].desc;
661 if (usb_endpoint_is_int_in(ep_desc) ||
662 usb_endpoint_is_bulk_in(ep_desc)) {
664 devpriv->ep_rx = ep_desc;
668 if (usb_endpoint_is_int_out(ep_desc) ||
669 usb_endpoint_is_bulk_out(ep_desc)) {
671 devpriv->ep_tx = ep_desc;
676 if (!devpriv->ep_rx || !devpriv->ep_tx)
682 static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)
684 struct vmk80xx_private *devpriv = dev->private;
687 size = usb_endpoint_maxp(devpriv->ep_rx);
688 devpriv->usb_rx_buf = kzalloc(size, GFP_KERNEL);
689 if (!devpriv->usb_rx_buf)
692 size = usb_endpoint_maxp(devpriv->ep_tx);
693 devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
694 if (!devpriv->usb_tx_buf) {
695 kfree(devpriv->usb_rx_buf);
702 static int vmk80xx_init_subdevices(struct comedi_device *dev)
704 const struct vmk80xx_board *board = dev->board_ptr;
705 struct vmk80xx_private *devpriv = dev->private;
706 struct comedi_subdevice *s;
710 down(&devpriv->limit_sem);
712 if (devpriv->model == VMK8055_MODEL)
716 ret = comedi_alloc_subdevices(dev, n_subd);
718 up(&devpriv->limit_sem);
722 /* Analog input subdevice */
723 s = &dev->subdevices[0];
724 s->type = COMEDI_SUBD_AI;
725 s->subdev_flags = SDF_READABLE | SDF_GROUND;
726 s->n_chan = board->ai_nchans;
727 s->maxdata = board->ai_maxdata;
728 s->range_table = board->range;
729 s->insn_read = vmk80xx_ai_insn_read;
731 /* Analog output subdevice */
732 s = &dev->subdevices[1];
733 s->type = COMEDI_SUBD_AO;
734 s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
735 s->n_chan = board->ao_nchans;
737 s->range_table = board->range;
738 s->insn_write = vmk80xx_ao_insn_write;
739 if (devpriv->model == VMK8061_MODEL) {
740 s->subdev_flags |= SDF_READABLE;
741 s->insn_read = vmk80xx_ao_insn_read;
744 /* Digital input subdevice */
745 s = &dev->subdevices[2];
746 s->type = COMEDI_SUBD_DI;
747 s->subdev_flags = SDF_READABLE;
748 s->n_chan = board->di_nchans;
750 s->range_table = &range_digital;
751 s->insn_bits = vmk80xx_di_insn_bits;
753 /* Digital output subdevice */
754 s = &dev->subdevices[3];
755 s->type = COMEDI_SUBD_DO;
756 s->subdev_flags = SDF_WRITABLE;
759 s->range_table = &range_digital;
760 s->insn_bits = vmk80xx_do_insn_bits;
762 /* Counter subdevice */
763 s = &dev->subdevices[4];
764 s->type = COMEDI_SUBD_COUNTER;
765 s->subdev_flags = SDF_READABLE;
767 s->maxdata = board->cnt_maxdata;
768 s->insn_read = vmk80xx_cnt_insn_read;
769 s->insn_config = vmk80xx_cnt_insn_config;
770 if (devpriv->model == VMK8055_MODEL) {
771 s->subdev_flags |= SDF_WRITABLE;
772 s->insn_write = vmk80xx_cnt_insn_write;
776 if (devpriv->model == VMK8061_MODEL) {
777 s = &dev->subdevices[5];
778 s->type = COMEDI_SUBD_PWM;
779 s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
780 s->n_chan = board->pwm_nchans;
781 s->maxdata = board->pwm_maxdata;
782 s->insn_read = vmk80xx_pwm_insn_read;
783 s->insn_write = vmk80xx_pwm_insn_write;
786 up(&devpriv->limit_sem);
791 static int vmk80xx_auto_attach(struct comedi_device *dev,
792 unsigned long context)
794 struct usb_interface *intf = comedi_to_usb_interface(dev);
795 const struct vmk80xx_board *board = NULL;
796 struct vmk80xx_private *devpriv;
799 if (context < ARRAY_SIZE(vmk80xx_boardinfo))
800 board = &vmk80xx_boardinfo[context];
803 dev->board_ptr = board;
804 dev->board_name = board->name;
806 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
810 devpriv->model = board->model;
812 ret = vmk80xx_find_usb_endpoints(dev);
816 ret = vmk80xx_alloc_usb_buffers(dev);
820 sema_init(&devpriv->limit_sem, 8);
822 usb_set_intfdata(intf, devpriv);
824 if (devpriv->model == VMK8055_MODEL)
825 vmk80xx_reset_device(dev);
827 return vmk80xx_init_subdevices(dev);
830 static void vmk80xx_detach(struct comedi_device *dev)
832 struct usb_interface *intf = comedi_to_usb_interface(dev);
833 struct vmk80xx_private *devpriv = dev->private;
838 down(&devpriv->limit_sem);
840 usb_set_intfdata(intf, NULL);
842 kfree(devpriv->usb_rx_buf);
843 kfree(devpriv->usb_tx_buf);
845 up(&devpriv->limit_sem);
848 static struct comedi_driver vmk80xx_driver = {
849 .module = THIS_MODULE,
850 .driver_name = "vmk80xx",
851 .auto_attach = vmk80xx_auto_attach,
852 .detach = vmk80xx_detach,
855 static int vmk80xx_usb_probe(struct usb_interface *intf,
856 const struct usb_device_id *id)
858 return comedi_usb_auto_config(intf, &vmk80xx_driver, id->driver_info);
861 static const struct usb_device_id vmk80xx_usb_id_table[] = {
862 { USB_DEVICE(0x10cf, 0x5500), .driver_info = DEVICE_VMK8055 },
863 { USB_DEVICE(0x10cf, 0x5501), .driver_info = DEVICE_VMK8055 },
864 { USB_DEVICE(0x10cf, 0x5502), .driver_info = DEVICE_VMK8055 },
865 { USB_DEVICE(0x10cf, 0x5503), .driver_info = DEVICE_VMK8055 },
866 { USB_DEVICE(0x10cf, 0x8061), .driver_info = DEVICE_VMK8061 },
867 { USB_DEVICE(0x10cf, 0x8062), .driver_info = DEVICE_VMK8061 },
868 { USB_DEVICE(0x10cf, 0x8063), .driver_info = DEVICE_VMK8061 },
869 { USB_DEVICE(0x10cf, 0x8064), .driver_info = DEVICE_VMK8061 },
870 { USB_DEVICE(0x10cf, 0x8065), .driver_info = DEVICE_VMK8061 },
871 { USB_DEVICE(0x10cf, 0x8066), .driver_info = DEVICE_VMK8061 },
872 { USB_DEVICE(0x10cf, 0x8067), .driver_info = DEVICE_VMK8061 },
873 { USB_DEVICE(0x10cf, 0x8068), .driver_info = DEVICE_VMK8061 },
876 MODULE_DEVICE_TABLE(usb, vmk80xx_usb_id_table);
878 static struct usb_driver vmk80xx_usb_driver = {
880 .id_table = vmk80xx_usb_id_table,
881 .probe = vmk80xx_usb_probe,
882 .disconnect = comedi_usb_auto_unconfig,
884 module_comedi_usb_driver(vmk80xx_driver, vmk80xx_usb_driver);
886 MODULE_AUTHOR("Manuel Gebele <forensixs@gmx.de>");
887 MODULE_DESCRIPTION("Velleman USB Board Low-Level Driver");
888 MODULE_SUPPORTED_DEVICE("K8055/K8061 aka VM110/VM140");
889 MODULE_LICENSE("GPL");