linux-2.6-block.git
11 years agostaging: csr: csr_wifi_hip_unifi_signal_names: fix whitespaced paddings
Hojung Youn [Fri, 2 Nov 2012 21:10:19 +0000 (06:10 +0900)]
staging: csr: csr_wifi_hip_unifi_signal_names: fix whitespaced paddings

Fixed whitespace paddings in the csr_wifi_hip_unifi_signal_names.c file
that were, though, not identified by checkpatch.pl tool.

Signed-off-by: Hojung Youn <amoc.yn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: csr_wifi_hip_unifi_signal_names: fix brackets
Hojung Youn [Fri, 2 Nov 2012 21:10:18 +0000 (06:10 +0900)]
staging: csr: csr_wifi_hip_unifi_signal_names: fix brackets

Fixed brackets' positions in the csr_wifi_hip_unifi_signal_names.c file
that were identified by checkpatch.pl tool.  Some brackets are removed
which are not needed by the rule of CodingStyle documentation.

Signed-off-by: Hojung Youn <amoc.yn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: csr_wifi_hip_unifi_signal_names: fix indent
Hojung Youn [Fri, 2 Nov 2012 21:10:17 +0000 (06:10 +0900)]
staging: csr: csr_wifi_hip_unifi_signal_names: fix indent

Fixed indent style  in the csr_wifi_hip_unifi_signal_names.c
file that were identified by checkpatch.pl tool. All whitespaced
indents are converted into tab characters,  except ones in the
topmost commentation.

Signed-off-by: Hojung Youn <amoc.yn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove unnecessary include
H Hartley Sweeten [Mon, 5 Nov 2012 21:42:25 +0000 (14:42 -0700)]
staging: comedi: addi_apci_1032: remove unnecessary include

The header amcc_s5933.h is not needed. Remove the include.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove len_chanlist on di subdevice
H Hartley Sweeten [Mon, 5 Nov 2012 21:42:09 +0000 (14:42 -0700)]
staging: comedi: addi_apci_1032: remove len_chanlist on di subdevice

This value is only needed for subdevices that support async commands.
The comedi core will default the value to 1 when it is not initialized.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: hook-up the interrupt subdevice
H Hartley Sweeten [Mon, 5 Nov 2012 21:41:52 +0000 (14:41 -0700)]
staging: comedi: addi_apci_1032: hook-up the interrupt subdevice

The board supported by this driver can generate an interrupt based
on the state of input channels 0-15.

The apci1032_intr_insn_config() function is used to configure which
inputs are used to generate the interrupt. Currently this function
is broken since it does not follow the comedi API for insn_config
functions. Fix this function by implementing the, currently unused,
config instruction INSN_CONFIG_DIGITAL_TRIG.

Add the remaining subdevice operations necessary for the interrupt
subdevice to support async commands.

Fix the subdevice initialization so that if the interrupt is not
available the subdevice is set as COMEDI_SUBD_UNUSED.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove send_sig() use
H Hartley Sweeten [Mon, 5 Nov 2012 21:41:36 +0000 (14:41 -0700)]
staging: comedi: addi_apci_1032: remove send_sig() use

The addi-data drivers use send_sig() to let the user know when an
interrupt has occurred. The "standard" way to do this in the comedi
subsystem is to have a subdevice that supports asynchronous commands
and use comedi_event() to signal the user.

Remove the send_sig() usage in this driver. This also allows removing
the dev->private usage since tsk_Current was the only member still
being used in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: add a subdevice for the interrupt support
H Hartley Sweeten [Mon, 5 Nov 2012 21:41:13 +0000 (14:41 -0700)]
staging: comedi: addi_apci_1032: add a subdevice for the interrupt support

This board supports a single interrupt that can be generated by an AND/OR
combination of 16 of the input channels.

Create a separate subdevice, similar to the comedi_parport driver, to
handle this interrupt.

Move the i_APCI1032_ConfigDigitalInput() operation from the digital
input subdevice to this new subdevice. Rename the CamelCase function
to apci1032_intr_insn_config().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: merge in hwdrv_apci1032.c
H Hartley Sweeten [Mon, 5 Nov 2012 21:40:50 +0000 (14:40 -0700)]
staging: comedi: addi_apci_1032: merge in hwdrv_apci1032.c

Merge the remaining code from hwdrv_apci1032.c into the driver and
delete the now unused file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: cleanup v_ADDI_Interrupt()
H Hartley Sweeten [Mon, 5 Nov 2012 21:40:34 +0000 (14:40 -0700)]
staging: comedi: addi_apci_1032: cleanup v_ADDI_Interrupt()

There is no need for this function to call v_APCI1032_Interrupt()
in hwdrv_apci1032.c to reset the board. Just move the code from
v_APCI1032_Interrupt() directly into this function.

Rename the CamelCase function to apci1032_interrupt().

Rename the CamelCase local variable used to read/write the control
register.

