]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agostaging: vt6655: baseband add new function vnt_get_phy_field
Malcolm Priestley [Wed, 20 Aug 2014 21:30:28 +0000 (22:30 +0100)]
staging: vt6655: baseband add new function vnt_get_phy_field

This is a replacement for BBvCalculateParameter for getting
the phy fields via struct vnt_phy_field

This is a direct copy from the vt6656 driver.

BBvCalculateParameter will removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: add new stucture struct vnt_phy_field for rts/cts/data structures
Malcolm Priestley [Wed, 20 Aug 2014 21:30:27 +0000 (22:30 +0100)]
staging: vt6655: add new stucture struct vnt_phy_field for rts/cts/data structures

This will replace bySignalField*, byServiceField* and wTransmitLength_b
members of these strutures, these are removed in the last patch.

The len member is of little endian type.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device.h dead code remove bCCK
Malcolm Priestley [Wed, 20 Aug 2014 21:30:26 +0000 (22:30 +0100)]
staging: vt6655: device.h dead code remove bCCK

bCCK is always set to true, the only place it is used is in
BBvCalculateParameter which nots the value to false.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: remove remaining comments of PLICE_DEBUG
Malcolm Priestley [Sun, 17 Aug 2014 19:42:29 +0000 (20:42 +0100)]
staging: vt6655: remove remaining comments of PLICE_DEBUG

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: vntwifi.c remove unused directive PLICE_DEBUG
Malcolm Priestley [Sun, 17 Aug 2014 19:42:28 +0000 (20:42 +0100)]
staging: vt6655: vntwifi.c remove unused directive PLICE_DEBUG

PLICE_DEBUG is not defined remove dead code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: remove PLICE_DEBUG where it is defined
Malcolm Priestley [Sun, 17 Aug 2014 19:42:27 +0000 (20:42 +0100)]
staging: vt6655: remove PLICE_DEBUG where it is defined

Remove macro and directive leaving the code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: main_usb.c remove undefined PLICE_DEBUG code.
Malcolm Priestley [Sun, 17 Aug 2014 19:42:26 +0000 (20:42 +0100)]
staging: vt6655: main_usb.c remove undefined PLICE_DEBUG code.

PLICE_DEBUG is not defined in any header for this file.

Remove code, references and directives.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Use ether_crc in kernel.
Malcolm Priestley [Sun, 17 Aug 2014 19:42:25 +0000 (20:42 +0100)]
staging: vt6655: Use ether_crc in kernel.

ether_crc is already in kernel remove local code and
include linux/crc32.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Add missing include to pick up prototype
Max Vozeler [Sat, 30 Aug 2014 13:06:30 +0000 (15:06 +0200)]
staging: rtl8188eu: Add missing include to pick up prototype

This fixes the following sparse warning:

drivers/staging/rtl8188eu/hal/HalHWImg8188E_MAC.c:119:6: warning: symbol
'rtl88e_phy_mac_config' was not declared. Should it be static?

Signed-off-by: Max Vozeler <max@hinterhof.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused wrapper function rtw_hal_read_bbreg()
navin patidar [Sat, 23 Aug 2014 14:18:23 +0000 (19:48 +0530)]
staging: rtl8188eu: Remove unused wrapper function rtw_hal_read_bbreg()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Rework function phy_CalculateBitShift()
navin patidar [Sat, 23 Aug 2014 14:18:22 +0000 (19:48 +0530)]
staging: rtl8188eu: Rework function phy_CalculateBitShift()

Rename CamelCase variables and function name.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Implement NAPI support
Mark Einon [Thu, 21 Aug 2014 10:26:09 +0000 (11:26 +0100)]
staging: et131x: Implement NAPI support

This implements NAPI support for et131x by:

-adding a napi_struct to the private adapter struct
-changing netfif_rx_skb() call to netif_receive_skb()
-changing et131x_handle_recv_interrupt() to et131x_handle_recv_pkts()
 and taking a budget allocation.
