]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
10 years agodrivers: staging: rtl8821ae: Fix '"(foo*)" should be "(foo *)"' errors
Greg Donald [Sat, 6 Sep 2014 23:40:29 +0000 (18:40 -0500)]
drivers: staging: rtl8821ae: Fix '"(foo*)" should be "(foo *)"' errors

Fix checkpatch.pl '"(foo*)" should be "(foo *)"' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: sort.c: fix coding style
Omar Sandoval [Sat, 6 Sep 2014 08:59:37 +0000 (01:59 -0700)]
staging: bcm: sort.c: fix coding style

Fix checkpatch.pl "Alignment should match open parenthesis".

Signed-off-by: Omar Sandoval <osandov@osandov.com>
Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: remove rate_control_algorithm pid
Malcolm Priestley [Thu, 4 Sep 2014 22:08:37 +0000 (23:08 +0100)]
staging: vt6656: remove rate_control_algorithm pid

rate control algorithm pid was removed from wireless tree

The device defaults to algorithm 'minstrel_ht'

There has been no problems using this algorithm.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device_free_info() warn: variable dereferenced before check
Malcolm Priestley [Thu, 4 Sep 2014 22:08:36 +0000 (23:08 +0100)]
staging: vt6655: device_free_info() warn: variable dereferenced before check

pDevice is never NULL when this function is called remove the check.

This fixes smatch warning
drivers/staging/vt6655/device_main.c:1023 device_free_info() warn: variable dereferenced
before check 'pDevice' (see line 1021)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@01.org
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gs_fpgaboot: remove checks for CONFIG_B4860G100
Paul Bolle [Fri, 5 Sep 2014 11:28:01 +0000 (13:28 +0200)]
staging: gs_fpgaboot: remove checks for CONFIG_B4860G100

There are two checks for CONFIG_B4860G100 in this driver. But there's no
Kconfig symbol B4860G100. These checks will always evaluate to false.
Remove them and the code they hide.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: rtl8821ae: Fix "space required before that '*'" errors
Greg Donald [Thu, 4 Sep 2014 21:01:04 +0000 (16:01 -0500)]
drivers: staging: rtl8821ae: Fix "space required before that '*'" errors

Fix checkpatch.pl "space required before that '*'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: rtl8723au: Fix "space required before that '*'" errors
Greg Donald [Thu, 4 Sep 2014 20:49:30 +0000 (15:49 -0500)]
drivers: staging: rtl8723au: Fix "space required before that '*'" errors

Fix checkpatch.pl "space required before that '*'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: rtl8192u: Fix "space required before that '*'" errors
Greg Donald [Thu, 4 Sep 2014 20:37:41 +0000 (15:37 -0500)]
drivers: staging: rtl8192u: Fix "space required before that '*'" errors

Fix checkpatch.pl "space required before that '*'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Removed unnecessary cast
Eli Billauer [Fri, 5 Sep 2014 09:53:06 +0000 (12:53 +0300)]
staging: xillybus: Removed unnecessary cast

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Blank lines add/remove
Eli Billauer [Thu, 4 Sep 2014 14:47:57 +0000 (17:47 +0300)]
staging: xillybus: Blank lines add/remove

* Blank lines between a function call and its return status check were
  removed.
* Double blank lines were removed.
* Blank lines were added and removed as to silence checkpatch.pl --strict

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Fix indentations
Eli Billauer [Thu, 4 Sep 2014 14:47:56 +0000 (17:47 +0300)]
staging: xillybus: Fix indentations

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Trivial coding style fixes
Eli Billauer [Thu, 4 Sep 2014 14:47:55 +0000 (17:47 +0300)]
staging: xillybus: Trivial coding style fixes

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Reorganize line breaks for clarity
Eli Billauer [Thu, 4 Sep 2014 14:47:54 +0000 (17:47 +0300)]
staging: xillybus: Reorganize line breaks for clarity

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Fix comments
Eli Billauer [Thu, 4 Sep 2014 14:47:52 +0000 (17:47 +0300)]
staging: xillybus: Fix comments

