- 17 Jun, 2013 38 commits
-
-
H Hartley Sweeten authored
The comedi core validates the insn->chanspec channel and range before calling the subdevice (*insn_read) function. Remove the unnecessary sanity checks. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This variable is set during the attach of the board and never cleared so the test in i_APCI3XXX_InsnReadAnalogInput() will always succeed. Just remove the variable to help with cleaning up 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>
-
H Hartley Sweeten authored
This define is not used by the driver. 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>
-
H Hartley Sweeten authored
Currently, the subdevice functions used to configure and read/write the ttl digital i/o ports is way over to complicated. The (*insn_config) function also abuses the comedi API by overriding the instruction command passed in data[0]. Fix the ttl digital i/o support to work like the comedi core expects. The (*insn_config) function supports the three instructions common for COMEDI_SUBD_DIO subdevices: INSN_CONFIG_DIO_INPUT - configure the specified channel as input INSN_CONFIG_DIO_OUTPUT - configure the specified channel as output INSN_CONFIG_DIO_QUERY - returns the status of the specified channel Port 0 (channels 0-7) is always input Port 1 (channels 8-15) is always output Port 2 (channels 9-23) are programmable i/o (all channels are input or output) The (*insn_bits) function allows writing to the output channels and returns the state of all channels. The (*insn_read) and (*insn_write) functions are not required. The comedi core will emulate them using the (*insn_bits) function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename this CamelCase function and absorb it from hwdrv_apci3xxx.c directly into the driver. Tidy up the analog output subdevice init by adding some whitespace. 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>
-
H Hartley Sweeten authored
The boards that have analog outputs always have 4 channels. Remove the 'i_NbrAoChannel' data from the boardinfo and add a bit field to indicate that the board 'has_ao'. Use that to conditionally initialize the subdevice and open code the s->n_chan value of 4. 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>
-
H Hartley Sweeten authored
Rename the CamelCase local variables. The comedi core validates the insn->chanspec to make sure the channel number and range are valid for the subdevice. The extra checks in this function are not required. (*insn_write) functions are supposed to write all the data passed in the data pointer (insn->n values) then return the number of data values written of an errno. Fix this function to work like the core expects. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
For aesthetic reasons, add some whitespace to the initialization of the ttl digital i/o subdevices. Fix the subdev_flags for the subdevice. The SDF_GROUND and SDF_COMMON flags only apply to analog subdevices. Fix the s->iobits for the subdevice. According to the datasheet: Port 0 (channels 0-7) are always outputs Port 1 (channels 8-15) are always inputs Port 2 (channels 9-23) are programmable i/o (default to 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>
-
H Hartley Sweeten authored
For aesthetic reasons, add some whitespace to the initialization of the digital input and output subdevices. Fix the subdev_flags for both subdevices. The SDF_GROUND and SDF_COMMON flags only apply to analog subdevices. Digital output subdevices do not need the SDF_READABLE flag set. Remove the initialization of s->io_bits. It only has meaning for COMEDI_SUBD_DIO subdevices. 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>
-
H Hartley Sweeten authored
The boards that have analog outputs always have 12-bit resolution. Remove the 'i_AoMaxdata' data from the boardinfo and open code the s->maxdata. Use the hex value for the resolution since that is more common in comedi drivers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The boards that have ttl input and output channels always have 24 channels. Remove the 'i_NbrTTLChannel' data from the boardinfo and add a bit field to indicate that the board 'has_ttl_io'. Use that to conditionally initialize the subdevice and open code the s->n_chan value of 24. 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>
-
H Hartley Sweeten authored
The boards that have digital input and output channels always have 4 inputs and 4 outputs. Remove the 'i_NbrD[io]Channel' data from the boardinfo and add two bit fields to indicate that the board 'has_dig_in' and 'has_dig_out'. Use those to conditionally initialize the subdevices and open code the s->n_chan value of 4 for both subdevices. 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>
-
H Hartley Sweeten authored
This data in the boardinfo is not used. 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>
-
H Hartley Sweeten authored
Move the copyright information from hwdrv_apci3xxx.c to the actual driver, addi_apci_3xxx.c. Reformat the information 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>
-
H Hartley Sweeten authored
This driver does not use anything provided by these includes. 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>
-
H Hartley Sweeten authored
This driver abuses the enum comedi_subdevice_type by redefining enum 11 - COMEDI_SUBD_SERIAL as COMEDI_SUBD_TTLIO. The subdevice that uses COMEDI_SUBD_TTLIO is a TTL Digital Input/Output subdevice. Remove COMEDI_SUBD_TTLIO and just use COMEDI_SUBD_DIO as the subdevice type. 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>
-
H Hartley Sweeten authored
The struct addi_private definition from the addi-data "common" code is very bloated. Introduce a local struct apci3xxx_private that just has the data needed by this driver. Add a couple includes that this driver depends on and remove the include of "addi-data/addi_common.h" since this driver no longer depends on 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>
-
H Hartley Sweeten authored
The struct addi_board definition from the addi-data "common" code is very bloated. Introduce a private struct apci3xxx_boardinfo that just has the data needed by this driver. Move the #include "addi-data/hwdrv_apci3xxx.c" so it will have the new struct definition. 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>
-
H Hartley Sweeten authored
The same subdevice callbacks are used by all the boards supported by this driver. Remove the information from the boardinfo and initialize the subdevices directly. Remove the callback initializations that are always = NULL. 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>
-
H Hartley Sweeten authored
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> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Digital output subdevices always have a 'maxdata' of '1'. Remove the 'i_DoMaxData' boardinfo and just open code the value. 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>
-
H Hartley Sweeten authored
All of the boards supported by this driver have a PCI 9054 chip without an attached eeprom. Remove the unused support code that reads the eeprom. Also, remove the unnecessary 'i_PCIEeprom' and 'pc_EepromChip' data from 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>
-
H Hartley Sweeten authored
None of the boards supported by this driver have a timer. Remove the unnecessary code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This driver does not use dma. Remove the unnecessary code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The boards supported by this driver all have an ADDIDATA_9054 eeprom. Knowing this we can simplify the code that reads the PCI bars to get the iobase address 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>
-
H Hartley Sweeten authored
All the boards supported by this driver have the same private analog input and output ranges. Absorb the comedi_lrange tables from hwdrv_apci3xxx.c directly into the driver. For aesthetic reasons, rename the tables so they have namespace associated with the driver. Remove the 'pr_AiRangelist' and 'pr_AoRangelist' data from the boardinfo and use the range tables directly when initializing the subdevices. 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>
-
H Hartley Sweeten authored
All the boards supported by this driver use the same 'interrupt' callback in the boardinfo. Absorb the interrupt function from hwdrv_apci3xxx.c directly into the driver. Rename the CamelCase function to apci3xxx_irq_handler(). Remove v_ADDI_Interrupt(), which indirectly called the interrupt function, and use apci3xxx_irq_handler instead when requesting the irq. Remove the 'interrupt' callback from 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>
-
H Hartley Sweeten authored
Remove the extra comments and rename the CamelCase local variables. 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>
-
H Hartley Sweeten authored
All the boards supported by this driver that have digital inputs use the same 'di_bits' callback in the boardinfo. Absorb the function from hwdrv_apci3xxx.c directly into the driver. Remove the 'di_bits' callback from the boardinfo and use the function directly to set the subdevice (*insn_bits). None of the boards supported by this driver have a 'di_config', 'di_read', or 'io_write' callback. Remove the unnecessary setting of the subdevice callbacks. 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>
-
H Hartley Sweeten authored
All the boards supported by this driver that have digital outputs use the same 'do_bits' callback in the boardinfo. Absorb the function from hwdrv_apci3xxx.c directly into the driver. Remove the 'do_bits' callback from the boardinfo and use the function directly to set the subdevice (*insn_bits). None of the boards supported by this driver have a 'do_config', 'do_write', or 'do_read' callback. Remove the unnecessary setting of the subdevice callbacks. 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>
-
H Hartley Sweeten authored
All the boards supported by this driver use the same 'reset' callback in the boardinfo. Absorb the reset function, apci3xxx_reset(), from hwdrv_apci3xxx.c directly into the driver. Remove i_ADDI_Reset(), which indirectly called the reset function, and just call apci3xx_reset() directly. Remove the 'reset' callback from 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>
-
H Hartley Sweeten authored
This driver currently uses the addi-data "common" code and contains a lot of bloat. Copy the code in addi_common.c to this driver and remove the #include that caused it to be compiled with the driver. This will allow removing the bloat. 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>
-
H Hartley Sweeten authored
Rename the CamelCase function and variables. Remove the extra comments. Leave the main comments to help with further cleanup of 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>
-
H Hartley Sweeten authored
Introduce a new subdevice runflags, SRF_FREE_SPRIV, and a new helper function, comedi_set_spriv(), that the drivers can use to set the comedi_subdevice private data pointer. The helper function will also set SRF_FREE_SPRIV to allow the comedi core to automatically free the subdevice private data during the cleanup_device() stage of the detach. Currently s->private is only allocated by the 8255, addi_watchdog, amplc_dio200_common, and ni_65xx drivers. All users of those drivers can then have the comedi_spriv_free() calls removed and in many cases the (*detach) can then simply be the appropriate comedi core provided function. The ni_65xx driver uses a helper function, ni_65xx_alloc_subdevice_private(), to allocate the private data. Refactor the function to return an errno or call comedi_set_spriv() instead of returning a pointer to the private data and requiring the caller to handle 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>
-
Chad Williamson authored
Move the EXPORT_SYMBOL macros in bpctl_mod.c beneath the definitions they refer to, resolving checkpatch.pl warnings. While we're at it, use EXPORT_SYMBOL rather than EXPORT_SYMBOL_NOVERS. Signed-off-by: Chad Williamson <chad@dahc.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chad Williamson authored
Move the EXPORT_SYMBOL macros in bypass.c beneath the definitions they refer to, resolving checkpatch.pl warnings. While we're at it, use EXPORT_SYMBOL rather than EXPORT_SYMBOL_NOVERS. Signed-off-by: Chad Williamson <chad@dahc.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chad Williamson authored
Since all references to EXPORT_SYMBOL_NOVERS have been removed, we can remove its definition from bp_mod.h and bypasslib/bplibk.h. Signed-off-by: Chad Williamson <chad@dahc.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 16 Jun, 2013 1 commit
-
-
Greg Kroah-Hartman authored
Merge tag 'iio-for-3.11c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Third round of IIO new stuff, cleanups and staging graduations for the 3.11 cycle. 1) Add clock consumer support and device tree bindings to adf4350. The clock consumer part depends on a not so optional 'optional' implementation of clock_round_rate which is not present for pxa27x. It will be shortly and as no one actually uses this chip with that sub arch as far as we know, no need to delay the inclusion in the meantime. See http://lkml.indiana.edu/hypermail/linux/kernel/1306.1/00023.html for the brief discussion. This may be the first non soc specific driver that makes use of that function. 2) AD7303 DAC new driver. 3) ADIS16130 minor fixes and improvements plus move out of staging. 4) AD7291 improvements to bring it inline with more recent drivers. 5) Update to the sysfs ABI doc to fix some out of date paths.
-
- 15 Jun, 2013 1 commit
-
-
Linus Torvalds authored
-