-changing et131x_handle_send_interrupt() to et131x_handle_send_pkts()
-replacing bottom half workqueue with poll function which handles
 send & receive of skbs.
-adding various other necessary standard napi calls.

Also remove this item from the README TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Fix ET_INTR_TXDMA_ISR register name typo
Mark Einon [Wed, 20 Aug 2014 22:17:57 +0000 (23:17 +0100)]
staging: et131x: Fix ET_INTR_TXDMA_ISR register name typo

We actually mean to clear the ET_INTR_TXDMA_ISR reg after handling
a completed transfer, not the ET_INTR_TXDMA_ERR reg, which should
get handled immediately after.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Rename NUM_PACKETS_HANDLED to MAX_PACKETS_HANDLED
Mark Einon [Wed, 20 Aug 2014 22:17:56 +0000 (23:17 +0100)]
staging: et131x: Rename NUM_PACKETS_HANDLED to MAX_PACKETS_HANDLED

To better describe it's use as a hard limit.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Remove unnecessary i2c_wack variable
Mark Einon [Thu, 21 Aug 2014 15:02:32 +0000 (16:02 +0100)]
staging: et131x: Remove unnecessary i2c_wack variable

i2c_wack is only used to implement a while(1) loop, so let's remove it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Use for loop to initialise contiguous macstat registers to zero
Mark Einon [Wed, 20 Aug 2014 22:17:54 +0000 (23:17 +0100)]
staging: et131x: Use for loop to initialise contiguous macstat registers to zero

Replace a long list of contiguous writel() calls with a for loop iterating
over the same address values.

Also remove redundant comments on the macstat registers, the variable names
are good enough.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Use for loop to initialise contiguous registers to zero
Mark Einon [Wed, 20 Aug 2014 22:17:53 +0000 (23:17 +0100)]
staging: et131x: Use for loop to initialise contiguous registers to zero

Replace a long list of contiguous writel() calls with a for loop iterating
over the same values.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Don't handle rx/tx packets when changing mtu
Mark Einon [Wed, 20 Aug 2014 22:17:52 +0000 (23:17 +0100)]
staging: et131x: Don't handle rx/tx packets when changing mtu

There's no need to handle any rx/tx interrupts in the middle of an mtu
change, so don't.

After this change, receive and transmit interrupts are only handled in
one place, which paves the way to using NAPI.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: et131x: Use eth_mac_addr() instead of duplicating the functionality
Mark Einon [Wed, 20 Aug 2014 22:17:51 +0000 (23:17 +0100)]
staging: et131x: Use eth_mac_addr() instead of duplicating the functionality

There's already working code to set the mac address, so let's use it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: move boilerplate text to addi_apci_1564.c
Chase Southwood [Sat, 30 Aug 2014 05:55:01 +0000 (00:55 -0500)]
staging: comedi: addi_apci_1564: move boilerplate text to addi_apci_1564.c

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: Fix code style in jr3_pci.c
Vladimir A. Nazarenko [Wed, 27 Aug 2014 06:48:21 +0000 (17:48 +1100)]
Staging: comedi: Fix code style in jr3_pci.c

Static variables are initialised to 0 by GCC.
Fixes checkpatch.pl error:
  ERROR: do not initialise statics to 0 or NULL
  #684: FILE: jr3_pci.c:684:
  + static const struct jr3_pci_board *board = NULL;

Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbduxsigma: fix sparse endianness warnings
Chase Southwood [Sat, 30 Aug 2014 01:40:55 +0000 (20:40 -0500)]
staging: comedi: usbduxsigma: fix sparse endianness warnings

Sparse has many warnings like:

drivers/staging/comedi/drivers/usbduxsigma.c:293:21: warning: cast to
restricted __be32

on lines on which devpriv->in_buf is passed to be32_to_cpu().  This
suggests that this variable should actually be of type __be32.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbdux: fix sparse endianness warnings
Chase Southwood [Sat, 30 Aug 2014 01:40:32 +0000 (20:40 -0500)]
staging: comedi: usbdux: fix sparse endianness warnings