Trivial comments removed, and one comment clarified

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Added curly brackets as required
Eli Billauer [Thu, 4 Sep 2014 14:47:51 +0000 (17:47 +0300)]
staging: xillybus: Added curly brackets as required

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Clarified the stop condition for a loop
Eli Billauer [Thu, 4 Sep 2014 14:47:50 +0000 (17:47 +0300)]
staging: xillybus: Clarified the stop condition for a loop

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Use the return value of wait_event_interruptible
Eli Billauer [Thu, 4 Sep 2014 14:47:49 +0000 (17:47 +0300)]
staging: xillybus: Use the return value of wait_event_interruptible

Rather than checking the wait condition, the return value of
wait_event_interruptible() and wait_event_interruptible_timeout() is
used.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Fixes related to "rc" variable
Eli Billauer [Thu, 4 Sep 2014 14:47:48 +0000 (17:47 +0300)]
staging: xillybus: Fixes related to "rc" variable

"rc" is often used to hold the return value of a function call. This patch
removes unnecessary assignments to this variable, and makes a few related
execution flow improvements.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: EAGAIN status handling improvement
Eli Billauer [Thu, 4 Sep 2014 14:47:47 +0000 (17:47 +0300)]
staging: xillybus: EAGAIN status handling improvement

The -EAGAIN status is passed through an "rc" variable instead of a less
common flow.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Improved goto flow for error handling
Eli Billauer [Thu, 4 Sep 2014 14:47:46 +0000 (17:47 +0300)]
staging: xillybus: Improved goto flow for error handling

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Improved error handling
Eli Billauer [Thu, 4 Sep 2014 14:47:45 +0000 (17:47 +0300)]
staging: xillybus: Improved error handling

xilly_scan_idt() now returns an error status code, rather than being a void
function and hint the status through an entry in a data structure.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Removed unnecessary error message
Eli Billauer [Thu, 4 Sep 2014 14:47:44 +0000 (17:47 +0300)]
staging: xillybus: Removed unnecessary error message

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Removed unnecessary warning message
Eli Billauer [Thu, 4 Sep 2014 14:47:43 +0000 (17:47 +0300)]
staging: xillybus: Removed unnecessary warning message

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Non-interruptible mutex_lock() on release method
Eli Billauer [Thu, 4 Sep 2014 14:47:42 +0000 (17:47 +0300)]
staging: xillybus: Non-interruptible mutex_lock() on release method

Responding to an interrupt while handling the "release" method can't end
well anyhow. In practical cases, this can force the user to wait up to
one second while flushing remaining data is attempted (a timeout on the flush
mechanism limits the time for flushing).

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Use SEEK_* predefined constants
Eli Billauer [Thu, 4 Sep 2014 14:47:41 +0000 (17:47 +0300)]
staging: xillybus: Use SEEK_* predefined constants

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Use devm_kcalloc() for arrays
Eli Billauer [Thu, 4 Sep 2014 14:47:40 +0000 (17:47 +0300)]
staging: xillybus: Use devm_kcalloc() for arrays

Replace devm_kzalloc where it applies.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: move analog input (*insn_read) function
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:51 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: move analog input (*insn_read) function

For aesthetics, move the analog input (*insn_read) function so it
is not located in the middle of the async command support functions.
Also, rename it for consistency.

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_pci9118: tidy up some wordy comments
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:50 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: tidy up some wordy comments

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_pci9118: no need to reset ai FIFO after (*insn_read)
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:49 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: no need to reset ai FIFO after (*insn_read)

The analog input FIFO is reset at the start of every (*insn_read) and (*do_cmd)
operation. It's also reset for the analog input (*cancel).

There's no reason to reset the FIFO if an (*insn_read) times out or after
all the samples have been acquired.

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_pci9118: introduce pci9118_amcc_setup_dma()
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:48 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: introduce pci9118_amcc_setup_dma()

Introduce a helper function to program the AMCC master write address and
transfer count registers to setup a DMA transaction.

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_pci9118: introduce pci9118_amcc_dma_ena()
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:47 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: introduce pci9118_amcc_dma_ena()

Introduce a helper function to program the AMCC master control/status
register to enable/disable dma.

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_pci9118: introduce pci9118_amcc_int_ena()
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:46 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: introduce pci9118_amcc_int_ena()

Introduce a helper function to program the AMCC interrupt control/
status register to enable/disable interrupts.

