Use the generic TCW (timer/counter/watchdog) defines for the 32-bit counters.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1564.c | 35 --
drivers/staging/comedi/drivers/addi_apci_1564.c| 35
sition.
This fixes a possible interger overflow when calculating the value of the
'stop_counter' and removes the need to accumulate the 'total' number of
samples added to the async buffer in pci9111_handle_fifo_half_full().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg
Use the comedi_async 'scans_done' to detect the EOA and tidy up the DMA
code a bit.
H Hartley Sweeten (4):
staging: comedi: adl_pci9118: use comedi_async 'scans_done' to detect EOA
staging: comedi: adl_pci9118: absorb move_block_from_dma()
staging: come
Remove the assumption of the sample size by using the comedi_bytes_to_samples()
helper function to convert the number of bytes to the number of samples.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adl_pci9118.c | 4 +---
1 file
after writing
the samples. The driver will detect the EOA event and not retart the DMA.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adl_pci9118.c | 25 +++--
1 file changed, 7 insertions(+), 18 deletions(-)
diff
Absorb this simple helper function into interrupt_pci9118_ai_dma().
Remove the unnecessary local variables 'sampls' and 'm'.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adl_pci9118.c | 24 +++-
The comedi core now counts the number of samples added to the async buffer and
detects the end-of-scan and increments the comedi_async 'scans_done' counter.
Remove the private data member 'ai_act_scan' and use the 'scans_done' member
to detect the end-of-acquisit
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 40 +++-
1 f
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 28
nsn->n' to clarify the return value.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 33
1 file changed, 12 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/comedi/drivers/
For aesthetics, factor the board reset and detection code out of the
(*attach) function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 64 ++--
1 file changed, 36 insertions(+), 28 deletions
terminated instantly.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dmm32at.c
b/drivers/staging/comedi/drivers
This driver currently does not use the FIFO. For completeness, define
the offset to the FIFO Depth register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 25 -
1 file
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers
est) validates the channel list in
Step 5.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 53
1 file changed, 20 insertions(+), 33 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dmm32at.c
For aesthetics, rename this define used for the Start A/D Conversion register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 17 -
1 file changed, 8
Here's the big cleanup series for the dmm32at comedi driver.
H Hartley Sweeten (30):
staging: comedi: dmm32at: make AI (*cancel) actually cancel async command
staging: comedi: dmm32at: use comedi_async 'scans_done' to detect EOA
staging: comedi: dmm32at: introduce dmm3
For aesthetics, rename this define used for the FIFO Status register.
Define the bits of the register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
For aesthetics, add some whitespace to the subdevice initialization.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 58 +++-
1 file changed, 28 insertions(+), 30 deletions(-)
diff --git a
Remove the private data member 'ai_scans_left' and use the comedi_async
'scans_done' to detect the end-of-acquisition.
This also removes the artifical max limit on the cmd->stop_arg.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers
For aesthetics, rename these defines used for the A/D LSB/MSB registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 15 ++-
1 file changed, 10 insertions(+), 5
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 15 +--
1 file changed, 9 insertions
The 'data' and 'ai_inuse' members in the private data are not used in the
driver. Remove them.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/dr
For aesthetics, rename these defines used for the A/D Low/High Channel
registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 23 +++
1 file changed, 15 insertions(+), 8
Reformat the multi-line comments for follow the CodingStyle.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 65 +---
1 file changed, 34 insertions(+), 31 deletions(-)
diff --git a/drivers
For aesthetics, rename these defines used for the D/A LSB/MSB registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi
rrupt
handler for the async command.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 40 +---
1 file changed, 16 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dmm32at
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/d
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 17 ++---
1 file changed, 10
8255 module to support this subdevice.
This also removes the need for the private data in this driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 1 +
drivers/staging/comedi/drivers/dmm32at.c | 123
Change the MODULE_DESCRIPTION to something more useful than the generic
"Comedi low-level driver".
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 36
For aesthetics, rename this define used for the Analog Configuration register.
Define the bits of the register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 19 +++
1 file changed, 11 insertions(+), 8
This driver was _really_ broken and had to be rewritten. During that rewrite the
async command support was stubbed in but not completed.
This series adds support for basic AI async commands.
H Hartley Sweeten (4):
staging: comedi: das6402: add basic (*do_cmdtest) for AI async commands
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das6402.c | 42
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers
Flesh out the (*do_cmd) function to support timed analog input
acquisitions.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das6402.c | 20 +++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das6402.c | 31
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
Reviewed-by: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi
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
Reviewed-by: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das6402.c | 31
Flesh out the (*do_cmd) function to support timed analog input
acquisitions.
Signed-off-by: H Hartley Sweeten
Reviewed-by: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das6402.c | 20 +++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a
This series adds support for basic AI async commands.
v2: fix a debug message in PATCH 1/4 pointed out by Ian Abbott.
H Hartley Sweeten (4):
staging: comedi: das6402: add basic (*do_cmdtest) for AI async commands
staging: comedi: das6402: introduce das6402_ai_set_mode()
staging: comedi
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
Reviewed-by: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das6402.c | 42
like the core expects. For aesthetics, rename the
function so it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas64.c | 31
1 file changed, 18 insertions(+),
For consistency with the other calib subdevices, refactor this (*insn_write)
function so that it only writes the final data value to the hardware.,
For aesthetics, rename the function so it has namespace associated with the
driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah
27;
memory. A couple of the comedi drivers still use a private (*insn_read),
move the hook up after the allocation and add a comment for them.
Convert some more comedi drivers to use the comedi_subdevice 'readback'.
Tidy up/fix the (*insn_write) functions for the ones that don'
The 'address' passed to this function is actually the comedi channel. This
value will always be less than the subdevice n_chan (which is 8). Remove
the unnecessary sanity check in caldac_8800_write().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drive
Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only caldac subdevice. Remove the then
unused
'caldac' member from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only calibration subdevice. Remove the
then unused 'caldac_state' member from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-H
n the driver,
modify the subdevice init so that a loop is used to initialize the channels and
readback values.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 32 --
1 file changed, 13 inserti
Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only caldac subdevice. Remove the then
unused 'caldac_value' member from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-H
Introduce a helper function to write a value to a given DAC channel.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_common.c | 32 +++-
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a
Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only calibration subdevice. Remove the
then unused 'ad8402_state' member from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-H
Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only caldac subdevice. Remove the then
unused
'caldac' member from the private data.
Tidy up atao_calib_insn_write().
Signed-off-by: H Hartley Sweeten
Cc:
Move the check/save of the calib subdevice value to the (*insn_write) function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_common.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a
like the core expects. For aesthetics, rename the
function so it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 40 +-
1 file changed, 23 insertions(+),
Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the analog output subdevice. Remove the then unused
'ao_value' member from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
like the core expects. For aesthetics, rename the
function so it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas64.c | 30 +---
1 file changed, 18 insertions(+),
like the core expects. For aesthetics, rename the
function so it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 44 +-
1 file changed, 25 insertions(+),
Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the eeprom subdevice. Remove the then unused
'eeprom_data' member from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
dr
Use the comedi_subdevice 'readback' member and the core provided (*insn_read)
to handle the readback of the write-only trimpot calib subdevice. Remove the
then unused 'trimpot_value' member from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc
Use the comedi_timeout() helper to wait for the eeprom to be ready to accept
writes and remove the timeout loop in labpc_eeprom_write().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_common.c | 37
1
he default.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers.c | 3 +++
drivers/staging/comedi/drivers/addi_apci_3120.c | 1 -
drivers/staging/comedi/drivers/addi_apci_3501.c | 1 -
drivers/staging/comedi/drivers/addi_apci_3
Use the comedi_timeout() helper to wait for the DAC to be idle before
writing to it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 33 +++-
1 file changed, 13 insertions(+), 20 deletions
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
Cc: Ian Abbott
Cc: Greg Kroah-H
This define is already in pci_ids.h. Remove the duplicate in this driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c
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
Cc: Ian Abbott
Cc: Greg Kroah-H
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 24
1 file
For aesthetics, remove the enum and define the bits for this register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 6 +-
1
n.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 46
1 file changed, 6 insertions(+), 40 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c
b/drivers/staging/comedi/drivers
ass the 'mode' needed by set_dac(). Remove the
subdevice specific (*insn_write) functions.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 68
1 file changed, 18 insertions(+), 50 del
Remove the unnecessary noise at the end of the (*auto_attach).
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c
b/drivers
For aesthetics, add some whitespace to the pci_driver declaration.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi
For aesthetics, add some whitespace to the comedi_driver declaration.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi
Tidy up the multi-line comments to follow the CodingStyle.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 94 +---
1 file changed, 44 insertions(+), 50 deletions(-)
diff --git a/drivers/staging
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-b
Absorb this simple function into adv_pci1724_insn_write().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 20 +---
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/comedi
For aesthetics, rename the analog output comedi_lrange table so
it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
For aesthetics, absorb this function into the (*auto_attach).
Add some whitespace to the subdevice init.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 83
1 file changed, 35 insertions
Define the bits for the synchronous output control/status register and
remove the enum.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a
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
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1724.c | 8 +++-
1 file changed, 3 insert
Following is the big cleanup for the adv_pci1724 driver.
H Hartley Sweeten (19):
staging: comedi: adv_pci1724: use subdevice readback for 'ao_value'
staging: comedi: adv_pci1724: use subdevice readback for 'offset_value'
staging: comedi: adv_pci1724: use subdevice read
ack to the comedi_readback_insn_read()
helper to
provide the readback.
Have the core automatically hook up the (*insn_read) callback after allocating
the
memory if the driver has not already hooked it up to a private function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartm
r aesthetics, rename the (*insn_write) function and tidy it up a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 57 +---
1 file changed, 18 insertions(+), 39 deletions(-)
diff --git a/dr
For aesthetics, rename the defines used for the register map offsets and
remove the unnecessary comments. Add the bit defines for the registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 117
This member of the private data is initialized to 0 by pci1723_reset()
and is not used any where else in the driver. Remove it.
Use the register map defines to set the range for each output channel.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging
Tidy up the code that determines the initial io_bits (direction) of the
digital I/O subdevice and remove the magic numbers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 23 +++
1 file changed, 7
The comedi_device 'write_subdev' should only be initialized if the subdevice
supports async commands.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drive
ntrol" register in order to load the range setting.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 45 ++--
1 file changed, 16 insertions(+), 29 deletions(-)
diff --git a/drivers/st
The pci1723_reset() function simply resets all the analog output channels
to 0V and a +/-10V range. This really isn't necessary when detaching the
driver.
Remove the board reset and just use comedi_pci_detach() directly for the
(*detach).
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbot
Update the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver".
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
Following is the big cleanup for the adv_pci1723 driver.
H Hartley Sweeten (11):
staging: comedi: adv_pci1723: tidy up register map
staging: comedi: adv_pci1723: remove private data 'da_range'
staging: comedi: adv_pci1723: remove board reset during (*detach)
staging: comedi: a
The subdevice 'len_chanlist' is only used by subdevices that support async
commands. Remove the unnecessary initializations in this driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 4 +---
1 file
Tidy up the multi-line comments to follow the CodingStyle.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 79 +---
1 file changed, 38 insertions(+), 41 deletions(-)
diff --git a/drivers/staging
501 - 600 of 4915 matches
Mail list logo