Change the return from IRQ_RETVAL(1) to IRQ_HANDLED.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: only allocate one subdevice
H Hartley Sweeten [Mon, 5 Nov 2012 21:40:18 +0000 (14:40 -0700)]
staging: comedi: addi_apci_1032: only allocate one subdevice

There is only one subdevice used in the driver. Remove the unused
subdevice init and only allcoate space for the one used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: cleanup i_APCI1032_ReadMoreDigitalInput()
H Hartley Sweeten [Mon, 5 Nov 2012 21:40:02 +0000 (14:40 -0700)]
staging: comedi: addi_apci_1032: cleanup i_APCI1032_ReadMoreDigitalInput()

Move this function from hwdrv_apci1032.c.

Remove the unnecessary comment and rename the CamelCase function to
apci1032_di_insn_bits().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove i_APCI1032_Read1DigitalInput()
H Hartley Sweeten [Mon, 5 Nov 2012 21:39:46 +0000 (14:39 -0700)]
staging: comedi: addi_apci_1032: remove i_APCI1032_Read1DigitalInput()

This function is the insn_read operation for the digital input subdevice.
This operation can be emulated by the comedi core now that the insn_bits
operation follows the comedi API. Remove this now unnecessary function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: fix i_APCI1032_ReadMoreDigitalInput()
H Hartley Sweeten [Mon, 5 Nov 2012 21:39:30 +0000 (14:39 -0700)]
staging: comedi: addi_apci_1032: fix i_APCI1032_ReadMoreDigitalInput()

This function is the insn_bits operation for the digital input subdevice.
According to the comedi API it's supposed return the status of the inputs
in data[1]. The addi-drivers abuse the API and try to make it conform to
their own use.

Fix this function so it follows the comedi API.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: cleanup i_APCI1032_Reset()
H Hartley Sweeten [Mon, 5 Nov 2012 21:39:12 +0000 (14:39 -0700)]
staging: comedi: addi_apci_1032: cleanup i_APCI1032_Reset()

Move this function from hwdrv_apci1032.c.

Remove the unnecessary comment and rename the CamelCase function to
apci1032_reset().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: cleanup the register map defines
H Hartley Sweeten [Mon, 5 Nov 2012 21:38:56 +0000 (14:38 -0700)]
staging: comedi: addi_apci_1032: cleanup the register map defines

For aesthetic reasons, rename the defines used for the register map
so they are a bit shorter.

Define, and use, the bits in the interrupt control register.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove the boardinfo
H Hartley Sweeten [Mon, 5 Nov 2012 21:38:41 +0000 (14:38 -0700)]
staging: comedi: addi_apci_1032: remove the boardinfo

This driver supports only one boardtype. Since this driver uses the
comedi auto attach mechanism, the information left in the boaridnfo
is not required to attach this driver to the comedi subsystem.

Remove the boardinfo data and its use in the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: call v_APCI1032_Interrupt() directly
H Hartley Sweeten [Mon, 5 Nov 2012 21:38:26 +0000 (14:38 -0700)]
staging: comedi: addi_apci_1032: call v_APCI1032_Interrupt() directly

Remove the boardinfo about the 'interrupt' function and just call
it directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove unnecessary eeprom code
H Hartley Sweeten [Mon, 5 Nov 2012 21:38:11 +0000 (14:38 -0700)]
staging: comedi: addi_apci_1032: remove unnecessary eeprom code

Now that this driver is separate from the "common" addi-data code,
the eeprom does not contain any information required to make this
driver work.

Remove the unneeded initalization of the 's_EeParameters' and the
code that reads the eeprom to fill in the parameters.

Also, since reading the eeprom is not really interesting, remove
the EEPROM subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove i_IobaseReserved
H Hartley Sweeten [Mon, 5 Nov 2012 21:37:56 +0000 (14:37 -0700)]
staging: comedi: addi_apci_1032: remove i_IobaseReserved

PCI bar 3 is not used by this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove use of devpriv->iobase
H Hartley Sweeten [Mon, 5 Nov 2012 21:37:40 +0000 (14:37 -0700)]
staging: comedi: addi_apci_1032: remove use of devpriv->iobase

Currently, devpriv->iobase is used to hold the PCI bar 2 base address
used to read/write the registers on the board. The same information
is stored in the comedi_device dev->iobase. Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove i_IorangeBase[01]
H Hartley Sweeten [Mon, 5 Nov 2012 21:37:24 +0000 (14:37 -0700)]
staging: comedi: addi_apci_1032: remove i_IorangeBase[01]

This boardinfo is no longer required by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove dw_AiBase
H Hartley Sweeten [Mon, 5 Nov 2012 21:37:08 +0000 (14:37 -0700)]
staging: comedi: addi_apci_1032: remove dw_AiBase

This board does not use the ioremap'ed PCI bar 3 memory address.
Remove the ioremap and iounmap of that region.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: simplify the PCI bar reading
H Hartley Sweeten [Mon, 5 Nov 2012 21:36:53 +0000 (14:36 -0700)]
staging: comedi: addi_apci_1032: simplify the PCI bar reading

