summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-26staging: comedi: adv_pci1724: rename ao_ranges_1724H Hartley Sweeten
For aesthetics, rename the analog output comedi_lrange table so it has namespace associated with 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>
2014-11-26staging: comedi: adv_pci1724: tidy up multi-line commentsH Hartley Sweeten
Tidy up the multi-line comments to follow the CodingStyle. 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>
2014-11-26staging: comedi: adv_pci1724: tidy up the comedi_driver declarationH Hartley Sweeten
For aesthetics, add some whitespace to the comedi_driver declaration. 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>
2014-11-26staging: comedi: adv_pci1724: tidy up the pci_driver declarationH Hartley Sweeten
For aesthetics, add some whitespace to the pci_driver declaration. 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>
2014-11-26staging: comedi: adv_pci1724: remove unnecessary dev_info()H Hartley Sweeten
Remove the unnecessary noise at the end of the (*auto_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>
2014-11-26staging: comedi: adv_pci1724: absorb setup_subdevices()H Hartley Sweeten
For aesthetics, absorb this function into the (*auto_attach). Add some whitespace to the 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>
2014-11-26staging: comedi: adv_pci1724: define the board id register bitsH Hartley Sweeten
For aesthetics, remove the enum and define the bits 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>
2014-11-26staging: comedi: adv_pci1724: remove enum sync_output_trigger_contentsH Hartley Sweeten
This enum is not used in the driver. Remove it. For aesthetics, rename the register define and move the comment that any value will trigger the sync output. 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>
2014-11-26staging: comedi: adv_pci1724: define the sync output control/status regH Hartley Sweeten
Define the bits for the synchronous output control/status register and remove the enum. 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>
2014-11-26staging: comedi: adv_pci1724: define the dac control register bitsH Hartley Sweeten
Define the bits for the DAC control register and remove the enum along with the helper functions. Simplify adv_pci1724_insn_write() a bit. The 'ctrl' bits are based on the 'chan' and 'mode' and do not need to be recalculated for each 'val'. 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>
2014-11-26staging: comedi: adv_pci1724: tidy up the register I/O mapH Hartley Sweeten
For aesthetics, convert the enum board_registers into defines and rename them so they have namespace associated with 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>
2014-11-26staging: comedi: adv_pci1724: remove PCI_VENDOR_ID_ADVANTECH defineH Hartley Sweeten
This define is already in pci_ids.h. Remove the duplicate in this 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>
2014-11-26staging: comedi: adv_pci1724: absorb set_dac()H Hartley Sweeten
Absorb this simple function into adv_pci1724_insn_write(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: comedi: adv_pci1724: use comedi_timeout() to wait for DAC idle stateH Hartley Sweeten
Use the comedi_timeout() helper to wait for the DAC to be idle before writing to 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>
2014-11-26staging: comedi: adv_pci1724: introduce adv_pci1724_insn_write()H Hartley Sweeten
The analog output, offset calib, and gain calib subdevices all use similar (*insn_write) functions. The onyl difference is the 'mode' that is passed to the set_dac() helper. Introduce a new (*insn_write) function that can be used by all the subdevices. Use the s->private member to pass the 'mode' needed by set_dac(). Remove the subdevice specific (*insn_write) functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: comedi: adv_pci1724: remove NUM_AO_CHANNELS defineH Hartley Sweeten
This define is now only used to set each of the subdevice 'n_chan'. For clarity, remove the define and open code the values. 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>
2014-11-26staging: comedi: adv_pci1724: use subdevice readback for 'gain_value'H Hartley Sweeten
Use the comedi_subdevice 'readback' member and the core provided (*insn_read) to handle the readback of the write-only gain calib subdevice. Remove the then unused 'gain_value' member from the private data. The private data is now unnecessary. Remove it and the allocation. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: comedi: adv_pci1724: use subdevice readback for 'offset_value'H Hartley Sweeten
Use the comedi_subdevice 'readback' member and the core provided (*insn_read) to handle the readback of the write-only offset calib subdevice. Remove the then unused 'offset_value' member from 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>
2014-11-26staging: comedi: adv_pci1724: use subdevice readback for 'ao_value'H Hartley Sweeten
Use the comedi_subdevice 'readback' member and the core provided (*insn_read) to handle the readback of the write-only analog output subdevice. Remove the then unused 'ao_value' member from 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>
2014-11-26staging: comedi: me4000: Fixed code style issueMarcus Hufvudsson
Fixed checkpatch.pl error message. Space prohibited before that ',' Signed-off-by: Marcus Hufvudsson <marcushuf@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: comedi: das6402: add (*do_cmd) for AI async commandsH Hartley Sweeten
Flesh out the (*do_cmd) function to support timed analog input acquisitions. 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>
2014-11-26staging: comedi: das6402: read analog input samples in interrupt handlerH Hartley Sweeten
Currently the interrupt handler just clears the interrupt. Add the code necessary to read the analog input samples when running an async command. 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>
2014-11-26staging: comedi: das6402: introduce das6402_ai_set_mode()H Hartley Sweeten
Introduce a helper function to set the analog input acquisition mode. This will be needed when the (*do_cmd) function is completed to 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>
2014-11-26staging: comedi: das6402: add basic (*do_cmdtest) for AI async commandsH Hartley Sweeten
Currently the async command support in this driver consists of just the stubbed in functions. Flesh out the (*do_cmdtest) function for basic support of timed analog input acquisitions. 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>
2014-11-26staging: comedi: fix scan_end_arg == chanlist_len assumptionIan Abbott
Some comedi drivers allow the `scan_end_arg` value of an asynchronous command to be a multiple (> 1) of the `chanlist_len` although most require them to be the same value. `comedi_bytes_per_scan()` is incorrectly using `chanlist_len` as the length of the scan. Change it to use `scan_end_arg`. `comedi_nsamples_left()` is incorrectly using `cur_chan` as the current sample position in the scan (it is actually the current position in the channel list). Change it to use the actual sample position in the scan. (Unfortunately we only have the current scan position in bytes currently, so convert that to a sample position.) 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>
2014-11-26staging: comedi: dmm32at: update the MODULE_DESCRIPTIONH Hartley Sweeten
Change the MODULE_DESCRIPTION to something more useful than the generic "Comedi low-level 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>
2014-11-26staging: comedi: dmm32at: tidy up multi-line commentsH Hartley Sweeten
Reformat the multi-line comments for follow the CodingStyle. 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_AIRBACKH Hartley Sweeten
For aesthetics, rename this define used for the Analog I/O Readback register. Define the bits of 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_AICONFH Hartley Sweeten
For aesthetics, rename this define used for the Analog Configuration register. Define the bits of 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_CNTRDIOH Hartley Sweeten
For aesthetics, rename this define used for the Counter and Digital I/O Configuration register. Define the bits of 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_INTCLOCKH Hartley Sweeten
For aesthetics, rename this define used for the Interrupt and A/D Clock Control and Status register. Also, rename the defines for the bits of 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_AISTATH Hartley Sweeten
For aesthetics, rename this define used for the A/D Status register. Also, rename the defines for the bits of the register. The probe code in dmm32at_reset() checks this register to make sure the S/D1 and S/D0 bits are set. This check actually verifies that the board is configured (with jumpers on the board) with all the Analog Input channels operating in single-ended mode. Add a comment about this. 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_CNTRLH Hartley Sweeten
For aesthetics, rename this define used for the Miscellaneous Control register. Also, rename the defines for the bits of 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_FIFOSTATH Hartley Sweeten
For aesthetics, rename this define used for the FIFO Status register. Define the bits of 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_FIFOCNTRLH Hartley Sweeten
For aesthetics, rename this define used for the FIFO Control register. Also, rename the defines used for the bits of 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>
2014-11-26staging: comedi: dmm32at: define the FIFO Depth registerH Hartley Sweeten
This driver currently does not use the FIFO. For completeness, define the offset to the FIFO Depth 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_DACMSB_CHANH Hartley Sweeten
For aesthetics, rename this define used to set the DACH[10] bits in the DAC MSB register to select the D/A 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_DACSTATH Hartley Sweeten
For aesthetics, rename this define used for the Status / Auxillary Digital Inputs register. Document the bits in 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_DAC[LM]SBH Hartley Sweeten
For aesthetics, rename these defines used for the D/A LSB/MSB registers. 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_AI{LOW,HIGH}H Hartley Sweeten
For aesthetics, rename these defines used for the A/D Low/High Channel registers. 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_AUXDOUTH Hartley Sweeten
For aesthetics, rename this define used for the Auxillary Digital Output register. This register is currently not used in the driver. Document the bits of the register for completeness. 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_AI[LM]SBH Hartley Sweeten
For aesthetics, rename these defines used for the A/D LSB/MSB registers. 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>
2014-11-26staging: comedi: dmm32at: rename DMM32AT_CONVH Hartley Sweeten
For aesthetics, rename this define used for the Start A/D Conversion 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>
2014-11-26staging: comedi: dmm32at: use 8255 module for Digital I/O subdeviceH Hartley Sweeten
The Dimond-MM-32-AT board uses an internal 82C55-type digital I/O circuit to provide the 24 digital I/O lines. The only quirk is the need to set the page selection bits in the control register to select page 1 addresses. Instead of duplicating the 8255 code, provide an (*io) callback and use the 8255 module to support this subdevice. This also removes the need for the private data in this 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>
2014-11-26staging: comedi: dmm32at: introduce dmm32at_ai_set_chanspec()H Hartley Sweeten
Introduce a helper function to set the analog input channel scan and range control registers. Use the new helper in the analog input (*insn_read) and (*do_cmd) functions. The extra sanity checks in the (*do_cmd) are not necessary. The cmd->chanlist will always be valid and the (*do_cmdtest) validates the channel list in Step 5. 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>
2014-11-26staging: comedi: dmm32at: remove unused members of the private dataH Hartley Sweeten
The 'data' and 'ai_inuse' members in the private data are not used in the driver. Remove 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>
2014-11-26staging: comedi: dmm32at: remove dmm32at_ns_to_timer()H Hartley Sweeten
This function is not necessary. It simply returns the 'ns' value that was passed to it. Remove it as well as the unnecessary Step 4 check of the cmd->convert_arg. 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>
2014-11-26staging: comedi: dmm32at: tidy up cmd->convert_{src, arg} validationH Hartley Sweeten
This driver only supports a single convert_src, TRIG_TIMER. Tidy up the (*do_cmdtest) validation of the cmd->convert_{src,arg}. 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>
2014-11-26staging: comedi: dmm32at: tidy up cmd->scan_begin_{src, arg} validationH Hartley Sweeten
This driver only supports a single scan_begin_src, TRIG_TIMER. Tidy up the (*do_cmdtest) validation of the cmd->scan_begin_{src,arg}. 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>
2014-11-26staging: comedi: dmm32at: tidy up subdevice initializationH Hartley Sweeten
For aesthetics, add some whitespace to the subdevice 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>