Sparse has many warnings like:

drivers/staging/comedi/drivers/usbdux.c:366:32: warning: cast to
restricted __le16

on lines on which devpriv->in_buf or devpriv->insn_buf are passed to
le16_to_cpu().  This suggests that both of these variables should actually
be of type __le16.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: Kconfig: make COMEDI_BOND select COMEDI_KCOMEDILIB
Ian Abbott [Wed, 27 Aug 2014 19:37:18 +0000 (20:37 +0100)]
staging: comedi: Kconfig: make COMEDI_BOND select COMEDI_KCOMEDILIB

Currently, to select the "comedi_bond" driver, the "kcomedilib" support
has to be selected first.  It seems more natural to allow the
"comedi_bond" driver to be selected on its own and to automatically
select the "kcomedilib" module as a result of that.  Change the
dependency/select relationship between the two configuration options to
do that.

Also, make "kcomedilib" a module that can be selected independently,
perhaps for use by out-of-tree modules, although it is not terribly
useful for anything other than "comedi_bond" currently.

Also, improve the help text for the config options.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pci230: fix a precedence bug
Dan Carpenter [Tue, 26 Aug 2014 07:55:51 +0000 (10:55 +0300)]
staging: comedi: amplc_pci230: fix a precedence bug

The addition operation has higher precedence than ?: so this would write
to PCI230_DACOUT1 instead of devpriv->daqio + PCI230_DACOUT1.

Fixes: 4f9c63fe5333 ('staging: comedi: amplc_pci230: refactor iobase addresses')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: s626: use comedi_pci_detach()
H Hartley Sweeten [Tue, 26 Aug 2014 00:55:52 +0000 (17:55 -0700)]
staging: comedi: s626: use comedi_pci_detach()

Use comedi_pci_detach() to handle the boilerplate part of the (*detach)
for this PCI driver.

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>
10 years agostaging: comedi: s626: tidy up freeing of the dma buffers
H Hartley Sweeten [Tue, 26 Aug 2014 00:55:51 +0000 (17:55 -0700)]
staging: comedi: s626: tidy up freeing of the dma buffers

Currently the dma buffers are freed during the detach of the driver using
the function s626_close_dma_b(). The buffers are also freed while the
interrupt handler is still attached. This could result in a race condition.

Refactor the code so that the buffers are freed after the interrupt handler
is released and the PCI device is disabled.

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>
10 years agostaging: comedi: gsc_hpdi: tidy up freeing of the dma buffers
H Hartley Sweeten [Tue, 26 Aug 2014 00:55:54 +0000 (17:55 -0700)]
staging: comedi: gsc_hpdi: tidy up freeing of the dma buffers

Factor the freeing of the dma buffers out of the (*detach).

Move the freeing of the buffers so that it occurs after the PCI device
has been disabled to avoid any race condition.

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>
10 years agostaging: comedi: cb_pcidas64: tidy up freeing of the dma buffers
H Hartley Sweeten [Tue, 26 Aug 2014 00:55:53 +0000 (17:55 -0700)]
staging: comedi: cb_pcidas64: tidy up freeing of the dma buffers

Factor the freeing of the dma buffers out of the (*detach).

Move the freeing of the buffers so that it occurs after the PCI device
has been disabled to avoid any race condition.

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>
10 years agostaging: comedi: icp_multi: remove 'valid' member from private data
H Hartley Sweeten [Tue, 26 Aug 2014 00:55:50 +0000 (17:55 -0700)]
staging: comedi: icp_multi: remove 'valid' member from private data

This member is set at the end of the driver attach and is only used to
verify that icp_multi_reset() can be called in the (*detach). The only
requirement for icp_multi_reset() to work is that the dev->mmio is valid.