Fix the analog input (*cancel). The analog input async command support
is the only interrupt generator. The (*cancel) should always disable
interrupts.

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_pci9118: rename 'IntControlReg'
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:45 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: rename 'IntControlReg'

Rename this CamelCase member of the private 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: adl_pci9118: rename 'AdControlReg'
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:44 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: rename 'AdControlReg'

Rename this CamelCase member of the private 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: adl_pci9118: rename 'AdFunctionReg'
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:43 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: rename 'AdFunctionReg'

Rename this CamelCase member of the private 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: adl_pci9118: fix ai range/aref programming
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:42 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: fix ai range/aref programming

Currently the analog input range and aref are set in setup_channel_list().
This works for the (*insn_read) but the (*do_cmd) has a problem.

In (*do_cmd) the ai control register is reset to 0 before the function works
out the bits needed to control the acquisition. This happens after the
setup_channel_list() call so the range is reset to bipolar and the aref to
single-ended.

Introduce a helper function, pci9118_ai_set_range_aref(), to handle the
programming of the range and aref bits. This function first clears the
cached value of the ai control register in the private data then sets the
appropriate bits. The (*insn_read) and (*do_cmd) can then set the other
bits needed to control the acquisition.

Then setup_channel_list() just needs to program the chanlist scan 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: adl_pci9118: ai (*insn_read) does not use interrupts
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:41 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: ai (*insn_read) does not use interrupts

The analog input (*insn_read) in this driver is done as a software-triggered,
polled operation. The PCI9118_AI_CTRL_INT bit in the control register, which
is actually set in setup_channel_list(), should not be set.

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_pci9118: cleanup and simplify pci9118_reset()
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:40 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: cleanup and simplify pci9118_reset()

Change the return type to void, this function always succeeds and the
callers never check the return value.

According to the The User Manual for the PCI-9118, the hardware does not
require any particular "reset" in order to function. Simplify the reset
so it justs gets the board info a known state with interrupts disabled.

There is no reason to initialize the private data members in this function.
They all default to '0' due to the kzalloc() of the private data and the
subdevice operations all initialize them as needed.

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_pci9118: move analog output (*insn_write) function
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:39 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: move analog output (*insn_write) function

For aesthetics, move the analog output (*insn_write) function so it
is not located in the middle of the analog input functions. Also,
rename it for consistency.

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_pci9118: use comedi_subdevice 'readback'
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:38 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: 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 board is "reset" prior to the subdevice init. Part of this reset
sets all the analog output channels to 0V. Move the initialization of
the 'readback' values after the 'readback' member has been allocated.

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_pci9118: move digitial input (*insn_bits) function
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:37 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: move digitial input (*insn_bits) function

For aesthetics, move the digital inputs (*insn_bits) function so it
is not located in the middle of the analog input functions. Also,
rename it for consistency.

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_pci9118: don't reset digital outputs
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:36 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: don't reset digital outputs

Currently this driver resets the digital output channels to a low state
when the driver is attached and detached.

Since the digital output state can be read, initialize the subdevice
state when the driver is attached and don't reset them.

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_pci9118: move digitial output (*insn_bits) function
H Hartley Sweeten [Fri, 5 Sep 2014 16:25:35 +0000 (09:25 -0700)]
staging: comedi: adl_pci9118: move digitial output (*insn_bits) function

For aesthetics, move the digital outputs (*insn_bits) function so it
is not located in the middle of the analog input functions. Also,
rename it for consistency.

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_pci9118: tidy up the interrupt control/status bit defines
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:27 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: tidy up the interrupt control/status bit defines

Rename the CamelCase defines used for the interrupt control/status register
bits and convert them to bit shifts.

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_pci9118: tidy up the interrupt control/status register
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:26 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: tidy up the interrupt control/status register

The register at offset 0x38 is the "interrupt control" register when written
and the "interrupt status" register when read. Both registers use the same
bit defines.

For aesthetics, use a common define for this 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: adl_pci9118: introduce pci9118_ai_reset_fifo()
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:25 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: introduce pci9118_ai_reset_fifo()

Introduce a helper function to reset the analog input FIFO. For
aesthetics, rename the register used to reset the FIFO.

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_pci9118: tidy up the ai config register bit defines
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:24 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: tidy up the ai config register bit defines

