aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-07-30staging: comedi: me_daq: use the comedi_device 'mmio' memberH Hartley Sweeten1-36/+31
Use the new 'mmio' member in the comedi_device for the ioremap'ed base address. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: gsc_hpdi: use the comedi_device 'mmio' memberH Hartley Sweeten1-24/+20
Use the new 'mmio' member in the comedi_device for the ioremap'ed base address. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_65xx: use the comedi_device 'mmio' memberH Hartley Sweeten1-50/+30
Use the new 'mmio' member in the comedi_device for the ioremap'ed base address. Since this was the only member in the private data, remove the struct and its allocation. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: 8255_pci: use the comedi_device 'mmio' memberH Hartley Sweeten1-16/+5
Use the new 'mmio' member in the comedi_device for the ioremap'ed base address. Since this was the only member in the private data, remove the struct and its allocation. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: add an 'mmio' member to comedi_deviceH Hartley Sweeten2-0/+2
All the comedi drivers that use memory mapped io currently have a void __iomem * member in their private data for the driver. For some of the drivers this is actually the only member in that data. For convienence, add a new member to the comedi_device for this void __iomem *. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: tidy up stuct pci230_privateIan Abbott1-28/+17
Align the member comments a bit better in the declaration of `struct pci230_private`. Also remove the heading comment as it is just a boilerplate comedi comment. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: no need to initialize named members to zeroIan Abbott1-6/+0
The members of the elements of `pci230_boards[]` that are not explicitly named in their initializers will be initialized to 0 automatically, so there is no need to initialize them to 0 explicitly. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: add whitespace to pci230_boards[]Ian Abbott1-37/+39
Add a bit of whitespace to the initializer of `pci230_boards[]` for aesthetic reasons. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: no need for '&function'Ian Abbott1-7/+7
Remove the "address-of" operator when the operand is a function. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: remove some indentation in ↵Ian Abbott1-4/+4
pci230_ai_check_chanlist() A few lines in `pci230_ai_check_chanlist()` are indented one level too much, so remove the excess indentation. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: omit '!= 0' from logical expressionsIan Abbott1-39/+36
Since anything non-zero is logically "true", don't bother doing "not-equal" comparisons with zero. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: don't begin line with binary operatorIan Abbott1-43/+43
If an expression involving a binary operator needs to be split across two lines, put the split after the operator. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: add whitespace to register valuesIan Abbott1-64/+64
Several macros are defined for bit-field values within hardware registers. They are defined as left-shifted values. Add some whitespace around the left-shift operator. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: remove PCI230_TEST_BIT()Ian Abbott1-3/+0
The `PCI230_TEST_BIT()` macro is never used. Remove it. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: remove PCI230_ADC_CONVIan Abbott1-6/+0
The macro `PCI230_ADC_CONV` is never used. Just remove it. (At one time, the value was written to the `PCI230_ADCSWTRIG` register to trigger a conversion, but any value would do, and the driver no longer uses that register to trigger conversions anyway.) Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: remove unused settling time constantsIan Abbott1-13/+0
The macro constants `PCI230_DAC_SETTLE`, `PCI230_ADC_SETTLE` and `PCI230_MUX_SETTLE` are never used. Just remove them. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: usleep_range is preferred over udelayIan Abbott1-1/+1
Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt". I picked 100 us as a reasonable upper bound, but it's not that critical. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: alignment should match open parenthesisIan Abbott1-1/+1
Fix checkpatch issue: "CHECK: Alignment should match open parenthesis". Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: blank lines aren't necessary before a close ↵Ian Abbott1-4/+0
brace '}' Fix checkpatch issues: "CHECK: Blank lines aren't necessary before a close brace '}'". Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: logical continuations should be on the ↵Ian Abbott1-17/+16
previous line Fix checkpatch issues "CHECK: Logical continuations should be on the previous line". Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: fix checkpatch line over 80 charactersIan Abbott1-4/+2
Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pci230: reformat a load of commentsIan Abbott1-348/+489
Reformat a load of comments to fit in with the preferred coding style, including the copyright and driver description comments at the top of the file. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tiocmd: introduce ni_tio_acknowledge()H Hartley Sweeten4-9/+14
The external callers of ni_tio_acknowledge_and_confirm() only call this function to ack any pending errors or interrupts before starting a new async command. Only the internal code in ni_tiocmd uses the data that is optionally returned by this function. Remove the export from ni_tio_acknowledge_and_confirm() and introduce a new exported function that handles passing the NULL params. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tiocmd: tidy up ni_tio_input_cmd()H Hartley Sweeten1-20/+10
The cmd->start_src is validated in the (*do_cmdtest) before this function is called. All valid trigger sources are handled so the default BUG() case can never occure. For aesthetics, refactor the switch into if/else tests and remove the BUG(). For aesthetics, rename the local variable 'retval' to simply 'ret'. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tiocmd: tidy up ni_tio_input_inttrig()H Hartley Sweeten1-8/+6
Remove the BUG_ON(counter == NULL). If this can never happen and it if did the driver should have died long before this function is called. For aesthetics, rename the local variable 'retval' to simply 'ret'. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tiocmd: tidy up ni_tio_configure_dma()H Hartley Sweeten1-25/+23
The 'enable' and 'read_not_write' parameters are true/false flags. For aesthetics, change their types to bool. Rename the local variable 'input_select_bits' to simply 'bits' and reuse it when enabling the dma on the m series and 660x counter variants. Add a local variable for the 'mask' that is passed to ni_tio_set_bits() to help clarify the code. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up G{02, 12}_Interrupt_Enable_BitsH Hartley Sweeten2-22/+5
Convert these enums into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Status_BitsH Hartley Sweeten2-8/+5
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gxx_Interrupt_Acknowledge_BitsH Hartley Sweeten2-32/+8
Convert this enum and the others related to it into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_DMA_Status_Reg_BitsH Hartley Sweeten2-7/+4
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_DMA_Config_Reg_BitsH Hartley Sweeten3-19/+10
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gxx_Joint_Status2_BitsH Hartley Sweeten2-17/+4
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Reset_BitH Hartley Sweeten2-7/+2
Convert this inline CamelCase function into a define. For aesthetics, move the new define so it is associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gxx_Status_BitsH Hartley Sweeten3-67/+14
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Second_Gate_BitsH Hartley Sweeten2-42/+25
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Mode_BitsH Hartley Sweeten3-49/+45
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Input_Select_BitsH Hartley Sweeten3-64/+53
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Auto_Increment_Reg_BitsH Hartley Sweeten1-4/+1
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Command_Reg_BitsH Hartley Sweeten3-34/+25
Convert this enum into defines and rename all the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Counting_Mode_Reg_BitsH Hartley Sweeten2-91/+64
Convert this enum into defines and rename all the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: ni_tio: tidy up ni_tio_read_sw_save_reg()H Hartley Sweeten1-11/+6
Remove the need for some of the local variables. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pc236, amplc_pci236: get rid of bustypeIan Abbott3-5/+0
The `bustype` member of `struct pc236_board` variables is initialized, but never used. Remove it along with the enumerated constants associated with it. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pc236: split into ISA, PCI and common moduleIan Abbott6-353/+429
The "amplc_pc236" driver currently handles both ISA and PCI devices and uses a small amount of conditional compilation depending which are enabled. Move most of the functionality into a new module, "amplc_pc236_common", and split off support for PCI devices into a new module, "amplc_pci236". Retain support for ISA devices in the existing module, "amplc_pc236". Since the `detach` handler (`pc236_detach()`) in the existing module "amplc_pc236" now only needs to handle ISA devices and only calls `comedi_legacy_detach()`, just use `comedi_legacy_detach()` directly as the `detach` handler in `struct comedi_driver amplc_pc236_driver`. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pc236: add callback to check and clear interruptIan Abbott1-16/+24
Add an optional callback function pointer to the board data to be called when checking if an interrupt has occurred and to clear it if it has. Since the callback returns `bool`, change a few other `int` values to `bool` to match. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pc236: combine interrupt enable/disable functionsIan Abbott1-30/+7
`pc236_intr_enable()` and `pc236_intr_disable()` are very similar. Combine them into a single function `pc236_intr_update()` with a parameter to indicate whether interrupts are being enabled or disabled. Change type type of the `enable_irq` member of the private data to `bool` to match the parameter. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pc236: add callback to enable/disable interruptIan Abbott1-4/+14
Add an optional callback function pointer to the board data to be called when interrupts are logically enabled or disabled to update the hardware registers. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pc236: don't disable h/w interrupt on detach()Ian Abbott1-2/+0
If an asynchronous command was running when the device is being detached, the comedi core would have called the subdevice `cancel` handler (`pc236_intr_cancel()`) before calling the `detach` handler (`pc236_detach()`). Since the cancel handler disables hardware interrupts (at least for the PCI236 board) by calling `pc236_disable_intr()`, there is no need for the detach handler to do so as well. Remove the call to `pc236_disable_intr()` from `pc236_detach()`. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_pc236: move static board dataIan Abbott1-12/+12
Move the static board data in `pc236_isa_boards[]` and `pc236_pci_board` closer to where they are used. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_dio200_pci: no need to test board pointer in ↵Ian Abbott1-4/+1
dio200_pci_detach() `dio200_pci_detach()` doesn't need to check if the pointer to constant board data (`thisboard`) and the pointer to private per-device data (`devpriv`) are valid before calling `amplc_dio200_common_detach()`. It has no further need to check `thisboard` so remove the variable altogether. Move the test of `devpriv` to the first point it is needs to be valid. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-30staging: comedi: amplc_dio200_common: remove some tests from ↵Ian Abbott1-5/+0
amplc_dio200_common_detach() `amplc_dio200_common_detach()` doesn't do much apart from freeing the IRQ handler that was requested by `amplc_dio200_common_attach()` if `dev->irq` is non-zero. There is no need to check if the pointer to the constant board data or the pointer to private per-device data exist, so remove those tests. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>