Remove the 'valid' member from the private data and use 'dev->mmio' to
see if the reset can be done.

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>
10 years agostaging: comedi: adv_pci_dio: remove 'valid' member from private data
H Hartley Sweeten [Tue, 26 Aug 2014 00:55:49 +0000 (17:55 -0700)]
staging: comedi: adv_pci_dio: remove 'valid' member from private data

This member is set at the end of the driver attach and is only used to
verify that pci_dio_reset() can be called in the (*detach). The only
requirement for pci_dio_reset() to work is that the dev->iobase is valid.

Remove the 'valid' member from the private data and use 'dev->iobase' to
see if the reset can be done.

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>
10 years agostaging: comedi: comedi_pci: introduce comedi_pci_detach()
H Hartley Sweeten [Tue, 26 Aug 2014 00:55:48 +0000 (17:55 -0700)]
staging: comedi: comedi_pci: introduce comedi_pci_detach()

Introduce a generic (*detach) function for comedi PCI drivers to handle
the boilerplate code needed to detach a PCI driver.

This function works similar to comedi_legacy_detach() where it will:

  * free the dev->irq if it has been requested
  * iounmap the dev->mmio addres if it has been ioremap'ed

The helper then calls comedi_pci_disable() to release the regions and
disable the PCI device.

Use the new helper directly for the (*detach) in the following cases:

  * where comedi_pci_disable() is used directly for the (*detach)
  * where the detach function is just boilerplate

Use the new helper in the (*detach) of the simpler PCI drivers. Call
the helper after disabling interrupts (reset) and before any additional
cleanup (kfree) to avoid any race conditions with the interrupt handler.

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>
10 years agostaging: comedi: me4000: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:55 +0000 (16:04 -0700)]
staging: comedi: me4000: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: me4000: remove sanity checks in me4000_ao_insn_write()
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:54 +0000 (16:04 -0700)]
staging: comedi: me4000: remove sanity checks in me4000_ao_insn_write()

The comedi core does the sanity checking of the comedi_insn before
calling the (*insn_write). Remove the unnecessary checks.

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>
10 years agostaging: comedi: rtd520: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:53 +0000 (16:04 -0700)]
staging: comedi: rtd520: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: dt2801: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:52 +0000 (16:04 -0700)]
staging: comedi: dt2801: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: cb_pcidas64: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:51 +0000 (16:04 -0700)]
staging: comedi: cb_pcidas64: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: cb_pcidas: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:50 +0000 (16:04 -0700)]
staging: comedi: cb_pcidas: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: mf6x4: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:49 +0000 (16:04 -0700)]
staging: comedi: mf6x4: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: mf6x4: analog output data does not need extra masking
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:48 +0000 (16:04 -0700)]
staging: comedi: mf6x4: analog output data does not need extra masking

The comedi core validates that all the data values are <= s->maxdata
before calling the (*insn_write) function. The extra masking is not
needed. Remove it.

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>
10 years agostaging: comedi: cb_pcimdas: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:47 +0000 (16:04 -0700)]
staging: comedi: cb_pcimdas: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: cb_pcimdas: cleanup cb_pcimdas_ao_winsn()
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:46 +0000 (16:04 -0700)]
staging: comedi: cb_pcimdas: cleanup cb_pcimdas_ao_winsn()

The comedi core validates the insn->chanspec and data values before
calling the (*insn_write) functions. The 'chan' will always be valid
and the data values do not need to be masked.

Tidy up this function and remove the unnecessary code.

For aesthetics, rename the function.

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>
10 years agostaging: comedi: ni_670x: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:45 +0000 (16:04 -0700)]
staging: comedi: ni_670x: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: ni_670x: cleanup ni_670x_ao_winsn()
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:44 +0000 (16:04 -0700)]
staging: comedi: ni_670x: cleanup ni_670x_ao_winsn()