This board has a 93c76 eeprom. Knowing this information allows
simplifying the code that reads the PCI bars to get the iobase
addresses used in the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: board has 32 digital inputs
H Hartley Sweeten [Mon, 5 Nov 2012 21:36:27 +0000 (14:36 -0700)]
staging: comedi: addi_apci_1032: board has 32 digital inputs

This board always has 32 digital inputs. Remove the test when
initializing the subdevice.

Also, since this board is the only one supported by this driver,
remove the boardinfo about the digital inputs and just use the
data directly in the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: board does not have analog outputs
H Hartley Sweeten [Mon, 5 Nov 2012 21:36:09 +0000 (14:36 -0700)]
staging: comedi: addi_apci_1032: board does not have analog outputs

This board does not have analog outputs. Remove the subdevice init for
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: board does not have analog inputs
H Hartley Sweeten [Mon, 5 Nov 2012 21:35:52 +0000 (14:35 -0700)]
staging: comedi: addi_apci_1032: board does not have analog inputs

This board does not have analog inputs. Remove the subdevice init for
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: board does not have digital outputs
H Hartley Sweeten [Mon, 5 Nov 2012 21:35:30 +0000 (14:35 -0700)]
staging: comedi: addi_apci_1032: board does not have digital outputs

This board does not have digital outputs. Remove the subdevice init for
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: board does not have a timer
H Hartley Sweeten [Mon, 5 Nov 2012 21:35:13 +0000 (14:35 -0700)]
staging: comedi: addi_apci_1032: board does not have a timer

This board does not have a timer. Remove the subdevice init for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: board does not have ttl i/o
H Hartley Sweeten [Mon, 5 Nov 2012 21:34:57 +0000 (14:34 -0700)]
staging: comedi: addi_apci_1032: board does not have ttl i/o

This board does not have ttl i/o. Remove the subdevice init for
it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: remove i_ADDI_Reset()
H Hartley Sweeten [Mon, 5 Nov 2012 21:34:40 +0000 (14:34 -0700)]
staging: comedi: addi_apci_1032: remove i_ADDI_Reset()

This driver is now separate from the "common" code used with the
addi-data drivers. There is no need to use i_ADDI_Reset() to call
the correct "reset" function.

Remove the i_ADDI_Reset() function and the 'reset' pointer to the
real function from the boardinfo and just call the function directly
where needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1032: separate from addi_common.c
H Hartley Sweeten [Mon, 5 Nov 2012 21:34:23 +0000 (14:34 -0700)]
staging: comedi: addi_apci_1032: separate from addi_common.c

The addi_apci_1032 driver is a simple digital input board with 32
optically isolated inputs. Using the addi-data "common" code introduces
a lot of bloat.

Copy the code in addi_common.c to this driver and remove the #include
that caused addi_common.c to be compiled with this driver. This will
allow removing the special handling for allocating and freeing the
dma buffers in the common code.

Rename the attach_pci and detach functions so they have namespace
associated with this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: update driver comment
Ian Abbott [Fri, 2 Nov 2012 19:18:06 +0000 (19:18 +0000)]
staging: comedi: cb_pcidas64: update driver comment

Update the comedi driver comment to reflect the fact that manual
attachment of devices is no longer supported.  Also replace the request
to file a bug report about unidentified PCI device IDs with a request to
let the maintainers know about such devices.

Reformat the comment using the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: fix forward declararions 4
Ian Abbott [Fri, 2 Nov 2012 19:18:05 +0000 (19:18 +0000)]
staging: comedi: cb_pcidas64: fix forward declararions 4

Move `disable_plx_interrupts()`, `disable_ai_interrupts()`,
`enable_ai_interrupts()`, `set_ai_fifo_segment_length()`,
`set_ai_fifo_size()`, `ai_fifo_size()`, `load_ao_dma_buffer()`, and
`load_ao_dma()`, and remove forward declarations of these functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: fix forward declarations 3
Ian Abbott [Fri, 2 Nov 2012 19:18:04 +0000 (19:18 +0000)]
staging: comedi: cb_pcidas64: fix forward declarations 3

Move `abort_dma()`, `disable_ai_pacing()`, `i2c_high_udelay`,
`i2c_low_udelay`, `i2c_set_sda()`, `i2c_set_scl()`, `i2c_write_byte()`,
`i2c_read_ack()`, `i2c_start()`, `i2c_stop()`, `i2c_write()`,
`get_divisor()`, `check_adc_timing()`, `disable_ai_pacing()`,
`abort_dma()`, `get_ao_divisor()`, `ao_inttrig()`,
`caldac_8800_write()`, `caldac_i2c_write()`, `check_adc_timing()`,
`get_divisor()`, and `get_ao_divisor()`, and remove their forward
declarations.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: fix forward declarations 2
Ian Abbott [Fri, 2 Nov 2012 19:18:03 +0000 (19:18 +0000)]
staging: comedi: cb_pcidas64: fix forward declarations 2