Rename the CamelCase defines used for the analog input config register
bits and convert them to bit shifts.

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_pci9118: rename PCI9118_ADFUNC define
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:23 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: rename PCI9118_ADFUNC define

For aesthetics, rename this define used for the analog input function
config 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: adl_pci9118: rename PCI9118_SCANMOD define
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:22 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: rename PCI9118_SCANMOD define

For aesthetics, rename this define used for the analog input auto scan
mode 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: adl_pci9118: rename PCI9118_BURST define
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:21 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: rename PCI9118_BURST define

For aesthetics, rename this define used for the analog input burst
number 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: adl_pci9118: rename PCI9118_GAIN define
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:20 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: rename PCI9118_GAIN define

For aesthetics, rename this define used for the analog input chanlist
programming 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: adl_pci9118: introduce pci9118_ai_start_conv()
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:19 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: introduce pci9118_ai_start_conv()

Writing any value to the "software trigger" register generates a trigger
pulse to start an A/D conversion. Introduce a helper function to clarify
this. For aesthetics, rename the define used for the register.

According to the datasheet the extra delay is not needed after starting
the conversion. 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: adl_pci9118: clarify the digital I/O register
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:18 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: clarify the digital I/O register

The same register is used for both the digital inputs and outputs.
Reading the register returns the state of the 4 digtial input channels
and the 4 digital output channels. Writing to the register updates the
digital outputs.

Add some comments to clarify this and use a single define for the 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: adl_pci9118: tidy up the ai control register bit defines
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:17 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: tidy up the ai control register bit defines

Rename the CamelCase defines used for the analog input control register
bits and convert them to bit shifts.

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_pci9118: rename PCI9118_ADCNTRL define
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:16 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: rename PCI9118_ADCNTRL define

For aesthetics, rename this define used for the analog input control
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: adl_pci9118: tidy up the ai status register bit defines
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:15 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: tidy up the ai status register bit defines

Rename the CamelCase defines used for the analog input status register
bits and convert them to bit shifts.

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_pci9118: rename PCI9118_ADSTAT define
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:14 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: rename PCI9118_ADSTAT define

For aesthetics, rename this define used for the analog input status
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: adl_pci9118: tidy up analog output register defines
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:13 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: tidy up analog output register defines

Replace the current defines with a macro that calculates the correct
register offset based on the channel.

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_pci9118: tidy up analog input fifo register define
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:12 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: tidy up analog input fifo register define

For aesthetics, rename the define used for the analog input fifo register
and tidy up its use in the 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: adl_pci9118: introduce pci9118_timer_set_mode()
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:11 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: introduce pci9118_timer_set_mode()

This driver uses 32-bit instructions to write the 8254 timers so we
can't use the helper functions provided by 8253.h.

To clarify the code introduce a helper function to set the timer mode.

Remove the unnecessary commented out timer mode programming.

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_pci9118: introduce pci9118_timer_write()
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:10 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: introduce pci9118_timer_write()

This driver uses 32-bit instructions to write the 8254 timers so we
can't use the helper functions provided by 8253.h.

To clarify the code introduce a helper function to write to the timers.

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_pci9118: all registers are 32-bit
H Hartley Sweeten [Thu, 4 Sep 2014 19:14:09 +0000 (12:14 -0700)]
staging: comedi: adl_pci9118: all registers are 32-bit

According to the PCI-9118 User's Manual, all registers are 32-bit. Fix a
couple of read/write operations that use 16-bit access.

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_pci9118: tidy up analog input subdevice init
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:42 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: tidy up analog input subdevice init

For aesthetics, add some whitespace to the analog input subdevice init.
Tidy up the subdevice n_chan initialization.

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_pci9118: tidy up analog output subdevice init
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:41 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: tidy up analog output subdevice init

For aesthetics, add some whitespace to the analog output subdevice init.

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_pci9118: tidy up digital input subdevice init
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:40 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: tidy up digital input subdevice init

For aesthetics, add some whitespace to the digital input subdevice init.

Remove the SDF_GROUND and SDF_COMMON subdev_flags. These flags only apply
to analog subdevices.

Remove the 'len_chanlist' init, this subdevice member is only used with
subdevices that support async commands.

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_pci9118: tidy up digital output subdevice init
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:39 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: tidy up digital output subdevice init