For aesthetics, rename this function and tidy it up 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>
10 years agostaging: comedi: dmm32at: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:43 +0000 (16:04 -0700)]
staging: comedi: dmm32at: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: dmm32at: cleanup dmm32at_ao_winsn()
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:42 +0000 (16:04 -0700)]
staging: comedi: dmm32at: cleanup dmm32at_ao_winsn()

For aesthetics, rename the function and tidy it up a bit. Also rename the
registers used by this function and add a macro to set the 'chan' bits in
the MSB data register.

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>
10 years agostaging: comedi: daqboard2000: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:41 +0000 (16:04 -0700)]
staging: comedi: daqboard2000: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, tidy up the (*insn_write) 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>
10 years agostaging: comedi: daqboard2000: remove #if 0'ed out code in ao (*insn_write)
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:40 +0000 (16:04 -0700)]
staging: comedi: daqboard2000: remove #if 0'ed out code in ao (*insn_write)

This code has been disabled since it's initial commit. It must not be
needed so just remove it.

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>
10 years agostaging: comedi: rti800: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:39 +0000 (16:04 -0700)]
staging: comedi: rti800: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: rti800: save unmunged data for ao readback
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:38 +0000 (16:04 -0700)]
staging: comedi: rti800: save unmunged data for ao readback

The unmunged data should be saved for readback not the munged data.

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>
10 years agostaging: comedi: das08: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:37 +0000 (16:04 -0700)]
staging: comedi: das08: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

The das08_ao_initialize() function is only called when the subdevice
is first setup during the attach. It is used to initialize the channels
to a known state. Absorb that function to simplify the code 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>
10 years agostaging: comedi: das08: fix bug in das08_ao_winsn()
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:36 +0000 (16:04 -0700)]
staging: comedi: das08: fix bug in das08_ao_winsn()

The comedi core expects (*insn_write) functions to write insn->n values
to the hardware and return the number of values written.

Currently, this function only writes the first value. Fix it to work
like the core expects.

For aesthetics, rename the function and tidy it up 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>
10 years agostaging: comedi: pcl818: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:35 +0000 (16:04 -0700)]
staging: comedi: pcl818: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: quatech_daqp_cs: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:34 +0000 (16:04 -0700)]
staging: comedi: quatech_daqp_cs: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: quatech_daqp_cs: fix bug in daqp_ao_insn_write()
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:33 +0000 (16:04 -0700)]
staging: comedi: quatech_daqp_cs: fix bug in daqp_ao_insn_write()

The comedi core expects (*insn_write) functions to write insn->n values
to the hardware and return the number of values written.

Currently, this function only writes the first value. Fix it to work
like the core expects.

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>
10 years agostaging: comedi: dt3000: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:32 +0000 (16:04 -0700)]
staging: comedi: dt3000: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, rename the (*insn_write) function and tidy it up 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>
10 years agostaging: comedi: ii_pci20kc: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:31 +0000 (16:04 -0700)]
staging: comedi: ii_pci20kc: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

Remove the unused private data and its allocation.

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>
10 years agostaging: comedi: ii_pci20kc: save unmunged data for ao readback
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:30 +0000 (16:04 -0700)]
staging: comedi: ii_pci20kc: save unmunged data for ao readback

The unmunged data should be saved for readback not the munged data.

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>
10 years agostaging: comedi: me_daq: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:29 +0000 (16:04 -0700)]
staging: comedi: me_daq: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: me_daq: fix bug in me_ao_insn_write()
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:28 +0000 (16:04 -0700)]
staging: comedi: me_daq: fix bug in me_ao_insn_write()

The comedi core expects (*insn_write) functions to write insn->n values
to the hardware and return the number of values written.

Currently, this function only writes the first value. The core also
validates all the data values so the extra masking with s->maxdata is
not needed. Fix this function to work like the core expects.

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>
10 years agostaging: comedi: ni_atmio16d: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:27 +0000 (16:04 -0700)]
staging: comedi: ni_atmio16d: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: ni_atmio16d: cleanup atmio16d_ao_insn_write()
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:26 +0000 (16:04 -0700)]
staging: comedi: ni_atmio16d: cleanup atmio16d_ao_insn_write()