Move `cb_pcidas64_find_pci_board()`, `auto_attach()` and `detach()` and
remove the forward declaration of `setup_subdevices()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: fix forward declarations 1
Ian Abbott [Fri, 2 Nov 2012 19:18:02 +0000 (19:18 +0000)]
staging: comedi: cb_pcidas64: fix forward declarations 1

Move `setup_subdevices()` and remove a load of forward declarations.
Added a forward declaration of `setup_subdevices()` temporarily.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: remove board(dev) inline
Ian Abbott [Fri, 2 Nov 2012 19:18:01 +0000 (19:18 +0000)]
staging: comedi: cb_pcidas64: remove board(dev) inline

The `board(dev)` inline function returns `dev->board_ptr` cast from
`const void *` to `struct pcidas64_board *`.  It really ought to return
a `const struct pcidas64_board *`.  Rather than fix the function, just
remove it and replace the calls with a local variable `thisboard` in the
functions that call it.  `thisboard` is set to the result of the common
inline function `comedi_board(dev)` defined in "comedidev.h".

Fix a little resulting fall-out from the inline function
`ai_dma_ring_count(board)` whose parameter should have been a const
pointer.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedidev.h: make comedi_board() parameter const
Ian Abbott [Fri, 2 Nov 2012 19:18:00 +0000 (19:18 +0000)]
staging: comedi: comedidev.h: make comedi_board() parameter const

The inline function `comedi_board(dev)` merely returns `dev->board_ptr`.
It does not modify any members of `*dev` so make its parameter a const
pointer.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: whitespace/brace changes
Ian Abbott [Fri, 2 Nov 2012 19:17:59 +0000 (19:17 +0000)]
staging: comedi: cb_pcidas64: whitespace/brace changes

Some whitespace changes, mostly to fix lines > 80 characters and
operator placement.  Add/remove some braces according to CodingStyle.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: fix printks
Ian Abbott [Fri, 2 Nov 2012 19:17:58 +0000 (19:17 +0000)]
staging: comedi: cb_pcidas64: fix printks

Replace `printk` calls with something else.  For the `DEBUG_PRINT()`
macro, use `pr_debug()` (if `PCIDAS64_DEBUG macro defined) or
`no_printk()`.

Fix a few `DEBUG_PRINT()` calls due to compiler warnings and add
newlines where they are missing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas64: use auto_attach method
Ian Abbott [Fri, 2 Nov 2012 19:17:57 +0000 (19:17 +0000)]
staging: comedi: cb_pcidas64: use auto_attach method

This driver does not need to support manual attachment of supported PCI
devices.  Replace the `attach()` hook with an `auto_attach()` hook.
This will be called via `comedi_pci_auto_config()` at PCI probe time.

The `auto_attach()` calls new function `cb_pcidas64_find_pci_board()` to
find the correct entry in `pcidas64_boards[]` for the PCI device.

This driver no longer increments the PCI reference count during
attachment, so remove the call to `pci_dev_put()` when detaching the
device.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci9118: support auto-attachment
Ian Abbott [Fri, 2 Nov 2012 13:52:32 +0000 (13:52 +0000)]
staging: comedi: adl_pci9118: support auto-attachment

Support auto-attachment of supported PCI devices by adding the
`auto_attach()` hook (`pci9118_auto_attach()`) to the `struct
comedi_driver`.  This is called via `comedi_pci_auto_attach()` at PCI
probe time.

Previously, the driver's call to `comedi_pci_auto_config()` would fall
back to the old method of auto-attaching devices and would fail because
it couldn't find a board name matching the driver name.  The new method
doesn't care about that.

There are still a few problems.  All the boards supported by this driver
have the same PCI vendor and device ID, so it will just pick the first
supported board type, "pci9118dg".  (Other supported board types have
different AI ranges or different AI speeds, but are otherwise the same.)
Also, manual attachment of devices allows several optional features to
be configured, such as use of an external multiplexord, specified
sample&hold delays and options to ignore certain hardware errors.  These
will all be set to defaults for auto-attached devices.  A future version
of the driver may address these issues via configurable device
attributes.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci9118: cards have same vendor ID
Ian Abbott [Fri, 2 Nov 2012 13:52:31 +0000 (13:52 +0000)]
staging: comedi: adl_pci9118: cards have same vendor ID

Don't bother recording the PCI vendor ID of each board in `boardtypes[]`
as they are all the same and the code doesn't use it anyway.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci9118: split pci9118_attach()
Ian Abbott [Fri, 2 Nov 2012 13:52:30 +0000 (13:52 +0000)]
staging: comedi: adl_pci9118: split pci9118_attach()

Split most of the functionality of the attach routine `pci9118_attach()`
into a new function `pci9118_common_attach()` that can be called when
auto-attachment of devices is supported.  Move the enabling of the PCI
device and its i/o regions into this function.  Do the requesting of the
interrupt near the end of the function so it doesn't get enabled before
the device is ready.