For aesthetics, add some whitespace to the digital output subdevice init.

Remove the SDF_GROUND and SDF_COMMON subdev_flags. These flags only apply
to analog subdevices.

Remove the 'len_chanlist' init, this subdevice member is only used with
subdevices that support async commands.

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_pci9118: allocate private data in pci9118_common_attach()
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:38 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: allocate private data in pci9118_common_attach()

The (*auto_attach) and legacy (*attach) both allocate the private data but
don't use it. For aesthetics, move the allocation into the common attach
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: adl_pci9118: rename boardinfo struct
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:37 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: rename boardinfo struct

For aesthetics, rename the struct used for the boardinfo so it has
namespace associated with the driver. Also, rename the local variable
used for the boardinfo pointer to simply 'board'.

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_pci9118: remove unnecessary dev->board_name initialization
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:36 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove unnecessary dev->board_name initialization

The (*auto_attach) in this driver will set the dev->board_name and the comedi core
will set it when using the legacy (*attach). Remove the unnecessary initialization
in pci9118_common_attach().

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_pci9118: remove 'device_id' from boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:35 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'device_id' from boardinfo

This member of the boardinfo is the same for all entries. 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: adl_pci9118: use 'context' in (*auto_attach)
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:34 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: use 'context' in (*auto_attach)

The pci_device_id 'driver_data' is passed as the 'context' when the (*auto_attach)
mechanism is used to attach this driver. Add a boardid enum and index the boardinfo
so that the "pci9118dg" boardinfo is automatically selected. This allow removing
the pci9118_find_boardinfo() helper.

Unfortunately all the boards supported by this driver have the same device id.
Add commented out entries in the device table for them.

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_pci9118: refactor 'ai_maxdata' in boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:33 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: refactor 'ai_maxdata' in boardinfo

The boards supported by this driver either have 12-bit or 16-bit analog
inputs. For aesthetics, replace the 'ai_maxdata' member in the boardinfo
with a bit-field flag, 'ai_is_16bit', and refactor the subdevice init to
use the new 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: adl_pci9118: refactor 'rangelist_ai' in boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:32 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: refactor 'rangelist_ai' in boardinfo

The boards supported by this driver either have "normal" or "high gain"
analog input ranges.

For aesthetics, replace the 'rangelist_ai' member in the boardinfo with
a bit-field flag 'is_hg' to indicate the "high gain" range is used.
Refactor the subdevice init to use the flag to set the correct range_table.

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_pci9118: remove 'ai_pacer_min' from boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:31 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'ai_pacer_min' from boardinfo

This value can easily be calculated based on the minimum sampling rate,
'ai_ns_min', and the base clock speed of the timers. Do that instead and
remove the boardinfo.

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_pci9118: remove 'ai_ns_min' from boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:30 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'ai_ns_min' from boardinfo

The minimum convert time 'ai_ns_min' is based on the sampling rate of the A/D
converter. This driver supports boards that use different ADC chips for 16-bit
and 12-bit analog inputs. These chips have different sampling rates.

For aesthetics, move the 'ai_ns_min' member from the boardinfo to the private
data. Initialize the member during the attach based on the 'maxdata' of the
analog inputs.

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_pci9118: remove 'n_aichan' boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:29 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'n_aichan' boardinfo

This member of the boardinfo is the same for all entries. Remove it.

Also, remove the initialization of the subdevice 'len_chanlist'. This
member is only used if the subdevice supports async commands.

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_pci9118: remove 'n_aichand' boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:28 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'n_aichand' boardinfo

This member of the boardinfo is the same for all entries. It's also
half the subdevice 'n_chan'. Use that instead and remove the boardinfo.

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_pci9118: remove 'n_aichanlist' boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:27 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'n_aichanlist' boardinfo

This member of the boardinfo is the same for all entries. 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: adl_pci9118: remove 'half_fifo_size' boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:26 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'half_fifo_size' boardinfo

This member of the boardinfo is the same for all entries. 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: adl_pci9118: remove 'n_aochan' boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:25 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'n_aochan' boardinfo

This member of the boardinfo is the same for all entries. Remove it.

