[go: nahoru, domu]

History log of /drivers/staging/comedi/drivers/vmk80xx.c
Revision Date Author Comments
957b9f8b41473f113c64ca234120de52d8bf59f8 09-Sep-2014 Ian Abbott <abbotti@mev.co.uk> staging: comedi: vmk80xx: replace comedi_board() calls

The `comedi_board(dev)` inline function calls just return
`dev->board_ptr`. Expand the inline function calls.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
99948ba7c8eef166979cf5b0c466f48cabba82f2 10-Jul-2014 Ian Abbott <abbotti@mev.co.uk> staging: comedi: vmk80xx: remove MODULE_VERSION() from in-kernel module

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c16975a06cfbbdedfde89e81bd00c7e0ad9de377 11-Nov-2013 Michal Nazarewicz <mina86@mina86.com> staging: comedi: fix potentially uninitialised variable

If none of the if conditions take a true path, the ret variable will
never be assigned a value.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6f617e544b26d4232659402da42924e8cd6b1eaf 30-Aug-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: use comedi_dio_update_state()

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Tidy up the vmk80xx_do_insn_bits() function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0bdab509bf9c6d838dc0a3b1d68bbf841fc20b5a 25-Jun-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: use comedi_alloc_devpriv()

Use the helper function to allocate memory and set the comedi_device
private data pointer.

This removes the dependency on slab.h from most of the drivers so
remove the global #include in comedidev.h and the local #include
in some of the drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
e23322e43a271cb8ebf1bc750dffffeebfe46043 20-May-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove usb_interface from private data

This driver uses the comedi auto attach mechanism so the comedi_device
will always have an associated usb_interface and usb_device.

Remove the unnecessary checks if the comedi_device has a usb_interface
attached. This also allows removing the usb_interface from the private
data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
db4c3eb795696b7f6132d183b1bbe561b54c98c6 20-May-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: use comedi_to_usb_dev()

Use the helper function to get a usb_device pointer from a
comedi_device pointer. This removes the need carring the
usb_device pointer in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0703c9553847b31cf34a7a04a839806fb361422f 20-May-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: don't pass the private data directly

Instead of passing the private data to the internal functions. pass
the comedi_device pointer and get the private data from it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
641f064e5df6fb3aaeb6256031a153a5efb16ca6 25-Apr-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: remove FSF address from boilerplate text

Addresses change...

Remove the paragraph with the FSF address from all the comedi source
files.

Also, remove the paragraph about the finding the complete GPL in the
COPYING file since it's unnecessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
951348b377385475aa256c27e1c9e2564c9ec160 18-Feb-2013 Ian Abbott <abbotti@mev.co.uk> staging: comedi: vmk80xx: wait for URBs to complete

For Velleman K8055 (aka VM110), `vmk80xx_read_packet()` and
`vmk8055_write_packet()` send an URB asynchronously and do not wait for
it complete. However, callers of `vmk80xx_read_packet()` are assuming
the contents of the data buffer `devpriv->usb_rx_buf` are valid
immediately after that function returns.

For Velleman K8061 (aka VM140), `vmk80xx_read_packet()` and
`vmk80xx_write_packet()` punt the requests to `vmk80xx_do_bulk_msg()`
which *does* wait for the URBs to complete (albeit with no error
checking!).

Change `vmk80xx_read_packet()` and `vmk80xx_write_packet()` to use
`usb_interrupt_msg()` for the K8055, so the callers of
`vmk80xx_read_packet()` can assume the data buffer contents are valid
(if no error occurred). Remove all the code for checking for transfers
in progress and busy waiting, as it's no longer needed. Pretty much all
the callers of `vmk80xx_read_packet()` and `vmk80xx_write_packet()` hold
the same semaphore anyway, and the only caller that doesn't
(`vmk80xx_reset_device()` called during initialization of the device)
doesn't really matter.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
f06a23c93b900c37ef14858868c00dc8f061fa22 14-Feb-2013 Ian Abbott <abbotti@mev.co.uk> staging: comedi: vmk80xx: initialize K8055 outputs to known state

