summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
Commit message (Collapse)AuthorAgeFilesLines
...
| * staging: comedi: clarify/unify macros for NI macro-defined terminalsSpencer E. Olson2018-11-071-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses a single macro to define multiple macros that represent a series of terminals for NI devices. This patch also redefines NI_MAX_COUNTERS as the maximum number of counters possible on NI devices (instead of the maximum index of the counters). This was a little confusing and caused a bug in commit 347e244884c3b ("staging: comedi: tio: implement global tio/ctr routing") when setting/reading registers for counter terminals. Fixes: 347e244884c3b ("staging: comedi: tio: implement global tio/ctr routing") Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: ni_mio_common: scale ao INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTSSpencer E. Olson2018-11-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes implementation of INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS for ni_mio devices. The previous patch should have used the channel information passed in to scale the result by the number of channels being used. Fixes: 51fd36738383 ("staging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS") Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: ni_labpc_common: Use insn->n in AO insn_write handlerIan Abbott2018-11-071-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `insn_write` handler for the AO subdevice (`labpc_ao_insn_write()`) currently ignores `insn->n` (the number of samples to write) and assumes a single sample is to be written. But `insn->n` could be 0, meaning no samples should be written, in which case `data[0]` is invalid. Follow the usual Comedi guidelines and change `labpc_ao_insn_write()` to write the specified number of samples. This fixes the assumption that `data[0]` is valid. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: cb_pcidda: Use insn->n in AO insn_write handlerIan Abbott2018-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `insn_write` handler for the AO subdevice (`cb_pcidda_ao_insn_write()`) currently ignores `insn->n` (the number of samples to write) and assumes a single sample is to be written. But `insn->n` could be 0, meaning no samples should be written, in which case `data[0]` is invalid. Follow the usual Comedi guidelines and change `cb_pcidda_ao_insn_write()` to write the specified number of samples. This fixes the assumption that `data[0]` is valid. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: addi_apci_3501: Use insn->n in EEPROM insn_read handlerIan Abbott2018-11-071-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `insn_read` handler for the EEPROM subdevice (`apci3501_eeprom_insn_read()`) currently ignores `insn->n` (the number of samples to be read) and assumes a single sample is to be read. But `insn->n` could be 0, meaning no samples should be read, in which case `data[0]` ought not to be written. (The comedi core at least ensures that `data[0]` exists, but we should not rely on that.) Following the usual Comedi guidelines and interpret `insn->n` as the number of samples to be read, but only read the EEPROM location once and make `insn->n` copies, as we don't expect the contents of the EEPROM location to change between readings. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: Check length of INSN_CONFIG_TIMER_1 instructionIan Abbott2018-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The contents of the Comedi configuration instruction `INSN_CONFIG_TIMER_1` instruction are not very well defined, but the one driver that uses it (the "cb_pcidas64" driver for the PCI-DAS4020/12 card) assumes its `insn->n` is 5. Add a check in `check_insn_config_length()` to verify that `insn->n` is correct for this configuration instruction. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: cb_pcidas64: Use insn->n in EEPROM insn_read handlerIan Abbott2018-11-071-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `insn_read` handler for the EEPROM subdevice (`eeprom_insn_read()`) currently ignores `insn->n` (the number of samples to be read) and assumes a single sample is to be read. But `insn->n` could be 0, meaning no samples should be read, in which case `data[0]` ought not to be written. (The comedi core at least ensures that `data[0]` exists, but we should not rely on that.) Follow the usual Comedi guidelines and interpret `insn->n` as the number of samples to be read, but only read the EEPROM location once and make `insn->n` copies, as we don't expect the contents of the EEPROM location to change between readings. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: cb_pcidas64: Use insn->n in AO insn_write handlerIan Abbott2018-11-071-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `insn_write` handler for the AO subdevice (`ao_winsn()` currently ignores `insn->n` (the number of samples to write) and assumes a single sample is to be written. But `insn->n` could be 0, meaning no samples should be written, in which case `data[0]` is invalid. Follow the usual Comedi guidelines and change `ao_winsn()` to write the specified number of samples. This fixes the assumption that `data[0]` is valid. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: comedi: dt9812: fixed a typo in comment.Marco Wang2018-11-051-1/+1
|/ | | | | | | Fixed a typo in comment. Signed-off-by: Marco Wang <m.aesophor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: tio: fix multiple missing break in switch bugsGustavo A. R. Silva2018-10-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there are multiple missing break statements in two switch code blocks. This makes the execution path to fall all the way down through to the default cases, which makes the function ni_tio_set_gate_src() to always return -EINVAL. Fix this by adding the missing break statements. Also, notice that due to the absence of the break statements, the following pieces of code are unreachable: 1078 if (ret) 1079 return ret; 1080 /* 3. reenable & set mode to starts things back up */ 1081 ni_tio_set_gate_mode(counter, src); 1098 if (ret) 1099 return ret; 1100 /* 3. reenable & set mode to starts things back up */ 1101 ni_tio_set_gate2_mode(counter, src); So, by adding the missing breaks, this patch also fixes the problem above. Addresses-Coverity-ID: 1474165 ("Missing break in switch") Addresses-Coverity-ID: 1474162 ("Structurally dead code") Fixes: 347e244884c3 ("staging: comedi: tio: implement global tio/ctr routing") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_660x: add device-global routingSpencer E. Olson2018-10-091-0/+265
| | | | | | | | | | Provides the device-global routing interface for ni_660x devices. Using the device-global names in comedi_cmd structures for commands was already supported through the ni_tio module. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_660x: clean up pfi routingSpencer E. Olson2018-10-091-16/+56
| | | | | | | | | | Cleans up the pfi routing code to make it easier to follow, read, and also to prepare to use this cleaned up code for enabling the device-global routing interface for ni_660x devices. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_660x: Add NI PCI-6608 to list of supported devicesSpencer E. Olson2018-10-091-1/+7
| | | | | | | | | Previously, only the PXI version of the NI-6608 board was supported. This change adds support for the PCI version as well. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_mio_common: create device-global access to tioSpencer E. Olson2018-10-091-0/+11
| | | | | | | | | | Adds tio sub-devices of ni_mio_common supported hardware to the implementation of test_route, connect_route, disconnect_route. This change delegates the actual functionality to the ni_tio module. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: tio: implement global tio/ctr routingSpencer E. Olson2018-10-096-115/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds ability to use device-global names in command args, in particular cmd->start_arg (for NI_CtrArmStartTrigger), and cmd->scan_begin_arg or cmd->convert_arg (either is used to specify NI_CtrGate, with preference given to cmd->scan_begin_arg, if it is set). The actual arguments of cmd->start_arg are not fully checked against known register values for the particular devices because these are not documented or currently known. This follows the precedence of prior versions of the tio driver. Should these become known, they should be annotated in the route_values tables and the set of lines in ni_tio_cmdtest should be uncommented to allow the tests to be made. This patch also adds interface functions that allow routes for particular counter route destinations to be made/queried/unmade. This allows overseer modules to implement test_route, connect_route, and disconnect_route. As a part of these changes, various functions were cleaned up and clarified. These new interface functions allow direct writing/reading of register values. This is an example of exactly what the new device-global access was intended to solve: the old interface was not consistent with other portions of the ni_* drivers--it did not allow full register values to be given for various MUXes. Instead, the old interface _did_ abstract away some of the actual hardware from the underlying devices, but it was not consistent with any other NI hardware. Allowing the device-global identifiers to be used, the new patch provides for consistency across all ni_* drivers. One final note: these changes provide for backwards compatibility by allowing the older values to still be used in through the pre-existing kernel interfaces--though not in the new device-global test/dis/connect/route interfaces. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_mio_common: implement output selection of GPFO_{0, 1}Spencer E. Olson2018-10-092-1/+111
| | | | | | | | | Implement the ability to route various signals to NI_CtrOut(x) pin. This pin is also known as GPFO_{0,1} in the DAQ STC. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_mio_common: implement global pfi, rtsi routingSpencer E. Olson2018-10-092-71/+682
| | | | | | | | | | | | | | | | | | | | | | | | Implement device-global config interface for ni_mio devices. In particular, this patch implements: INSN_DEVICE_CONFIG_TEST_ROUTE, INSN_DEVICE_CONFIG_CONNECT_ROUTE, INSN_DEVICE_CONFIG_DISCONNECT_ROUTE, INSN_DEVICE_CONFIG_GET_ROUTES for the ni mio devices. This means that the new abstracted signal/terminal names can be used to define signal routing with regards to the PFI terminals and RTSI trigger bus lines. This also adds ability to identify PFI and RTSI channels on the PFI and RTSI subdevices using the new device-global names. This does not change the values that are set for channel output selections using the subdevice interfaces--these still require direct register values. Annotates and updates tables of register values to reflect this new implementation status. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_mio_common: implement new routing for TRIG_EXTSpencer E. Olson2018-10-091-40/+66
| | | | | | | | | | | | | | | | Use new signal routing capability for all comedi command *_src == TRIG_EXT options. This new interface allows the user specify signals and terminals as TRIG_EXT sources using a very consistent naming convention. Furthermore, the interface allows backwards compatibility to prior behavior of specifying register-level (or near register-level) values as *_arg options when *_src == TRIG_EXT. Annotates and updates tables of register values to reflect this new implementation status. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: add interface to ni routing table informationSpencer E. Olson2018-10-097-1/+1502
| | | | | | | | | Adds interface and associated unittests for accessing/looking-up/validating the new ni routing table information. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_routing: Add NI signal routing infoSpencer E. Olson2018-10-0938-0/+30476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See README for a thorough discussion of this content. Adds tables of all register values for routing various signals to various terminals on National Instruments hardware. This information is directly compared to and taken from register-level programming documentation and/or register-level programming examples as provided by National Instruments. Furthermore, this information was mostly compared (favorably) to the register values already used in the comedi drivers for NI hardware. Adds tables of valid routes for many devices. This information is not consistent from device to device, nor entirely consistent within device families. One additional major challenge is that this information does not seem to be obtainable in any programmatic fashion, neither through the proprietary NIDAQmx(-base) c-libraries, nor with register level programming, _nor_ through any documentation. In fact, the only consistent source of this information is through the proprietary NI-MAX software, which currently only runs on Windows platforms. A further challenge is that this information cannot be exported from NI-MAX, except by screenshot. The collection and maintenance of this information is somewhat tedious and requires frequent re-examination and comparison of NI-MAX and/or the NI-MHDDK documentation (register programming information) and NI-MHDDK examples. Tools are added with this patch to facilitate generating CSV files from the data tables. These CSV files can be used with a spreadsheet program to provide better visual comparision with screenshots gathered from NI-MAX. Tools are also added to regenerate the data tables from CSV content--this greatly enhances updating data tables with large changes (such as when adding devices). Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: add new device-global config interfaceSpencer E. Olson2018-10-094-0/+120
| | | | | | | | | | Adds interface for configuring options that are global to all sub-devices. For now, only options to configure device-globally identified signal routes have been defined. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: add abstracted NI signal/terminal named constantsSpencer E. Olson2018-10-091-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds abstracted constants for National Instruments terminal/signal names. Some background: There have been significant confusions over the past many years for users when trying to understand how to connect to/from signals and terminals on NI hardware using comedi. The major reason for this is that the actual register values were exposed and required to be used by users. Several major reasons exist why this caused major confusion for users: 1) The register values are _NOT_ in user documentation, but rather in arcane locations, such as a few register programming manuals that are increasingly hard to find and the NI-MHDDK (comments in in example code). There is no one place to find the various valid values of the registers. 2) The register values are _NOT_ completely consistent. There is no way to gain any sense of intuition of which values, or even enums one should use for various registers. There was some attempt in prior use of comedi to name enums such that a user might know which enums should be used for varying purposes, but the end-user had to gain a knowledge of register values to correctly wield this approach. 3) The names for signals and registers found in the various register level programming manuals and vendor-provided documentation are _not_ even close to the same names that are in the end-user documentation. Similar confusion, albeit less, plagued NI's previous version of their own proprietary drivers. Earlier than 2003, NI greatly simplified the situation for users by releasing a new API that abstracted the names of signals/terminals to a common and intuitive set of names. In addition, this new API provided a much more common interface to use for most of NI hardware. The names added here mirror the names chosen and well documented by NI. These names are exposed to the user via the comedilib user library. By keeping the names in this format, in spite of the use of CamelScript, maintenance will be greatly eased and confusion for users _and_ comedi developers will be greatly reduced. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: tests: add unittest framework for comediSpencer E. Olson2018-10-094-0/+142
| | | | | | | | | | | Adds a framework for unittests for comedi drivers. It was certainly possible to write some unit tests before and test various aspects of a particular driver, but this framework makes this a bit easier and hopefully inspires more unittest modules to be written. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: comedi_test: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTSSpencer E. Olson2018-10-091-0/+44
| | | | | | | | | Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS instruction. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_pcidio: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTSSpencer E. Olson2018-10-091-0/+13
| | | | | | | | | | Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS instruction. This patch also adds data for this implementation, based on spec sheets from NI. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTSSpencer E. Olson2018-10-093-0/+46
| | | | | | | | | | | Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS instruction. This patch also adds data for digital subdevices that are streaming capable (within the ni_mio_* family). Mostly, only the m-series devices are capable of digital streaming. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: add facility to directly query subdevice timing constraintsSpencer E. Olson2018-10-092-1/+8
| | | | | | | | | | | | | | | | | | | | Adds facility to directly query the hardware speed limits of subdevices, in particular for scan_begin and convert signals. This information can be critical for integrating comedi with other hardware modules, and also comedi modules together with software where software requires specific timing capabilities in order to properly coordinate multiple devices. Currently, comedi_command_test almost satisfies this need, but really only for when *_src == TRIG_TIMER. For *_src == TRIG_EXT, comedi_command_test does not help at all. For many subdevices, one might simply use *_src==TRIG_TIMER in command_test in order to determine these limits. For other subdevices, this tactic does not work since *_src == TRIG_TIMER might not be valid. There is also the possibility that the timing limits are different between the TRIG_TIMER and TRIG_EXT modes. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_mio_common: protect register write overflowSpencer E. Olson2018-10-091-7/+17
| | | | | | | | | | | | | | | | | | | | | | Fixes two problems introduced as early as commit 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code"): (1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is not unduly overwritten on e-series devices. On e-series devices, the first three of the last four bits are reserved. The last bit defines the output selection of the RGOUT0 pin, otherwise known as RTSI_Sub_Selection. For m-series devices, these last four bits are indeed used as the output selection of the RTSI7 pin (and the RTSI_Sub_Selection bit for the RGOUT0 pin is moved to the RTSI_Trig_Direction register. (2) Allows all 4 RTSI_BRD lines to be treated as valid sources for RTSI lines. This patch also cleans up the ni_get_rtsi_routing command for readability. Fixes: 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code") Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ni_mio_common: fix subdevice flags for PFI subdeviceIan Abbott2018-08-081-1/+2
| | | | | | | | | | | The PFI subdevice flags indicate that the subdevice is readable and writeable, but that is only true for the supported "M-series" boards, not the older "E-series" boards. Only set the SDF_READABLE and SDF_WRITABLE subdevice flags for the M-series boards. These two flags are mainly for informational purposes. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: drop serial2002 driverGreg Kroah-Hartman2018-08-013-787/+0Star
| | | | | | | | | | | There's not been any work on this driver since it was originally merged, and it really needs to be rewritten to use the serdev layer instead if people really need/want it. Reported-by: Christoph Hellwig <hch@lst.de> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: comedi_fops: Shift assignment operator '=' to previous lineNishad Kamdar2018-07-161-2/+2
| | | | | | | | | | Shift '=' assignment operator to the end of previous line to conform to preferred kernel style line wrapping. Issue reported by checkpatch CHECK. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: remove redundant variable segposColin Ian King2018-07-112-4/+4
| | | | | | | | | | | Variable segpos is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'segpos' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.18-rc3 into staging-nextGreg Kroah-Hartman2018-07-021-1/+1
|\ | | | | | | | | | | We want the staging/iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write()Dan Carpenter2018-06-251-1/+1
| | | | | | | | | | | | | | | | | | There is a '>' vs '<' typo so this loop is a no-op. Fixes: d35dcc89fc93 ("staging: comedi: quatech_daqp_cs: fix daqp_ao_insn_write()") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: comedi: comedi_compat32.h: fixed missing or malformed ↵ankit patel2018-06-181-1/+1
| | | | | | | | | | | | | | | | | | SPDX-License-Identifier Fixed SPDX-License-Identifier comment on first line Signed-off-by: ankit patel <ankit.mayurbhai.patel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: comedi: comedi_pci.h: fixed missing or malformed ↵ankit patel2018-06-181-1/+1
| | | | | | | | | | | | | | | | | | SPDX-License-Identifier Fixed SPDX-License-Identifier comment on first line Signed-off-by: ankit patel <ankit.mayurbhai.patel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: comedi: comedi_pcmcia.h: fixed missing or malformed ↵ankit patel2018-06-181-1/+1
| | | | | | | | | | | | | | | | | | SPDX-License-Identifier Fixed SPDX-License-Identifier comment on first line Signed-off-by: ankit patel <ankit.mayurbhai.patel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: comedi: comedilib.h: fixed missing or malformed SPDX-License-Identifierankit patel2018-06-181-1/+1
| | | | | | | | | | | | | | Fixed SPDX-License-Identifier comment on first line Signed-off-by: ankit patel <ankit.mayurbhai.patel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: comedi: comedi.h: fixed missing or malformed SPDX-License-Identifierankit patel2018-06-181-1/+1
| | | | | | | | | | | | | | Fixed SPDX-License-Identifier comment on first line Signed-off-by: ankit patel <ankit.mayurbhai.patel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: Improved readability of function comedi_nsamples_left.Chris Opperman2018-06-171-13/+13
| | | | | | | | | | | | | | | | | | | | | | Improve readability of comedi_nsamples_left: a) Reduce nesting by using more return statements. b) Declare variables scans_left and samples_left at start of function. c) Change type of scans_Left to unsigned long long to avoid cast. Signed-off-by: Chris Opperman <eklikeroomys@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: drivers: ni_mio_common: add names to function pointer ↵Giulio Benetti2018-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | parameters. Checkpatch.pl complains about packbits function pointer that lacks parameters name. Add parameter names to packbits function pointer. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: drivers: cb_pcimdda: fix warning on quoted string split ↵Giulio Benetti2018-06-171-3/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | across lines. Checkpatch.pl complains about "quoted string split across lines" for string in MODULE_DESCRIPTION(). Put string on only one line. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: drivers: daqboard2000: make bool bit-field unsigned int ↵Giulio Benetti2018-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | bit-fields. Checkpatch complains on bool bitfields to be an int or u8/u16/u32 bitfield. Make bool bit-fields to be unsigned int bit-fields. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: drivers: amplc_pci230: make bool bit-field unsigned int ↵Giulio Benetti2018-06-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | bit-fields. Checkpatch complains on bool bitfields to be an int or u8/u16/u32 bitfield. Make bool bit-fields to be unsigned int bit-fields. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: drivers: amplc_dio200_common: make bool bit-field unsigned ↵Giulio Benetti2018-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | int bit-fields. Checkpatch complains on bool bitfields to be an int or u8/u16/u32 bitfield. Make bool bit-fields to be unsigned int bit-fields. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: drivers: amplc_dio200: make bool bit-field unsigned int ↵Giulio Benetti2018-06-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | bit-fields. Checkpatch complains on bool bitfields to be an int or u8/u16/u32 bitfield. Make bool bit-fields to be unsigned int bit-fields. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: comedidev: make bool bit-field unsigned int bit-fields.Giulio Benetti2018-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | Checkpatch complains on bool bitfields to be an int or u8/u16/u32 bitfield. Make bool bit-fields to be unsigned int bit-fields. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: comedi_fops: make bool bit-field unsigned int bit-fields.Giulio Benetti2018-06-171-1/+1
|/ | | | | | | | | | | Checkpatch complains on bool bitfields to be an int or u8/u16/u32 bitfield. Make bool bit-fields to be unsigned int bit-fields. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'staging-4.18-rc1' of ↵Linus Torvalds2018-06-094-13/+12Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO updates from Greg KH: "Here is the big staging and IIO driver update for 4.18-rc1. It was delayed as I wanted to make sure the final driver deletions did not cause any major merge issues, and all now looks good. There are a lot of patches here, just over 1000. The diffstat summary shows the major changes here: 1007 files changed, 16828 insertions(+), 227770 deletions(-) Because of this, we might be close to shrinking the overall kernel source code size for two releases in a row. There was loads of work in this release cycle, primarily: - tons of ks7010 driver cleanups - lots of mt7621 driver fixes and cleanups - most driver cleanups - wilc1000 fixes and cleanups - lots and lots of IIO driver cleanups and new additions - debugfs cleanups for all staging drivers - lots of other staging driver cleanups and fixes, the shortlog has the full details. but the big user-visable things here are the removal of 3 chunks of code: - ncpfs and ipx were removed on schedule, no one has cared about this code since it moved to staging last year, and if it needs to come back, it can be reverted. - lustre file system is removed. I've ranted at the lustre developers about once a year for the past 5 years, with no real forward progress at all to clean things up and get the code into the "real" part of the kernel. Given that the lustre developers continue to work on an external tree and try to port those changes to the in-kernel tree every once in a while, this whole thing really really is not working out at all. So I'm deleting it so that the developers can spend the time working in their out-of-tree location and get things cleaned up properly to get merged into the tree correctly at a later date. Because of these file removals, you will have merge issues on some of these files (2 in the ipx code, 1 in the ncpfs code, and 1 in the atomisp driver). Just delete those files, it's a simple merge :) All of this has been in linux-next for a while with no reported problems" * tag 'staging-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1011 commits) staging: ipx: delete it from the tree ncpfs: remove uapi .h files ncpfs: remove Documentation ncpfs: remove compat functionality staging: ncpfs: delete it staging: lustre: delete the filesystem from the tree. staging: vc04_services: no need to save the log debufs dentries staging: vc04_services: vchiq_debugfs_log_entry can be a void * staging: vc04_services: remove struct vchiq_debugfs_info staging: vc04_services: move client dbg directory into static variable staging: vc04_services: remove odd vchiq_debugfs_top() wrapper staging: vc04_services: no need to check debugfs return values staging: mt7621-gpio: reorder includes alphabetically staging: mt7621-gpio: change gc_map to don't use pointers staging: mt7621-gpio: use GPIOF_DIR_OUT and GPIOF_DIR_IN macros instead of custom values staging: mt7621-gpio: change 'to_mediatek_gpio' to make just a one line return staging: mt7621-gpio: dt-bindings: update documentation for #interrupt-cells property staging: mt7621-gpio: update #interrupt-cells for the gpio node staging: mt7621-gpio: dt-bindings: complete documentation for the gpio staging: mt7621-dts: add missing properties to gpio node ...
| * staging: comedi: comedi_usb.h: SPDX License Identifier is added in the first ↵Bhanusree Pola2018-05-311-3/+2Star
| | | | | | | | | | | | | | | | | | line SPDX License Identifier is added in form of a comment. Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>