Also, remove the initialization of the subdevice 'len_chanlist'. This
member is only used if the subdevice supports async commands.

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_pci9118: remove 'ao_maxdata' boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:24 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'ao_maxdata' boardinfo

This member of the boardinfo is the same for all entries. 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: adl_pci9118: remove 'rangelist_ao' boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:23 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove 'rangelist_ao' boardinfo

This member of the boardinfo is the same for all entries. 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: adl_pci9118: remove unused boardinfo
H Hartley Sweeten [Thu, 4 Sep 2014 17:39:22 +0000 (10:39 -0700)]
staging: comedi: adl_pci9118: remove unused boardinfo

Remove all the boardinfo members that are not used by the 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: hwdrv_apci1500: use dev->class_dev in calls to dev_warn()
Chase Southwood [Wed, 3 Sep 2014 23:58:49 +0000 (18:58 -0500)]
staging: comedi: hwdrv_apci1500: use dev->class_dev in calls to dev_warn()

git-grep reveals that hwdrv_apci1500.c is the only file in comedi that uses
dev->hw_dev in calls to dev_{err,warn}().  The rest of the drivers pass
dev->class_dev to these macros instead.  Switch the dev_warn() calls in
this driver to use dev->class_dev as well, for consistency.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: s626: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:46:00 +0000 (13:46 +0100)]
staging: comedi: s626: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: rtd520: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:59 +0000 (13:45 +0100)]
staging: comedi: rtd520: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: ni_pcidio: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:58 +0000 (13:45 +0100)]
staging: comedi: ni_pcidio: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: ni_mio_common: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:57 +0000 (13:45 +0100)]
staging: comedi: ni_mio_common: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: ni_labpc_common: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:56 +0000 (13:45 +0100)]
staging: comedi: ni_labpc_common: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: ni_at_a2150: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:55 +0000 (13:45 +0100)]
staging: comedi: ni_at_a2150: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: me4000: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:54 +0000 (13:45 +0100)]
staging: comedi: me4000: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: dt3000: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:53 +0000 (13:45 +0100)]
staging: comedi: dt3000: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: dt282x: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:52 +0000 (13:45 +0100)]
staging: comedi: dt282x: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: das1800: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:51 +0000 (13:45 +0100)]
staging: comedi: das1800: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: cb_pcidas64: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:50 +0000 (13:45 +0100)]
staging: comedi: cb_pcidas64: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: amplc_pci230: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:49 +0000 (13:45 +0100)]
staging: comedi: amplc_pci230: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: adl_pci9118: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:48 +0000 (13:45 +0100)]
staging: comedi: adl_pci9118: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: addi_apci_3xxx: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:47 +0000 (13:45 +0100)]
staging: comedi: addi_apci_3xxx: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: 8253.h: use CMDF_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:46 +0000 (13:45 +0100)]
staging: comedi: 8253.h: use CMDF_ROUND_...

Replace use of the `TRIG_ROUND_...` macros with the new names
`CMDF_ROUND_...`.  The numeric values are unchanged.

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>
10 years agostaging: comedi: add CMDF_ROUND_... as synonyms for TRIG_ROUND_...
Ian Abbott [Wed, 3 Sep 2014 12:45:45 +0000 (13:45 +0100)]
staging: comedi: add CMDF_ROUND_... as synonyms for TRIG_ROUND_...

The `TRIG_ROUND_...` macros are some of the values that can be OR-ed
into the `flags` member of `struct comedi_cmd`.  They may influence the
rounding of sample timings during operation of the asynchronous command.

The names are a bit of a left-over from earlier times.  It would be
better to use the names `CMDF_ROUND_...` to match various other command
flags.

Define `CMDF_ROUND_MASK`, `CMDF_ROUND_NEAREST`, `CMDF_ROUND_DOWN`,
`CMDF_ROUND_UP` and `CMDF_ROUND_UP_NEXT` with the same numeric values as
`TRIG_ROUND_MASK`, `TRIG_ROUND_NEAREST`, `TRIG_ROUND_DOWN`,
`TRIG_ROUND_UP` and `TRIG_ROUND_UP_NEXT`, and redefine the
`TRIG_ROUND_...` macros as synonyms of the `CMDF_ROUND_...` macros.

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>