vmk8055_reset_device() is called during initialization of a Velleman
K8055 (aka VM110) to send a reset command to the hardware. I don't know
what this does, but I know that it doesn't reset the digital outputs as
I've tried it. Since the hardware does not have any way to query the
current output values and there is only the one command to update all
the analog and digital outputs simultaneously (VMK8055_CMD_WRT_AD), send
this command during initialization to set all the analog and digital
outputs to a known state.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
e8f311a5b6b9163f6aeba2524eaab92dc3b0fb6f 14-Feb-2013 Ian Abbott <abbotti@mev.co.uk> staging: comedi: vmk80xx: simplify vmk80xx_reset_device()

vmk80xx_reset_device() is called during initialization of a Velleman
K8055 (aka VM110) to send a reset command to the hardware. The current
function is a bit long-winded and doesn't set the TRANS_OUT_BUSY flag to
prevent re-use of the transmit buffer while the URB is in progress.

Rewrite the function to use vmk80xx_write_packet() to send the command.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0cbfc8269b980adafa7b529bb529a2fc316c5405 14-Feb-2013 Ian Abbott <abbotti@mev.co.uk> staging: comedi: vmk80xx: zero buffers on allocation

Zero out `devpriv->usb_tx_buf` and `devpriv->usb_rx_buf` on allocation.
When sending data to the USB device, this ensures any unused part of the
buffer will not contain random crap.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fc9ca48eb60f4a516f59bbde1dc7685744ceb310 13-Feb-2013 Peter Huewe <peterhuewe@gmx.de> staging/comedi: Fix undefined array subscript

In vmk80xx_do_insn_bits the local variable reg, which is used as an
index to the tx_buf array, can be used uninitialized if
- data[0] == 0
and
- devpriv->model != VMK8061_MODEL
-> we get into the else branch without having reg initialized.

Since the driver usually differentiates between VMK8061_MODEL and
VMK8055_MODEL it's safe to assume that VMK8055_DO_REG was meant as an
initial value.

And to avoid duplication we can move the assignments to the top.

Acked-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
66dbc7b1b00499285793143b44b979e26141204d 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: rename vmk80xx_attach_common()

In comedi drivers typically *_attach_common() is used as the 'common'
part of the comedi_driver attach code for drivers that support various
bus types (ISA, PCI, etc.). This driver is specific to a USB device.

To avoid confusion when grepping, rename this function to something
more appropriate.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6dcbe00df71bd0559c32ef7e838eac1458ad24d6 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove the 'Changelog' comments

git history provides a better Changelog for the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
f45787c687adcf3c01599bf8f32667fab5271e0d 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: cleanup the comedi_lrange tables

The vmk8055_range table is a duplicate of the comedi core provided
range_unipolar5 table. Use that instead.

For aesthetic reasons, clean up the formating of the vmk8061_range
table.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4c56a2b63979ec1992fddc087c4660fde7d8e6c0 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove CONFIG_COMEDI_DEBUG code

If CONFIG_COMEDI_DEBUG is defined a macro is enabled to output some
printk(KERN_REBUG ...) messages. These are just added noise. Remove
it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6f25a527eac10d9ba277a2de7a2a9d3e92c08a52 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove unused #define

This define is no longer used by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0f97889c19bfedf102ec6e1fdd7f99a8342d4f22 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove digital input (*insn_read)

The comedi core can use the (*insn_bits) function to emulate the
(*insn_read) function. Remove the unnecessary (*insn_read) function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a348b72eae946dd5d2cc9e00c4344c7814979eb0 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove digital output (*insn_write)

The comedi core can use the (*insn_bits) function to emulate the
(*insn_write) function. Remove the unnecessary (*insn_read)
function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
03754bdbb10a8045b2c18cfec8f2272d7df004c6 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove digital output (*insn_read)

The comedi core can use the (*insn_bits) function to emulate the
(*insn_read) function.

The digital output (*insn_bits) function properly handles the
VMK8061_MODEL to read the digital output states before returning.

Remove the unnecessary (*insn_read) function. It's also not
necessary to set the SDF_READABLE flag so remove the entire
conditional in the attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9a23a7481ea860096acbc032dcb1159b8864fbf5 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: cleanup pwm subdevice init

Change the 'pwm_bits' in the boardinfo to 'pwm_maxdata' so that the
calculation of s->maxdata can be removed. Also, change the type to
match the comedi_subdevice type. For aesthetic reasons, rename the
'pwm_chans' boardinfo and change its type also.

Remove the '0' values in the boardinfo.

Rename the (*insn_read) and (*insn_write) functions for the pwm
subdevice to make grepping easier.

