2 comedi/drivers/vmk80xx.c
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.
22 * Description: Velleman USB Board Low-Level Driver
23 * Devices: [Velleman] K8055 (K8055/VM110), K8061 (K8061/VM140),
24 * VM110 (K8055/VM110), VM140 (K8061/VM140)
25 * Author: Manuel Gebele <forensixs@gmx.de>
26 * Updated: Sun, 10 May 2009 11:14:59 +0200
38 #include <linux/kernel.h>
39 #include <linux/module.h>
40 #include <linux/mutex.h>
41 #include <linux/errno.h>
42 #include <linux/input.h>
43 #include <linux/slab.h>
44 #include <linux/poll.h>
45 #include <linux/uaccess.h>
47 #include "../comedi_usb.h"
54 #define VMK8055_DI_REG 0x00
55 #define VMK8055_DO_REG 0x01
56 #define VMK8055_AO1_REG 0x02
57 #define VMK8055_AO2_REG 0x03
58 #define VMK8055_AI1_REG 0x02
59 #define VMK8055_AI2_REG 0x03
60 #define VMK8055_CNT1_REG 0x04
61 #define VMK8055_CNT2_REG 0x06
63 #define VMK8061_CH_REG 0x01
64 #define VMK8061_DI_REG 0x01
65 #define VMK8061_DO_REG 0x01
66 #define VMK8061_PWM_REG1 0x01
67 #define VMK8061_PWM_REG2 0x02
68 #define VMK8061_CNT_REG 0x02
69 #define VMK8061_AO_REG 0x02
70 #define VMK8061_AI_REG1 0x02
71 #define VMK8061_AI_REG2 0x03
73 #define VMK8055_CMD_RST 0x00
74 #define VMK8055_CMD_DEB1_TIME 0x01
75 #define VMK8055_CMD_DEB2_TIME 0x02
76 #define VMK8055_CMD_RST_CNT1 0x03
77 #define VMK8055_CMD_RST_CNT2 0x04
78 #define VMK8055_CMD_WRT_AD 0x05
80 #define VMK8061_CMD_RD_AI 0x00
81 #define VMK8061_CMR_RD_ALL_AI 0x01 /* !non-active! */
82 #define VMK8061_CMD_SET_AO 0x02
83 #define VMK8061_CMD_SET_ALL_AO 0x03 /* !non-active! */
84 #define VMK8061_CMD_OUT_PWM 0x04
85 #define VMK8061_CMD_RD_DI 0x05
86 #define VMK8061_CMD_DO 0x06 /* !non-active! */
87 #define VMK8061_CMD_CLR_DO 0x07
88 #define VMK8061_CMD_SET_DO 0x08
89 #define VMK8061_CMD_RD_CNT 0x09 /* TODO: completely pointless? */
90 #define VMK8061_CMD_RST_CNT 0x0a /* TODO: completely pointless? */
91 #define VMK8061_CMD_RD_VERSION 0x0b /* internal usage */
92 #define VMK8061_CMD_RD_JMP_STAT 0x0c /* TODO: not implemented yet */
93 #define VMK8061_CMD_RD_PWR_STAT 0x0d /* internal usage */
94 #define VMK8061_CMD_RD_DO 0x0e
95 #define VMK8061_CMD_RD_AO 0x0f
96 #define VMK8061_CMD_RD_PWM 0x10
98 #define IC3_VERSION (1 << 0)
99 #define IC6_VERSION (1 << 1)
106 static const struct comedi_lrange vmk8061_range = {
113 struct vmk80xx_board {
115 enum vmk80xx_model model;
116 const struct comedi_lrange *range;
118 unsigned int ai_maxdata;
121 unsigned int cnt_maxdata;
123 unsigned int pwm_maxdata;
126 static const struct vmk80xx_board vmk80xx_boardinfo[] = {
128 .name = "K8055 (VM110)",
129 .model = VMK8055_MODEL,
130 .range = &range_unipolar5,
132 .ai_maxdata = 0x00ff,
135 .cnt_maxdata = 0xffff,
138 .name = "K8061 (VM140)",
139 .model = VMK8061_MODEL,
140 .range = &vmk8061_range,
142 .ai_maxdata = 0x03ff,
145 .cnt_maxdata = 0, /* unknown, device is not writeable */
147 .pwm_maxdata = 0x03ff,
151 struct vmk80xx_private {
152 struct usb_endpoint_descriptor *ep_rx;
153 struct usb_endpoint_descriptor *ep_tx;
154 struct semaphore limit_sem;
155 unsigned char *usb_rx_buf;
156 unsigned char *usb_tx_buf;
157 enum vmk80xx_model model;
160 static void vmk80xx_do_bulk_msg(struct comedi_device *dev)
162 struct vmk80xx_private *devpriv = dev->private;
163 struct usb_device *usb = comedi_to_usb_dev(dev);
166 unsigned int tx_pipe;
167 unsigned int rx_pipe;
170 tx_addr = devpriv->ep_tx->bEndpointAddress;
171 rx_addr = devpriv->ep_rx->bEndpointAddress;
172 tx_pipe = usb_sndbulkpipe(usb, tx_addr);
173 rx_pipe = usb_rcvbulkpipe(usb, rx_addr);
176 * The max packet size attributes of the K8061
177 * input/output endpoints are identical
179 size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);
181 usb_bulk_msg(usb, tx_pipe, devpriv->usb_tx_buf,
182 size, NULL, devpriv->ep_tx->bInterval);
183 usb_bulk_msg(usb, rx_pipe, devpriv->usb_rx_buf, size, NULL, HZ * 10);
186 static int vmk80xx_read_packet(struct comedi_device *dev)
188 struct vmk80xx_private *devpriv = dev->private;
189 struct usb_device *usb = comedi_to_usb_dev(dev);
190 struct usb_endpoint_descriptor *ep;
193 if (devpriv->model == VMK8061_MODEL) {
194 vmk80xx_do_bulk_msg(dev);
199 pipe = usb_rcvintpipe(usb, ep->bEndpointAddress);
200 return usb_interrupt_msg(usb, pipe, devpriv->usb_rx_buf,
201 le16_to_cpu(ep->wMaxPacketSize), NULL,
205 static int vmk80xx_write_packet(struct comedi_device *dev, int cmd)
207 struct vmk80xx_private *devpriv = dev->private;
208 struct usb_device *usb = comedi_to_usb_dev(dev);
209 struct usb_endpoint_descriptor *ep;
212 devpriv->usb_tx_buf[0] = cmd;
214 if (devpriv->model == VMK8061_MODEL) {
215 vmk80xx_do_bulk_msg(dev);
220 pipe = usb_sndintpipe(usb, ep->bEndpointAddress);
221 return usb_interrupt_msg(usb, pipe, devpriv->usb_tx_buf,
222 le16_to_cpu(ep->wMaxPacketSize), NULL,
226 static int vmk80xx_reset_device(struct comedi_device *dev)
228 struct vmk80xx_private *devpriv = dev->private;
232 size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);
233 memset(devpriv->usb_tx_buf, 0, size);
234 retval = vmk80xx_write_packet(dev, VMK8055_CMD_RST);
237 /* set outputs to known state as we cannot read them */
238 return vmk80xx_write_packet(dev, VMK8055_CMD_WRT_AD);
241 static int vmk80xx_ai_insn_read(struct comedi_device *dev,
242 struct comedi_subdevice *s,
243 struct comedi_insn *insn,
246 struct vmk80xx_private *devpriv = dev->private;
251 down(&devpriv->limit_sem);
252 chan = CR_CHAN(insn->chanspec);
254 switch (devpriv->model) {
257 reg[0] = VMK8055_AI1_REG;
259 reg[0] = VMK8055_AI2_REG;
263 reg[0] = VMK8061_AI_REG1;
264 reg[1] = VMK8061_AI_REG2;
265 devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_AI;
266 devpriv->usb_tx_buf[VMK8061_CH_REG] = chan;
270 for (n = 0; n < insn->n; n++) {
271 if (vmk80xx_read_packet(dev))
274 if (devpriv->model == VMK8055_MODEL) {
275 data[n] = devpriv->usb_rx_buf[reg[0]];
280 data[n] = devpriv->usb_rx_buf[reg[0]] + 256 *
281 devpriv->usb_rx_buf[reg[1]];
284 up(&devpriv->limit_sem);
289 static int vmk80xx_ao_insn_write(struct comedi_device *dev,
290 struct comedi_subdevice *s,
291 struct comedi_insn *insn,
294 struct vmk80xx_private *devpriv = dev->private;
300 down(&devpriv->limit_sem);
301 chan = CR_CHAN(insn->chanspec);
303 switch (devpriv->model) {
305 cmd = VMK8055_CMD_WRT_AD;
307 reg = VMK8055_AO1_REG;
309 reg = VMK8055_AO2_REG;
311 default: /* NOTE: avoid compiler warnings */
312 cmd = VMK8061_CMD_SET_AO;
313 reg = VMK8061_AO_REG;
314 devpriv->usb_tx_buf[VMK8061_CH_REG] = chan;
318 for (n = 0; n < insn->n; n++) {
319 devpriv->usb_tx_buf[reg] = data[n];
321 if (vmk80xx_write_packet(dev, cmd))
325 up(&devpriv->limit_sem);
330 static int vmk80xx_ao_insn_read(struct comedi_device *dev,
331 struct comedi_subdevice *s,
332 struct comedi_insn *insn,
335 struct vmk80xx_private *devpriv = dev->private;
340 down(&devpriv->limit_sem);
341 chan = CR_CHAN(insn->chanspec);
343 reg = VMK8061_AO_REG - 1;
345 devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_AO;
347 for (n = 0; n < insn->n; n++) {
348 if (vmk80xx_read_packet(dev))
351 data[n] = devpriv->usb_rx_buf[reg + chan];
354 up(&devpriv->limit_sem);
359 static int vmk80xx_di_insn_bits(struct comedi_device *dev,
360 struct comedi_subdevice *s,
361 struct comedi_insn *insn,
364 struct vmk80xx_private *devpriv = dev->private;
365 unsigned char *rx_buf;
369 down(&devpriv->limit_sem);
371 rx_buf = devpriv->usb_rx_buf;
373 if (devpriv->model == VMK8061_MODEL) {
374 reg = VMK8061_DI_REG;
375 devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_DI;
377 reg = VMK8055_DI_REG;
380 retval = vmk80xx_read_packet(dev);
383 if (devpriv->model == VMK8055_MODEL)
384 data[1] = (((rx_buf[reg] >> 4) & 0x03) |
385 ((rx_buf[reg] << 2) & 0x04) |
386 ((rx_buf[reg] >> 3) & 0x18));
388 data[1] = rx_buf[reg];
393 up(&devpriv->limit_sem);
398 static int vmk80xx_do_insn_bits(struct comedi_device *dev,
399 struct comedi_subdevice *s,
400 struct comedi_insn *insn,
403 struct vmk80xx_private *devpriv = dev->private;
404 unsigned char *rx_buf = devpriv->usb_rx_buf;
405 unsigned char *tx_buf = devpriv->usb_tx_buf;
409 if (devpriv->model == VMK8061_MODEL) {
410 reg = VMK8061_DO_REG;
411 cmd = VMK8061_CMD_DO;
412 } else { /* VMK8055_MODEL */
413 reg = VMK8055_DO_REG;
414 cmd = VMK8055_CMD_WRT_AD;
417 down(&devpriv->limit_sem);
419 if (comedi_dio_update_state(s, data)) {
420 tx_buf[reg] = s->state;
421 ret = vmk80xx_write_packet(dev, cmd);
426 if (devpriv->model == VMK8061_MODEL) {
427 tx_buf[0] = VMK8061_CMD_RD_DO;
428 ret = vmk80xx_read_packet(dev);
431 data[1] = rx_buf[reg];
437 up(&devpriv->limit_sem);
439 return ret ? ret : insn->n;
442 static int vmk80xx_cnt_insn_read(struct comedi_device *dev,
443 struct comedi_subdevice *s,
444 struct comedi_insn *insn,
447 struct vmk80xx_private *devpriv = dev->private;
452 down(&devpriv->limit_sem);
453 chan = CR_CHAN(insn->chanspec);
455 switch (devpriv->model) {
458 reg[0] = VMK8055_CNT1_REG;
460 reg[0] = VMK8055_CNT2_REG;
464 reg[0] = VMK8061_CNT_REG;
465 reg[1] = VMK8061_CNT_REG;
466 devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_CNT;
470 for (n = 0; n < insn->n; n++) {
471 if (vmk80xx_read_packet(dev))
474 if (devpriv->model == VMK8055_MODEL)
475 data[n] = devpriv->usb_rx_buf[reg[0]];
476 else /* VMK8061_MODEL */
477 data[n] = devpriv->usb_rx_buf[reg[0] * (chan + 1) + 1]
478 + 256 * devpriv->usb_rx_buf[reg[1] * 2 + 2];
481 up(&devpriv->limit_sem);
486 static int vmk80xx_cnt_insn_config(struct comedi_device *dev,
487 struct comedi_subdevice *s,
488 struct comedi_insn *insn,
491 struct vmk80xx_private *devpriv = dev->private;
492 unsigned int chan = CR_CHAN(insn->chanspec);
497 down(&devpriv->limit_sem);
499 case INSN_CONFIG_RESET:
500 if (devpriv->model == VMK8055_MODEL) {
502 cmd = VMK8055_CMD_RST_CNT1;
503 reg = VMK8055_CNT1_REG;
505 cmd = VMK8055_CMD_RST_CNT2;
506 reg = VMK8055_CNT2_REG;
508 devpriv->usb_tx_buf[reg] = 0x00;
510 cmd = VMK8061_CMD_RST_CNT;
512 ret = vmk80xx_write_packet(dev, cmd);
518 up(&devpriv->limit_sem);
520 return ret ? ret : insn->n;
523 static int vmk80xx_cnt_insn_write(struct comedi_device *dev,
524 struct comedi_subdevice *s,
525 struct comedi_insn *insn,
528 struct vmk80xx_private *devpriv = dev->private;
529 unsigned long debtime;
535 down(&devpriv->limit_sem);
536 chan = CR_CHAN(insn->chanspec);
539 cmd = VMK8055_CMD_DEB1_TIME;
541 cmd = VMK8055_CMD_DEB2_TIME;
543 for (n = 0; n < insn->n; n++) {
548 /* TODO: Prevent overflows */
552 val = int_sqrt(debtime * 1000 / 115);
553 if (((val + 1) * val) < debtime * 1000 / 115)
556 devpriv->usb_tx_buf[6 + chan] = val;
558 if (vmk80xx_write_packet(dev, cmd))
562 up(&devpriv->limit_sem);
567 static int vmk80xx_pwm_insn_read(struct comedi_device *dev,
568 struct comedi_subdevice *s,
569 struct comedi_insn *insn,
572 struct vmk80xx_private *devpriv = dev->private;
573 unsigned char *tx_buf;
574 unsigned char *rx_buf;
578 down(&devpriv->limit_sem);
580 tx_buf = devpriv->usb_tx_buf;
581 rx_buf = devpriv->usb_rx_buf;
583 reg[0] = VMK8061_PWM_REG1;
584 reg[1] = VMK8061_PWM_REG2;
586 tx_buf[0] = VMK8061_CMD_RD_PWM;
588 for (n = 0; n < insn->n; n++) {
589 if (vmk80xx_read_packet(dev))
592 data[n] = rx_buf[reg[0]] + 4 * rx_buf[reg[1]];
595 up(&devpriv->limit_sem);
600 static int vmk80xx_pwm_insn_write(struct comedi_device *dev,
601 struct comedi_subdevice *s,
602 struct comedi_insn *insn,
605 struct vmk80xx_private *devpriv = dev->private;
606 unsigned char *tx_buf;
611 down(&devpriv->limit_sem);
613 tx_buf = devpriv->usb_tx_buf;
615 reg[0] = VMK8061_PWM_REG1;
616 reg[1] = VMK8061_PWM_REG2;
618 cmd = VMK8061_CMD_OUT_PWM;
621 * The followin piece of code was translated from the inline
622 * assembler code in the DLL source code.
625 * mov eax, k ; k is the value (data[n])
626 * and al, 03h ; al are the lower 8 bits of eax
627 * mov lo, al ; lo is the low part (tx_buf[reg[0]])
629 * shr eax, 2 ; right shift eax register by 2
630 * mov hi, al ; hi is the high part (tx_buf[reg[1]])
633 for (n = 0; n < insn->n; n++) {
634 tx_buf[reg[0]] = (unsigned char)(data[n] & 0x03);
635 tx_buf[reg[1]] = (unsigned char)(data[n] >> 2) & 0xff;
637 if (vmk80xx_write_packet(dev, cmd))
641 up(&devpriv->limit_sem);
646 static int vmk80xx_find_usb_endpoints(struct comedi_device *dev)
648 struct vmk80xx_private *devpriv = dev->private;
649 struct usb_interface *intf = comedi_to_usb_interface(dev);
650 struct usb_host_interface *iface_desc = intf->cur_altsetting;
651 struct usb_endpoint_descriptor *ep_desc;
654 if (iface_desc->desc.bNumEndpoints != 2)
657 for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) {
658 ep_desc = &iface_desc->endpoint[i].desc;
660 if (usb_endpoint_is_int_in(ep_desc) ||
661 usb_endpoint_is_bulk_in(ep_desc)) {
663 devpriv->ep_rx = ep_desc;
667 if (usb_endpoint_is_int_out(ep_desc) ||
668 usb_endpoint_is_bulk_out(ep_desc)) {
670 devpriv->ep_tx = ep_desc;
675 if (!devpriv->ep_rx || !devpriv->ep_tx)
681 static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)
683 struct vmk80xx_private *devpriv = dev->private;
686 size = le16_to_cpu(devpriv->ep_rx->wMaxPacketSize);
687 devpriv->usb_rx_buf = kzalloc(size, GFP_KERNEL);
688 if (!devpriv->usb_rx_buf)
691 size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);
692 devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
693 if (!devpriv->usb_tx_buf) {
694 kfree(devpriv->usb_rx_buf);
701 static int vmk80xx_init_subdevices(struct comedi_device *dev)
703 const struct vmk80xx_board *board = dev->board_ptr;
704 struct vmk80xx_private *devpriv = dev->private;
705 struct comedi_subdevice *s;
709 down(&devpriv->limit_sem);
711 if (devpriv->model == VMK8055_MODEL)
715 ret = comedi_alloc_subdevices(dev, n_subd);
717 up(&devpriv->limit_sem);
721 /* Analog input subdevice */
722 s = &dev->subdevices[0];
723 s->type = COMEDI_SUBD_AI;
724 s->subdev_flags = SDF_READABLE | SDF_GROUND;
725 s->n_chan = board->ai_nchans;
726 s->maxdata = board->ai_maxdata;
727 s->range_table = board->range;
728 s->insn_read = vmk80xx_ai_insn_read;
730 /* Analog output subdevice */
731 s = &dev->subdevices[1];
732 s->type = COMEDI_SUBD_AO;
733 s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
734 s->n_chan = board->ao_nchans;
736 s->range_table = board->range;
737 s->insn_write = vmk80xx_ao_insn_write;
738 if (devpriv->model == VMK8061_MODEL) {
739 s->subdev_flags |= SDF_READABLE;
740 s->insn_read = vmk80xx_ao_insn_read;
743 /* Digital input subdevice */
744 s = &dev->subdevices[2];
745 s->type = COMEDI_SUBD_DI;
746 s->subdev_flags = SDF_READABLE;
747 s->n_chan = board->di_nchans;
749 s->range_table = &range_digital;
750 s->insn_bits = vmk80xx_di_insn_bits;
752 /* Digital output subdevice */
753 s = &dev->subdevices[3];
754 s->type = COMEDI_SUBD_DO;
755 s->subdev_flags = SDF_WRITABLE;
758 s->range_table = &range_digital;
759 s->insn_bits = vmk80xx_do_insn_bits;
761 /* Counter subdevice */
762 s = &dev->subdevices[4];
763 s->type = COMEDI_SUBD_COUNTER;
764 s->subdev_flags = SDF_READABLE;
766 s->maxdata = board->cnt_maxdata;
767 s->insn_read = vmk80xx_cnt_insn_read;
768 s->insn_config = vmk80xx_cnt_insn_config;
769 if (devpriv->model == VMK8055_MODEL) {
770 s->subdev_flags |= SDF_WRITABLE;
771 s->insn_write = vmk80xx_cnt_insn_write;
775 if (devpriv->model == VMK8061_MODEL) {
776 s = &dev->subdevices[5];
777 s->type = COMEDI_SUBD_PWM;
778 s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
779 s->n_chan = board->pwm_nchans;
780 s->maxdata = board->pwm_maxdata;
781 s->insn_read = vmk80xx_pwm_insn_read;
782 s->insn_write = vmk80xx_pwm_insn_write;
785 up(&devpriv->limit_sem);
790 static int vmk80xx_auto_attach(struct comedi_device *dev,
791 unsigned long context)
793 struct usb_interface *intf = comedi_to_usb_interface(dev);
794 const struct vmk80xx_board *board = NULL;
795 struct vmk80xx_private *devpriv;
798 if (context < ARRAY_SIZE(vmk80xx_boardinfo))
799 board = &vmk80xx_boardinfo[context];
802 dev->board_ptr = board;
803 dev->board_name = board->name;
805 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
809 devpriv->model = board->model;
811 ret = vmk80xx_find_usb_endpoints(dev);
815 ret = vmk80xx_alloc_usb_buffers(dev);
819 sema_init(&devpriv->limit_sem, 8);
821 usb_set_intfdata(intf, devpriv);
823 if (devpriv->model == VMK8055_MODEL)
824 vmk80xx_reset_device(dev);
826 return vmk80xx_init_subdevices(dev);
829 static void vmk80xx_detach(struct comedi_device *dev)
831 struct usb_interface *intf = comedi_to_usb_interface(dev);
832 struct vmk80xx_private *devpriv = dev->private;
837 down(&devpriv->limit_sem);
839 usb_set_intfdata(intf, NULL);
841 kfree(devpriv->usb_rx_buf);
842 kfree(devpriv->usb_tx_buf);
844 up(&devpriv->limit_sem);
847 static struct comedi_driver vmk80xx_driver = {
848 .module = THIS_MODULE,
849 .driver_name = "vmk80xx",
850 .auto_attach = vmk80xx_auto_attach,
851 .detach = vmk80xx_detach,
854 static int vmk80xx_usb_probe(struct usb_interface *intf,
855 const struct usb_device_id *id)
857 return comedi_usb_auto_config(intf, &vmk80xx_driver, id->driver_info);
860 static const struct usb_device_id vmk80xx_usb_id_table[] = {
861 { USB_DEVICE(0x10cf, 0x5500), .driver_info = DEVICE_VMK8055 },
862 { USB_DEVICE(0x10cf, 0x5501), .driver_info = DEVICE_VMK8055 },
863 { USB_DEVICE(0x10cf, 0x5502), .driver_info = DEVICE_VMK8055 },
864 { USB_DEVICE(0x10cf, 0x5503), .driver_info = DEVICE_VMK8055 },
865 { USB_DEVICE(0x10cf, 0x8061), .driver_info = DEVICE_VMK8061 },
866 { USB_DEVICE(0x10cf, 0x8062), .driver_info = DEVICE_VMK8061 },
867 { USB_DEVICE(0x10cf, 0x8063), .driver_info = DEVICE_VMK8061 },
868 { USB_DEVICE(0x10cf, 0x8064), .driver_info = DEVICE_VMK8061 },
869 { USB_DEVICE(0x10cf, 0x8065), .driver_info = DEVICE_VMK8061 },
870 { USB_DEVICE(0x10cf, 0x8066), .driver_info = DEVICE_VMK8061 },
871 { USB_DEVICE(0x10cf, 0x8067), .driver_info = DEVICE_VMK8061 },
872 { USB_DEVICE(0x10cf, 0x8068), .driver_info = DEVICE_VMK8061 },
875 MODULE_DEVICE_TABLE(usb, vmk80xx_usb_id_table);
877 static struct usb_driver vmk80xx_usb_driver = {
879 .id_table = vmk80xx_usb_id_table,
880 .probe = vmk80xx_usb_probe,
881 .disconnect = comedi_usb_auto_unconfig,
883 module_comedi_usb_driver(vmk80xx_driver, vmk80xx_usb_driver);
885 MODULE_AUTHOR("Manuel Gebele <forensixs@gmx.de>");
886 MODULE_DESCRIPTION("Velleman USB Board Low-Level Driver");
887 MODULE_SUPPORTED_DEVICE("K8055/K8061 aka VM110/VM140");
888 MODULE_LICENSE("GPL");