Note that auto-attachment of PCI devices is currently broken in this
driver because the list of board names referred to by the `struct
comedi_driver` does not contain a "wildcard" entry matching the comedi
driver name.  This won't be a problem once support for the
`auto_attach()` method is added.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci9118: replace printks
Ian Abbott [Fri, 2 Nov 2012 13:52:29 +0000 (13:52 +0000)]
staging: comedi: adl_pci9118: replace printks

Replace or remove the `printk()` calls in this driver.  Call new function
`pci9118_report_attach()` to report successful attachment of the board.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Change ULONG to unsigned long in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:28 +0000 (23:42 -0400)]
Staging: bcm: Change ULONG to unsigned long in InterfaceAdapter.h

This patch changes ULONG to unsigned long
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef for _BULK_ENDP_IN and call directly.
Kevin McKinney [Fri, 2 Nov 2012 03:42:27 +0000 (23:42 -0400)]
Staging: bcm: Remove typedef for _BULK_ENDP_IN and call directly.

This patch removes typedef for
_BULK_ENDP_IN, changes the name of the
struct to bcm_bulk_endpoint_in. In addition,
any calls to typedefs BULK_ENDP_IN, or
*PBULK_ENDP_IN are changed to call the
struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef for _BULK_ENDP_OUT and call directly.
Kevin McKinney [Fri, 2 Nov 2012 03:42:26 +0000 (23:42 -0400)]
Staging: bcm: Remove typedef for _BULK_ENDP_OUT and call directly.

This patch removes typedef for
_BULK_ENDP_OUT, changes the name of the
struct to bcm_bulk_endpoint_out. In addition,
any calls to typedefs BULK_ENDP_OUT, or
*PBULK_ENDP_OUT are changed to call the
struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef for _INTR_ENDP_IN and call directly.
Kevin McKinney [Fri, 2 Nov 2012 03:42:25 +0000 (23:42 -0400)]
Staging: bcm: Remove typedef for _INTR_ENDP_IN and call directly.

This patch removes typedef for
_INTR_ENDP_IN, changes the name of the
struct to bcm_intr_endpoint_in. In addition,
any calls to typedefs INTR_ENDP_IN, or
*PINTR_ENDP_IN are changed to call the
struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef for _INTR_ENDP_OUT and call directly.
Kevin McKinney [Fri, 2 Nov 2012 03:42:24 +0000 (23:42 -0400)]
Staging: bcm: Remove typedef for _INTR_ENDP_OUT and call directly.

This patch removes typedef for
_INTR_ENDP_OUT, changes the name of the
struct to bcm_intr_endpoint_out. In addition,
any calls to typedefs INTR_ENDP_OUT, or
*PINTR_ENDP_OUT are changed to call the
struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef for _USB_TCB and call directly.
Kevin McKinney [Fri, 2 Nov 2012 03:42:23 +0000 (23:42 -0400)]
Staging: bcm: Remove typedef for _USB_TCB and call directly.

This patch removes typedef for
_USB_TCB, changes the name of the
struct to bcm_usb_tcb. In addition,
any calls to typedefs USB_TCB, or
*PUSB_TCB are changed to call the
struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef for _USB_RCB and call directly.
Kevin McKinney [Fri, 2 Nov 2012 03:42:22 +0000 (23:42 -0400)]
Staging: bcm: Remove typedef for _USB_RCB and call directly.

This patch removes typedef for
_USB_RCB, changes the name of the
struct to bcm_usb_rcb. In addition,
any calls to typedefs USB_RCB, or
*PUSB_RCB are changed to call the
struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef for _S_INTERFACE_ADAPTER and call directly.
Kevin McKinney [Fri, 2 Nov 2012 03:42:21 +0000 (23:42 -0400)]
Staging: bcm: Remove typedef for _S_INTERFACE_ADAPTER and call directly.

This patch removes typedef for
_S_INTERFACE_ADAPTER, changes the
name of the struct to bcm_interface_adapter.
In addition, any calls to typedefs
S_INTERFACE_ADAPTER, or *PS_INTERFACE_ADAPTER
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Change BOOLEAN to bool in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:20 +0000 (23:42 -0400)]
Staging: bcm: Change BOOLEAN to bool in InterfaceAdapter.h

This patch changes BOOLEAN to bool
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Change PVOID to void * in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:19 +0000 (23:42 -0400)]
Staging: bcm: Change PVOID to void * in InterfaceAdapter.h

This patch changes PVOID to void *
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Change UINT to unsigned int in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:18 +0000 (23:42 -0400)]
Staging: bcm: Change UINT to unsigned int in InterfaceAdapter.h

This patch changes UINT to unsigned int
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Change UCHAR to unsigned char in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:17 +0000 (23:42 -0400)]
Staging: bcm: Change UCHAR to unsigned char in InterfaceAdapter.h