For aesthetic reasons, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
75a45d924dd33882caf80d3a78dd96c370a6580b 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: cleanup counter subdevice init

Change the 'cnt_bits' in the boardinfo to 'cnt_maxdata' so that the
calculation of s->maxdata can be removed. Also, change the type to
match the comedi_subdevice type. Add a comment about the '0' value
for DEVICE_VMK8061.

The s->maxdata should always be set for the subdevice. Move it out
of the conditional.

Rename the (*insn_read), (*insn_config_, and (*insn_write) functions
for the counter subdevice to make grepping easier.

For aesthetic reasons, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b639e09608f0103761751d707e837a7ca01d82a7 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: cleanup digital input subdevice init

Remove the SDF_GROUND flag from s->subdev_flags. This flag only has
meaning for analog subdevices.

Add the missing s->range_table for the subdevice.

Rename the (*insn_write), (*insn_bits), and (*insn_read) functions
for the digital input subdevice to make grepping easier.

For aesthetic reasons, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
268e5148aac3108ad1347f9ecf637be3d83e525e 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: cleanup digital input subdevice init

Change the type for the digital input 'di_chans' boardinfo to match
the comedi_subdevice type it is set to. For aesthetic reasons, rename
the variable also.

Remove the SDF_GROUND flag from s->subdev_flags. This flag only has
meaning for analog subdevices.

Add the missing s->range_table for the subdevice.

Rename the (*insn_read) and (*insn_bits) functions for the digital
input subdevice to make grepping easier.

For aesthetic reasons, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8b3ec9f155cf564e0f2320b6a895d8684f2874fe 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: cleanup analog output subdevice init

Change the type for the analog output 'ao_chans' boardinfo to match
the comedi_subdevice type it is set to. For aesthetic reasons, rename
the variable also.

Rename the (*insn_write) and (*insn_read) functions for the analog
output subdevice to make grepping easier.

For aesthetic reasons, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
658cd3ac2e31d637f50402611976bdaab74c28f8 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: cleanup analog input subdevice init

Change the 'ai_bits' in the boardinfo to 'ai_maxdata' so that the
calculation of s->maxdata can be removed.

Change the types for the analog input boardinfo to match the
comedi_subdevice types they are set to.

Rename the (*insn_read) function for the analog input subdevice from
vmk80xx_ai_rinsn to vmk80xx_ai_insn_read to make grepping easier.

For aesthetic reasons, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
52d895d3672dd58c0067c2efca4b825e4d733d0c 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove need for boardinfo in private_data

The only information in the boardinfo that is used outside of the
attach of the driver is the 'model' of the device.

Remove the 'board' pointer from the private data and replace it with
the 'model' enum and just copy that information over during the attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
57cf09aeeeadf35ef7f678a870139894d67a794f 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: push usb (*probe) into comedi (*auto_attach)

Make the usb_driver (*probe) simply call comedi_usb_auto_config()
and move all the (*probe) code into the (*auto_attach) function.

This allows getting rid of the static private data array since we
no longer do part of the initialization in the (*probe) and then
finish it in the (*auto_attach). We can simply kzalloc the private
data instead. The comedi core will then handle the kfree of the
data when the driver is detached.

We can also get rid of the static 'glb_mutex' since this mutex was
only used to protect the static private data array.

Change the parameters for a couple of the helper functions used
during the auto attach. Now that the comedi_device is available
we can simply pass that pointer and get the specific pointers
needed by the helper functions from it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
55ab4f641a3bfbdb7c59b80e194c7242234bbb1f 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: comedi_usb: allow comedi usb drivers to pass a 'context'

Allow the comedi usb drivers to pass a 'context' from their (*probe)
functions to the comedi core's comedi_usb_auto_config(). This 'context'
is then passed to comedi_auto_config() and then to the comedi_driver's
(*auto_attach).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29d6dd3310641f7dc0dbd9b55f651eb9846f2aa6 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove private data 'attached'

The 'attached' flag in the private data is set after the comedi_driver
(*auto_attach) function has completed successfully.

The only places it's checked are in rudimentary_check(), which does
some basic sanity checks before doing any of the subdevice operations,
and vmk80xx_auto_attach(), which is the comedi_driver (*auto_attach)
function.

The (*auto_attach) function can only be called as the result of a
successfull usb_driver (*probe). Part of the probe is to locate a
free slot in the static private data array. All free slots are
initialized to '0' so the 'attached' flag will always be cleared.

Remove the unneccessary 'attached' flag in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b105ad8a78456fbcdb81e98076e9c3813cdb0be0 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove private data 'probed'

The 'probed' variable is used in the usb driver (*probe) to detect an
unused element in the static private data arry. This variable is then
set after the usb driver has completed its (*probe) before calling
comedi_usb_auto_config(). When the comedi core does the auto config
it will call the (*auto_attach) function, vmk80xx_auto_attach(), which
then locates the correct private data in the static array by checking
to see if it has been 'probed' and that the 'intf' variable matches
the usb_interface pointer for the usb device.

Now that the private data is clean after failed usb probes and disconnects
we don't have to worry about have a garbage 'intf' value in the private
data that might match.

Remove the 'probed' flag from the private data and just use the 'intf'
pointer to detect the match.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
db7dabf707f1eb3c4288ca8bedd4b2aa6701ca7b 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: make sure private data is clean when detached

Currently the private data used in this driver is stored in a static
array. During the usb (*probe) and empty location is found in this
array for use by the usb device. Some initialization of the private
data is then done before comedi_usb_auto_config() is called to allow
the comedi core to attach its comedi_device to the usb device.

The (*probe) can fail for various reasons. If it does, make sure that
the private data is clean before returning an error.

The usb (*disconnect) simply calls comedi_usb_auto_unconfig() to
allow the comedi core to disconnect its comedi_device from the usb
device. Since the private data points to the static array it cannot
be kfree'ed during the detach. Instead make sure it clean before
leaving the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1cc8f8854c86b77637b1300b22e553028c6f2668 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove private data 'count'

The 'count' in the private data is only used in a couple dev_info()
kernel messages. These messages are just added noise.

Remove the 'count' variable in the private data as well as the
dev_info() messages.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
78f8fa7f00689f4385c28b1b2be30c83f331c497 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: factor out usb buffer allocation

Factor the code that allocates the usb buffers out of vmk80xx_usb_probe().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
49253d542cc0f5f771dc254d248162a2a666649d 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: factor out usb endpoint detection

Factor the code that detects the usb endpoints out of vmk80xx_usb_probe().

Cleanup the detection code in the new function,

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
da7b18ee8b552b9b340c44fa8f6de1372a251a78 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: consistently use the same local var names

Rename some of the local variables used in this driver to make the
code easier to maintain and understand.

s/udev/usb the usb_device that the comedi_driver is attached to
s/dev/devpriv the private data of the comedi_device
s/cdev/dev the comedi_device

Also, use some local variables in a couple of the functions to tidy
up the code a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dc49cbfc67f6d85020715901c88d128d02429791 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: rename struct vmk80xx_usb

The struct vmk80xx_usb is actually the private data for the
comedi_device. For aesthetic reasons, rename the struct to
vmk80xx_private.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9f4d4de3080116173256ce86a32b4c4d472ab1e9 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove VMK80XX_SUBD_* enum

These enum values are only used in the initialization of the
comedi_subdevices. They don't help make the code any clearer
so just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
70ba1a599333c576e9dea7dfdcd9a4446d958093 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove common and unused boardinfo

Some of the information in the boardinfo is common for both boards
supported by this driver. Remove that information from the boardinfo
and just initialize the subdevice values directly.

Also, remove any information in the boardinfo that is not used in
the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0dd772bf76fca8d76a963de5bc378535e4d3cd39 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: save the boardinfo in the comedi_device

Save a copy of the boardinfo pointer in the comedi_device 'board_ptr'.
The subdevice functions can then simply get it using the comedi_board()
helper.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20d6007755cb665d75ba34d6b9075b4cc02e816a 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: move boardinfo into a const array

The normal way of presenting the board specific information in comedi
drivers is store the data in a static const array. This data is then
accessed using a pointer, normally the comedi_device 'board_ptr',

Move the boardinfo for the two boards supported by this driver from
the vmk80xx_usb_probe() function into a static const array.

Change the access of this information so a pointer is used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ce87422743608b436da9e0ce34d01519cd75ea3e 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: use comedi_auto_unconfig() for (*disconnect)

The usb_driver (*disconnect) in this driver is simply a wrapper around
comedi_auto_unconfig(). Just use comedi_auto_unconfig() directly for
the (*disconnect).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9377b9234f159773a53c7277559cc24397dd9803 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: move usb_driver (*disconnect) code

The usb_driver (*disconnect) in this driver calls the comedi core
comedi_usb_auto_unconfig() which calls the comedi_driver (*detach).

Move the code in the (*disconnect) to the (*detach) to get all the
disconnect/detach in one place.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
07b502f50bfc290222fe4032501619a44bbd777e 06-Feb-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: vmk80xx: remove support for manual attaching

This comedi USB driver supports attaching with the auto config
mechanism. Remove the manual attaching support using the
COMEDI_DEVCONFIG ioctl.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
392ba7bc37b453ae056542045fd7b8b349c7978e 27-Oct-2012 Ian Abbott <abbotti@mev.co.uk> staging: comedi: vmk80xx: use auto_attach() hook

Use the new `auto_attach()` hook in the `struct comedi_driver` instead
of the old `attach_usb()` hook.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7194d0e107fa70ca46b2a03b27b8b7ad2266d8bf 24-Oct-2012 YAMANE Toshiaki <yamanetoshi@gmail.com> staging/comedi: Use dev_ printks in drivers/vmk80xx.c

fixed below checkpatch warning.
- Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13f7952f8f13fb1bbd18b85988e3a5bbbed00879 06-Sep-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> staging: comedi: vmk80xx: fix compiler warning

gcc complains about some potentially uninitalized variables here, yet it
can not happen, due to an enumerated type (either the board is one type
or the other.) Make the compiler happy by providing a default case
option that makes the logic a bit simpler for it to determine that there
really isn't a problem here.

Cc: H Hartley Sweeten <hartleys@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d3d1e2532f33b49515bf9ea9e2b4cc1dbb1d47c9 06-Sep-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: vmk80xx: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
007ff2af216090b4c20ebd2b9d94c528102ec135 20-Jun-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: vmk80xx: refactor init code

Refactor the usb driver probe/disconnect and comedi driver attach/
detach to follow the style of the other comedi driver types to
improve maintainability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d6cc3ec8e727de15ac59e7a184f9d51bf476147b 20-Jun-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: vmk80xx: use module_comedi_usb_driver()

Use the module_comedi_usb_driver helper macro to initialize this
module. Rename the driver structs to follow the pattern of the
other comedi driver types and add some whitespace to improve
readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
f7d4d3bc0c5e30ac58e9e41c695852bfdcb8cb95 18-Jun-2012 Ian Abbott <abbotti@mev.co.uk> staging: comedi: vmk80xx: use attach_usb() hook

Change the vmv80xx driver to use the new attach_usb() hook in struct
comedi_driver to auto-configure probed USB devices after the firmware is
loaded.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8b6c56949ffa83dbc2a6e8fa3f98b10a19372207 12-Jun-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: propogate error code from comedi_alloc_subdevices

comedi_alloc_subdevices can fail with -EINVAL or -ENOMEM. When it
does fail make sure to pass the proper error code back.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbott@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2f0b9d082e5d0056a3aca4be038483a564849196 12-Jun-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: export alloc_subdevices as comedi_alloc_subdevices

Move the inline alloc_subdevices() function from comedidev.h
to drivers.c and rename it to comedi_alloc_subdevices(). The
function is large enough to warrant being an exported symbol
rather than being an inline in every driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
484ecc95d9cdfa8b2f7029e2f3409cf078aed4ab 18-May-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: cleanup all the comedi_driver 'detach' functions

1. Change the return type from int to void

All the detach functions, except for the comedi usb drivers, simply
return success (0). Plus, the return code is never checked in the
comedi core.

The comedi usb drivers do return error codes but the conditions can
never happen.

The first check is:

if (!dev)
return -EFAULT;

This checks that the passed comedi_device pointer is valid. The detach
function itself is called using this pointer so it MUST always be valid
or there is a bug in the core:

if (dev->driver)
dev->driver->detach(dev);

And the second check:

usb = dev->private;
if (!usb)
return -EFAULT;

The dev->private pointer is setup in the attach function to point to the
probed usb device. This value could be NULL if the attach fails. But,
since the comedi core is going to unload the driver anyway and does not
check for errors there is no gain by returning one.

After removing these checks from the comedi usb drivers the detach
functions required a bit of cleanup.

2. Remove all the printk noise in the detach functions

All of the printk output is really just noise. The user did a rmmod to
unload the driver, we really don't need to tell them about it.

Also, some of the messages are output using:

dev_dbg(dev->hw_dev, ...
or
dev_info(dev->hw_dev, ...

Unfortunately the hw_dev value is only used by drivers that are doing
DMA. For most drivers this variable is going to be NULL so the output
is not going to work as expected.

3. Refactor a couple static 'free_resource' functions into the detach
functions.

The 'free_resource' function is only being called by the detach and it
makes more sense to just absorb the code.

4. Remove a couple unnecessary braces for single statements.

5. Remove unnecessary comments.

Most of the comedi drivers appear to be based on the comedi skel driver
and have the comments from that driver included. These comments make
sense in the skel driver for reference but they don't need to be in any
of the actual drivers.

6. Remove all the extra whitespace.

It's not needed to make the functions any more readable.

7. Remove the now unused 'attached_successfully' variable in the
cb_pcimdda driver.

This variable was only used to conditionally output some driver noise
during the detach. Since all the printk's have been removed this
variable is no longer necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
98b08941b20e41fcbd3aaa577381e656e1c41291 04-May-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: remove debug tracing in vmk80xx driver

The vmk80xx driver uses a non-existant Kconfig symbol to enable
function call debug tracing. This output is really just noise
and doesn't serve any useful purpose. Remove all it's uses in
the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
151373aaff439ab4b1ff7f43cff2cbdd9f4a94f5 21-Apr-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> staging: comedi: vmk80xx.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away. This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Ian Abbott <abbotti@mev.co.uk>
CC: Mori Hess <fmhess@users.sourceforge.net>
CC: "J. Ali Harlow" <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b864cbe7c7d2e9db04ff89a9a0da1035afe8081b 21-Apr-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: vmk80xx.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away. This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Ian Abbott <abbotti@mev.co.uk>
CC: Mori Hess <fmhess@users.sourceforge.net>
CC: "J. Ali Harlow" <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8f9064a8a3b9f0dfd53bb0dfb3bbbfb457dda4bb 20-Apr-2012 Dan Carpenter <dan.carpenter@oracle.com> staging: comedi vmk80xx: lock held on error path

If the user passes an invalid command, then we don't drop the lock
before returning. The check for invalid commands doesn't need to be
done under lock so I moved it forward a couple lines.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d8b6ca0850c558f21989d468801ad1414b1372c4 30-Mar-2012 Ian Abbott <abbotti@mev.co.uk> staging: comedi: pass usb interface to comedi_usb_auto_config

The comedi_usb_auto_config() and comedi_usb_auto_unconfig() functions
currently take a 'struct usb_device *'. It makes more sense to pass a
'struct usb_interface *' to allow for composite USB devices.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4c093a6dc2240fd54d71a25b284e02d51509e430 30-Mar-2012 Ian Abbott <abbotti@mev.co.uk> staging: comedi: pass 'struct comedi_driver *' to comedi_..._auto_config

The comedi_pci_auto_config() and comedi_usb_auto_config() functions
currently take a board name parameter which is actually a driver name
parameter. Replace it with a pointer to the struct comedi_driver. This
will allow comedi_pci_auto_config() and comedi_usb_auto_config() to call
bus-type-specific auto-configuration hooks in the struct comedi_driver
if they exist (they don't yet). The idea is that these
bus-type-specific auto-configuration hooks won't have to search the bus
for the device being auto-configured like 'attach()' hook has to.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8ba69ce4b3567de881514c61ea8b04b14d8e68ae 18-May-2011 J. Ali Harlow <ali@avrc.city.ac.uk> comedi vmk80xx: support comedi auto-configuration

Add support for automatically associating a vmk8055 device with a
comedi device (previously the user had to use comedi_num_legacy_minors
to reserve device slots and then associate them with vmk8055 devices
using comedi_config).
Tested on multiple K8055s, but not on K8061s.

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
c647ed568af52cc75ece267ff02937d9263d1d27 18-May-2011 J. Ali Harlow <ali@avrc.city.ac.uk> comedi vmk80xx: support bits instruction

Calling comedi_dio_bifield2() returns EBUSY permanently. Implementing
the insn_bits call fixes the problem and is good in its own right since
one can then read and write to all the digitial lines at the same time.
Tested on a K8055, but not on a K8061.

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
510b9be374a4b589e7f6182d306b3c8ec9575e05 18-May-2011 J. Ali Harlow <ali@avrc.city.ac.uk> comedi vmk80xx: extend rudimentary_check to check both directions

rudimentary_check() can currently check whether the input or
output direction is currently available (no pending transaction),
but not both at the same time. We need this facility for do_bits().

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
9dc99895ef2bd96bad9674e4a0a6228c0690c912 18-May-2011 J. Ali Harlow <ali@avrc.city.ac.uk> comedi vmk80xx: simplify rinsn output calculation

vmk80xx_di_rinsn() and vmk80xx_do_rinsn() extract the required channel
data by inconsistent and overly-complex algorithms. Simplify them both.

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
85a2f34f4ecd48ce27f8ecc2d58ab66c05d55a9a 18-May-2011 J. Ali Harlow <ali@avrc.city.ac.uk> comedi vmk80xx: Digitial I/O should have a maxdata of 1

Digitial input and output sub-devices were reporting a maxdata of
0x1F and 0xFF respectively. They should both be 1.

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
587e500c40aef11163bf09d367b5c3b3aba820cc 18-May-2011 J. Ali Harlow <ali@avrc.city.ac.uk> comedi vmk80xx: make rudimentary_check a static function

rudimentary_check is a macro with side-effects (it returns
on error) which is contary to CodingStyle. Replace it with
a static function.

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3a229fd54db17f39ce14348c9de898b3671771ca 12-May-2011 J. Ali Harlow <ali@avrc.city.ac.uk> comedi vmk80xx: Style improvements

Style improvements to comedi driver vmk80xx:
* One variable definition per line
* Block quotes start and end with near-empty lines
* If..else statements use braces for both branches
* Egregious blank lines removed
* Use if..else rather than goto where trivial
* Don't put function return type on a separate line

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
a457732b836b970c82c7ba35b4cfc938c9c543f9 10-Jan-2010 Németh Márton <nm127@freemail.hu> staging: make USB device id constant

The id_table field of the struct usb_device_id is constant in <linux/usb.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>

Signed-off-by: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
6dd60bc62988fab9977b7fd0cd14eedc6e27eecd 25-Sep-2009 Bruce Jones <brucej97223@gmail.com> Staging: comedi: vmk80xx: cleanup formatting

Clean up formatting of a struct initializer, as per the
standard conventions.

Signed-off-by: Bruce Jones <brucej@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
0a85b6f0ab0d2edb0d41b32697111ce0e4f43496 08-Jun-2009 Mithlesh Thukral <mithlesh@linsyssoft.com> Staging: Comedi: Lindent changes to comdi driver in staging tree

Lindent changes to comdi driver in staging tree.
This patch is followed by the checkpatch.pl error fixes.
Did not make them part of this patch as the patch size is already huge.

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
985cafccbf9b7f862aa1c5ee566801e18b5161fb 10-May-2009 Manuel Gebele <forensixs@gmx.de> Staging: Comedi: vmk80xx: Add k8061 support

This patch adds support for the Velleman K8061 USB board
http://www.velleman.be/ot/en/product/view/?id=364910


Signed-off-by: Manuel Gebele <forensixs@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
b153d83efb3d0ea15f5e6c7dced98fadc66531de 22-Apr-2009 Greg Kroah-Hartman <gregkh@suse.de> Staging: comedi: vmk80xx.c: get the driver to build properly

There have been changes in the comedi core, this fixes the vmk80xx.c
driver to work properly with them, so it now will build properly.

Cc: Manuel Gebele <forensixs@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3faad67335e16863b2a143a61eedb5ac055c74c6 22-Apr-2009 Manuel Gebele <forensixs@gmx.de> Staging: comedi: add vmk80xx USB driver

The k80xx module was completely revised again. The update contains the
following new main features:
- support for digital input
- support for digital output
- support for pulse counters
- support up to 16 boards (by the way, the windows driver and the k8055
library (libk8055) has support for only 4 boards)

The driver can now manage all features what the board has to offer:
- analog input/output
- digital input/output
- pulse counters (read, reset, set debounce time)

I've also fixed some mistaken in the drivers source code/logic.

By testing all of the driver features i got no errors or something else.
The driver works fine....


From: Manuel Gebele <forensixs@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>