The comedi core validates the insn->chanspec and data values before
calling the (*insn_write) functions. The 'chan' will always be valid.

Tidy up this function up a bit and remove the unnecessary code.

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>
10 years agostaging: comedi: addi_apci_3xxx: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:25 +0000 (16:04 -0700)]
staging: comedi: addi_apci_3xxx: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: amplc_pci230: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:24 +0000 (16:04 -0700)]
staging: comedi: amplc_pci230: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, rename the (*insn_write) function and tidy it up.

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>
10 years agostaging: comedi: amplc_pci224: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:23 +0000 (16:04 -0700)]
staging: comedi: amplc_pci224: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, rename the (*insn_write) function and tidy it up.

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>
10 years agostaging: comedi: cb_das16_cs: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:22 +0000 (16:04 -0700)]
staging: comedi: cb_das16_cs: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, rename the (*insn_write) function.

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>
10 years agostaging: comedi: addi_apci_3501: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:21 +0000 (16:04 -0700)]
staging: comedi: addi_apci_3501: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: dt2811: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:20 +0000 (16:04 -0700)]
staging: comedi: dt2811: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, rename the (*insn_write) function and tidy it up.

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>
10 years agostaging: comedi: dt9812: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:19 +0000 (16:04 -0700)]
staging: comedi: dt9812: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: das6402: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:18 +0000 (16:04 -0700)]
staging: comedi: das6402: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: usbduxsigma: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:17 +0000 (16:04 -0700)]
staging: comedi: usbduxsigma: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: usbdux: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:16 +0000 (16:04 -0700)]
staging: comedi: usbdux: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: ni_mio_common: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:15 +0000 (16:04 -0700)]
staging: comedi: ni_mio_common: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: pcmmio: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:14 +0000 (16:04 -0700)]
staging: comedi: pcmmio: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: pcmda12: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:13 +0000 (16:04 -0700)]
staging: comedi: pcmda12: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: ni_at_ao: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:12 +0000 (16:04 -0700)]
staging: comedi: ni_at_ao: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: pcl711: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:11 +0000 (16:04 -0700)]
staging: comedi: pcl711: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: pcl812: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:10 +0000 (16:04 -0700)]
staging: comedi: pcl812: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, tidy up pcl812_ao_insn_write().

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>
10 years agostaging: comedi: s626: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:09 +0000 (16:04 -0700)]
staging: comedi: s626: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: rti802: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:08 +0000 (16:04 -0700)]
staging: comedi: rti802: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: s526: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:07 +0000 (16:04 -0700)]
staging: comedi: s526: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, rename the (*insn_write) function and tidy it up 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>
10 years agostaging: comedi: pcl726: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:06 +0000 (16:04 -0700)]
staging: comedi: pcl726: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: icp_multi: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:05 +0000 (16:04 -0700)]
staging: comedi: icp_multi: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, rename the (*insn_write) function and tidy it up 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>
10 years agostaging: comedi: dt282x: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:04 +0000 (16:04 -0700)]
staging: comedi: dt282x: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: das16: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:03 +0000 (16:04 -0700)]
staging: comedi: das16: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: adl_pci9111: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:02 +0000 (16:04 -0700)]
staging: comedi: adl_pci9111: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

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>
10 years agostaging: comedi: cb_pcimdda: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:01 +0000 (16:04 -0700)]
staging: comedi: cb_pcimdda: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

Remove the unused private data and its allocation.

For aesthetics, rename the (*insn_write) and (*insn_read) functions.

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>
10 years agostaging: comedi: multiq3: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:04:00 +0000 (16:04 -0700)]
staging: comedi: multiq3: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

Remove the unused private data and its allocation.

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>
10 years agostaging: comedi: fl512: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:59 +0000 (16:03 -0700)]
staging: comedi: fl512: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