This patch changes UCHAR to unsigned char
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Change PCHAR to char * in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:16 +0000 (23:42 -0400)]
Staging: bcm: Change PCHAR to char * in InterfaceAdapter.h

This patch changes PCHAR to char *
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Correctly format braces in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:15 +0000 (23:42 -0400)]
Staging: bcm: Correctly format braces in InterfaceAdapter.h

This patch correctly formats braces
in InterfaceAdapter.h as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Correctly format comments in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:14 +0000 (23:42 -0400)]
Staging: bcm: Correctly format comments in InterfaceAdapter.h

This patch correctly formats comments
in InterfaceAdapter.h as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Fix all white space issues in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:13 +0000 (23:42 -0400)]
Staging: bcm: Fix all white space issues in InterfaceAdapter.h

This patch fixes all white space issues
in InterfaceAdapter.h as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi: Use dev_ printks in ni_tiocmd.c
YAMANE Toshiaki [Fri, 2 Nov 2012 04:55:48 +0000 (13:55 +0900)]
staging/comedi: Use dev_ printks in ni_tiocmd.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
- WARNING: Prefer netdev_notice(netdev, ... then dev_notice(dev, ... then pr_notice(...  to printk(KERN_NOTICE ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: wlan-ng: hfa384x_usb.c: fixed a coding style issue
Kumar Amit Mehta [Fri, 2 Nov 2012 09:19:45 +0000 (02:19 -0700)]
staging: wlan-ng: hfa384x_usb.c: fixed a coding style issue

checkpatch.pl throws error message for the current code. This patch fixes
coding style issue.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Align ring_index and fbr[] indicies
Mark Einon [Thu, 1 Nov 2012 22:56:43 +0000 (22:56 +0000)]
staging: et131x: Align ring_index and fbr[] indicies

A ring_index value of 0 is being used to reference the free buffer ring
fbr[1] and ring_index=1 is used to reference fbr[0]. Avoid this
confusing referencing by swapping the indicies so that ring_index=0
refers to fbr[0] and vice versa.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Remove unused buffer[1,2] variables.
Mark Einon [Thu, 1 Nov 2012 22:56:42 +0000 (22:56 +0000)]
staging: et131x: Remove unused buffer[1,2] variables.

The fbr_lookup struct variables buffer1 and buffer2 are only assigned
and never used, so remove them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: cleanup addi_find_boardinfo()
H Hartley Sweeten [Fri, 2 Nov 2012 00:31:10 +0000 (17:31 -0700)]
staging: comedi: addi_apci_3120: cleanup addi_find_boardinfo()

This driver uses the comedi PCI auto attach mechanism and the comedi
core does not use the boardinfo during the attach.

Now that this driver has the attach separated from addi_common.c we
can remove passing the boardinfo in the comedi_driver and cleanup
the code that finds the boardinfo.

Also, rename addi_find_boardinfo() so it has namespace associated
with this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove COMEDI_SUBD_TTLIO define
H Hartley Sweeten [Fri, 2 Nov 2012 00:30:53 +0000 (17:30 -0700)]
staging: comedi: addi_apci_3120: remove COMEDI_SUBD_TTLIO define

This define is not used by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: cleanup apci3120_detach()
H Hartley Sweeten [Fri, 2 Nov 2012 00:30:37 +0000 (17:30 -0700)]
staging: comedi: addi_apci_3120: cleanup apci3120_detach()

This driver always tried to allocate the dma buffers so they need to
be free'd when the board is detached.

Remove the unneeded tests for the eeprom chip and bring the code
back an indent.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: clarify AO subdevice init
H Hartley Sweeten [Fri, 2 Nov 2012 00:30:17 +0000 (17:30 -0700)]
staging: comedi: addi_apci_3120: clarify AO subdevice init

Only the apci3120 board supports an analog output subdevice. The
boardinfo indicates this by setting the 'i_NbrAoChannel' value.

The range table as well as the function used for the insn_write
operation are fixed for the analog outputs. Remove this information
from the boardinfo and use it directly in the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove 'b_AvailableConvertUnit'
H Hartley Sweeten [Fri, 2 Nov 2012 00:30:02 +0000 (17:30 -0700)]
staging: comedi: addi_apci_3120: remove 'b_AvailableConvertUnit'

This boardinfo value is not used by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove 'ui_MinDelaytimeNs'
H Hartley Sweeten [Fri, 2 Nov 2012 00:29:46 +0000 (17:29 -0700)]
staging: comedi: addi_apci_3120: remove 'ui_MinDelaytimeNs'

Both boards supported by this driver have the same minimum delay time.
Remove the boardinfo for it and just open code the value in
i_APCI3120_CommandTestAnalogInput().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove 'ui_MinAcquisitiontimeNs'
H Hartley Sweeten [Fri, 2 Nov 2012 00:29:30 +0000 (17:29 -0700)]
staging: comedi: addi_apci_3120: remove 'ui_MinAcquisitiontimeNs'

Both boards supported by this driver have the same minimum acquisition
time.. Remove the boardinfo for it and just open code the value in
i_APCI3120_CommandTestAnalogInput().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove 'pr_AiRangelist'
H Hartley Sweeten [Fri, 2 Nov 2012 00:29:13 +0000 (17:29 -0700)]
staging: comedi: addi_apci_3120: remove 'pr_AiRangelist'

Both boards supported by this driver have the same analog input
ranges. Remove the boardinfo for it and just init the subdevice
directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove the 'i_IorangeBase*'
H Hartley Sweeten [Fri, 2 Nov 2012 00:28:57 +0000 (17:28 -0700)]
staging: comedi: addi_apci_3120: remove the 'i_IorangeBase*'

These values in the boardinfor were used in the common addi-data
attach code to work out use of the PCI bars. Since this driver
has a localized attach we already know the use of the bars so
this information in the boardinfo is unnecessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: fix the number of subdevices
H Hartley Sweeten [Fri, 2 Nov 2012 00:28:41 +0000 (17:28 -0700)]
staging: comedi: addi_apci_3120: fix the number of subdevices

The addi-data "common" code always allocates 7 subdevices. This
driver is now separate from that code so we can remove the unused
subdevices.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove i_ADDI_Reset()
H Hartley Sweeten [Fri, 2 Nov 2012 00:28:24 +0000 (17:28 -0700)]
staging: comedi: addi_apci_3120: remove i_ADDI_Reset()

This driver is now separate from the "common" code used with the
addi-data drivers. There is no need to use i_ADDI_Reset() to call
the correct "reset" function.

Remove the i_ADDI_Reset() function and the 'reset' pointer to the
real function from the boardinfo and just call the function directly
where needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: clarify AI subdevice init
H Hartley Sweeten [Fri, 2 Nov 2012 00:28:11 +0000 (17:28 -0700)]
staging: comedi: addi_apci_3120: clarify AI subdevice init

The two boards supported by this driver use the same functions for
the comedi operations. Remove this data from the boardinfo to clarify
the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoThe two boards supported by this driver use the same functions for
H Hartley Sweeten [Fri, 2 Nov 2012 00:27:47 +0000 (17:27 -0700)]
The two boards supported by this driver use the same functions for
the comedi operations. Remove this data from the boardinfo to clarify
the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: clarify DO subdevice init
H Hartley Sweeten [Fri, 2 Nov 2012 00:27:33 +0000 (17:27 -0700)]
staging: comedi: addi_apci_3120: clarify DO subdevice init

The two boards supported by this driver use the same functions for
the comedi operations. Remove this data from the boardinfo to clarify
the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: clarify timer subdevice init
H Hartley Sweeten [Fri, 2 Nov 2012 00:27:18 +0000 (17:27 -0700)]
staging: comedi: addi_apci_3120: clarify timer subdevice init

The two boards supported by this driver use the same functions for
the comedi operations. Remove this data from the boardinfo to clarify
the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove test for AI subdevice
H Hartley Sweeten [Fri, 2 Nov 2012 00:27:03 +0000 (17:27 -0700)]
staging: comedi: addi_apci_3120: remove test for AI subdevice

The boards supported by this driver all have analog inputs.
Remove the test for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove test for DI subdevice
H Hartley Sweeten [Fri, 2 Nov 2012 00:26:45 +0000 (17:26 -0700)]
staging: comedi: addi_apci_3120: remove test for DI subdevice

The boards supported by this driver all have digital inputs.
Remove the test for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove test for DO subdevice
H Hartley Sweeten [Fri, 2 Nov 2012 00:26:31 +0000 (17:26 -0700)]
staging: comedi: addi_apci_3120: remove test for DO subdevice

The boards supported by this driver all have digital outputs.
Remove the test for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove test for timer support
H Hartley Sweeten [Fri, 2 Nov 2012 00:26:16 +0000 (17:26 -0700)]
staging: comedi: addi_apci_3120: remove test for timer support

The boards supported by this driver support a timer subdevice.
Remove the tests for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove test for dma support
H Hartley Sweeten [Fri, 2 Nov 2012 00:26:00 +0000 (17:26 -0700)]
staging: comedi: addi_apci_3120: remove test for dma support

The boards supported by this driver support dma. Remove the tests
for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove need for s_EeParameters
H Hartley Sweeten [Fri, 2 Nov 2012 00:25:44 +0000 (17:25 -0700)]
staging: comedi: addi_apci_3120: remove need for s_EeParameters

The boards supported by this driver do not have an eeprom. Remove the
need for the devpriv->s_EeParameters values by just using the values
from the boardinfo directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: board does not have ttl i/o
H Hartley Sweeten [Fri, 2 Nov 2012 00:25:27 +0000 (17:25 -0700)]
staging: comedi: addi_apci_3120: board does not have ttl i/o

The boards supported by this driver do not have ttl i/o. Remove
the unnecessary code to initialize the subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove eeprom handling code
H Hartley Sweeten [Fri, 2 Nov 2012 00:25:11 +0000 (17:25 -0700)]
staging: comedi: addi_apci_3120: remove eeprom handling code

The boards supported by this driver do not have an eeprom. Remove
the unnecessary code to handle it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_common: remove dma setup/free code
H Hartley Sweeten [Fri, 2 Nov 2012 00:24:55 +0000 (17:24 -0700)]
staging: comedi: addi_common: remove dma setup/free code

None of the addi-data drivers that use the "common" code in addi_common.c
support dma. Remove the code that sets up the dma and allocates the buffers
in the attach and the code that frees the buffers in the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: separate from addi_common.c
H Hartley Sweeten [Fri, 2 Nov 2012 00:24:38 +0000 (17:24 -0700)]
staging: comedi: addi_apci_3120: separate from addi_common.c

The addi_apci_3120 driver is the only addi-data driver that supports
dma.

Copy the code in addi_common.c to this driver and remove the #include
that caused addi_common.c to be compiled with this driver. This will
allow removing the special handling for allocating and freeing the
dma buffers in the common code.

Rename the attach_pci and detach functions so they have namespace
associated with this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: remove CONFIG_APCI_3120 define
H Hartley Sweeten [Fri, 2 Nov 2012 00:24:22 +0000 (17:24 -0700)]
staging: comedi: addi_apci_3120: remove CONFIG_APCI_3120 define

Now that the apci3001 and apci3120 boards are merged we can remove
this unnecessary define.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: merge in addi_apci_3001 driver
H Hartley Sweeten [Fri, 2 Nov 2012 00:24:06 +0000 (17:24 -0700)]
staging: comedi: addi_apci_3120: merge in addi_apci_3001 driver

The addi_apci_3120 and addi_apci_3001 drivers share the same low-level
board support code (hwdrv_apci3120). Merge the boardinfo and PCI_DEVICE
information from the addi_apci_3001 driver into the addi_apci_3120
driver and delete then delete the addi_apci_3001 driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge tag 'iio-for-3.8b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
Greg Kroah-Hartman [Fri, 2 Nov 2012 16:27:30 +0000 (09:27 -0700)]
Merge tag 'iio-for-3.8b' of git://git./linux/kernel/git/jic23/iio into staging-next

Second round of new IIO drivers and cleanups for the 3.8 cycle.

Usual mixed bag of cleanups and minor improvements including
one reversion for a patch in the previous series.

* adt7310 and adt7410 drivers merged into one.
* Revert use devm_kcalloc in at91_adc (because it doesn't exist)
* unlocking fix for error path in the ad5449
* isl29018 suspend and resume support.
* improved pseudo floating point parsing for info_mask write
attributes (and hence into write_raw).  Reject some messed up
strings.

11 years agoiio: isl29018: Support suspend and resume.
Bryan Freed [Wed, 24 Oct 2012 23:39:00 +0000 (00:39 +0100)]
iio: isl29018: Support suspend and resume.

The driver leaves the device in power-down state anyway,
so there is nothing to do on suspend.
On resume, we just have to make sure the range and ADC
values are updated in the device since it may have been
powered down in suspend.

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Accept a leading '+' sign when parsing fixed point numbers
Lars-Peter Clausen [Mon, 22 Oct 2012 11:15:00 +0000 (12:15 +0100)]
iio: Accept a leading '+' sign when parsing fixed point numbers

If we encounter a leading '+' sign just skip over it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Reject trailing garbage when parsing fixed point numbers
Lars-Peter Clausen [Mon, 22 Oct 2012 11:15:00 +0000 (12:15 +0100)]
iio: Reject trailing garbage when parsing fixed point numbers

When parsing a fixed point number IIO stops parsing the string once it has
reached the last requested decimal place. This means that the remainder of the
string is silently accepted regardless, of whether it is part of a valid number
or not. This patch modifies the code to scan the whole string and only accept
valid numbers. Since fract_mult is 0 after the last decimal place any digit that
may follows won't affect the result.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Do not accept multiple '.' in fixed point numbers
Lars-Peter Clausen [Mon, 22 Oct 2012 11:15:00 +0000 (12:15 +0100)]
iio: Do not accept multiple '.' in fixed point numbers

Currently when parsing a fix-point number we silently skip any additional '.'
found in the string.  E.g. '1.2.3.4' gets parsed as '1.234'. This patch
disallows this and returns an error if more than one '.' is encountered.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: iio: adc: ad7280a.c: fixed macro coding style
Kumar Amit Mehta [Fri, 2 Nov 2012 07:28:00 +0000 (07:28 +0000)]
staging: iio: adc: ad7280a.c: fixed macro coding style

remove unnecessary semicolon from the macro definition

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: comedi: jr3_pci: CodingStyle fixes
Ian Abbott [Thu, 1 Nov 2012 18:34:41 +0000 (18:34 +0000)]
staging: comedi: jr3_pci: CodingStyle fixes

Follow coding style for whitespace, operator placement, use of braces,
etc.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>