Remove the unused private data and its allocation.

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>
10 years agostaging: comedi: dac02: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:58 +0000 (16:03 -0700)]
staging: comedi: dac02: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

Remove the unused private data and its allocation.

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>
10 years agostaging: comedi: aio_aio12_8: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:57 +0000 (16:03 -0700)]
staging: comedi: aio_aio12_8: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

Remove the unused private data and its allocation.

For aesthetics, rename the (*insn_write) function and tidy it up.

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>
10 years agostaging: comedi: adl_pci6208: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:56 +0000 (16:03 -0700)]
staging: comedi: adl_pci6208: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

The loop used to write the values could timeout. Move the saving of
the readback value so that the last value written is always saved.

Remove the unused private data and its allocation.

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>
10 years agostaging: comedi: skel: use comedi_subdevice 'readback'
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:55 +0000 (16:03 -0700)]
staging: comedi: skel: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

For aesthetics, rename the (*insn_write) function and tidy it up a bit.

Add a comment about the 'readback' member.

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>
10 years agostaging: comedi: add a 'readback' member to comedi_subdevice
H Hartley Sweeten [Mon, 25 Aug 2014 23:03:54 +0000 (16:03 -0700)]
staging: comedi: add a 'readback' member to comedi_subdevice

The analog output hardware in most comedi drivers does not provide a
way to readback to last values written to the channels. In order to
provide an (*insn_read) for the analog output subdevice, the comedi
drivers save the last values for each channel in the private data.

Add a new member, 'readback', to the comedi_subdevice definition to
provide a common way to save these values.

Introduce a comedi core function, comedi_alloc_subdev_readback(), to
allocate the memory needed to save the values. This memory will be
automatically kfree'd when the driver is detached.

Introduce a comedi core function, comedi_readback_insn_read(), that
the comedi drivers can use for the (*insn_read) of a subdevice to
return the saved values for each channel.

This will allow removing the boilerplate in the comedi drivers to
return the saved values. In some drivers it will also allow removing
the private data completely.

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>
10 years agostaging: comedi: addi_apci_1032: remove deadcode in apci1032_cos_cmdtest()
H Hartley Sweeten [Mon, 25 Aug 2014 22:24:03 +0000 (15:24 -0700)]
staging: comedi: addi_apci_1032: remove deadcode in apci1032_cos_cmdtest()

Reported by: coverity
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>
10 years agostaging: comedi: addi_apci_1564: remove deadcode in apci1564_cos_cmdtest()
H Hartley Sweeten [Mon, 25 Aug 2014 22:24:02 +0000 (15:24 -0700)]
staging: comedi: addi_apci_1564: remove deadcode in apci1564_cos_cmdtest()

Reported by: coverity
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>
10 years agostaging: comedi: addi_apci_2032: remove deadcode in apci2030_int_cmdtest()
H Hartley Sweeten [Mon, 25 Aug 2014 22:24:01 +0000 (15:24 -0700)]
staging: comedi: addi_apci_2032: remove deadcode in apci2030_int_cmdtest()

Reported by: coverity
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>
10 years agostaging: comedi: amplc_pc236_common: remove deadcode in pc236_intr_cmdtest()
H Hartley Sweeten [Mon, 25 Aug 2014 22:24:00 +0000 (15:24 -0700)]
staging: comedi: amplc_pc236_common: remove deadcode in pc236_intr_cmdtest()

Reported by: coverity
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>
10 years agostaging: comedi: comedi_parport: remove deadcode in parport_intr_cmdtest()
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:59 +0000 (15:23 -0700)]
staging: comedi: comedi_parport: remove deadcode in parport_intr_cmdtest()

Reported by: coverity
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>
10 years agostaging: comedi: dt3000: remove deadcode in dt3k_ai_cmdtest()
H Hartley Sweeten [Mon, 25 Aug 2014 22:23:58 +0000 (15:23 -0700)]
staging: comedi: dt3000: remove deadcode in dt3k_ai_cmdtest()

Reported by: coverity
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>