For aesthetics, tidy this function up and use the register defines
to remove the magic numbers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci1723.c | 21 ++---
1 file changed, 6 insertions(+), 15 deletions
This member of the private data is set but not used by the driver.
Remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_1500.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers
Rename this CamelCase member of the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c| 20
drivers/staging/comedi/drivers/addi_apci_1500.c | 4 ++--
2 files changed, 10
register map defines.
Fix the interrupt handler so that the IRQ is properly shared.
H Hartley Sweeten (11):
staging: comedi: hwdrv_apci1500: introduce z8536_read()
staging: comedi: hwdrv_apci1500: introduce z8536_write()
staging: comedi: hwdrv_apci1500: introduce z8536_reset()
staging
Move the PCI Bar 1 register map defines to the main driver source file.
For aesthetics, rename the defines.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 21 -
drivers/staging/comedi/drivers
The Z8536 CIO registers are indirectly written by writing the register value
to the control register then writing the value to the control register.
Introduce a helper function to write the Z8536 CIO registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
This member of the private data is the same as the comedi_device 'iobase'.
Remove the private data member and use that instead.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 28 +
For aesthetics, convert the enum for the PCI Bar 1 register map to
defines and move them to the main driver source file. Rename the
registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 35
Introduce a helper function to reset the Z8536 CIO device.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 185 -
1 file changed, 69 insertions(+), 116 deletions(-)
diff --git a/drivers
The interrupt used by this driver is shared. If the board did not cause
the interrupt the driver should return IRQ_NONE so that another driver
can handle it. Fix the interrupt handler so this happens.
Tidy up the interrupt handler a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg
This define is not used by the driver. Remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500
The Z8536 CIO registers are indirectly read by writing the register value
to the control register then reading the control register. Introduce a helper
function to read the Z8536 CIO registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi
PCI Bar 0 accesses the AMCC S5933 PCI controller used on this board.
Use the defines from amcc_35933.h and remove the "magic" numbers.
Rename the CamelCase private data member 'i_IobaseAmcc' used to hold
the address for PCI Bar 0.
Signed-off-by: H Hartley Sweeten
Cc: Ian Ab
inlock the sequence to protect the indirect register access.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 222 ++---
1 file changed, 58 insertions(+), 164 deletions(-)
diff --git a/drivers/stag
register map defines.
Fix the interrupt handler so that the IRQ is properly shared.
v2: spinlock protect the Z8536 indirect register access as suggested
by Ian Abbott
H Hartley Sweeten (11):
staging: comedi: hwdrv_apci1500: introduce z8536_read()
staging: comedi: hwdrv_apci1500: introduce
Introduce a helper function to reset the Z8536 CIO device.
Spinlock the initial reset of the Z8536 chip that puts it in State 0.
The z8536_{read,write} operations already do the spinlock to protect
the indirect register access.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah
This member of the private data is the same as the comedi_device 'iobase'.
Remove the private data member and use that instead.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 25 ++---
This member of the private data is set but not used by the driver.
Remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_1500.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers
Status' local variable in apci1500_do_bits()
that is used to hold the result of some dummy reads. Rename the
CamelCase local variable 'ui_InterruptStatus' that is used to check the
interrupt from the amcc chip.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../c
For aesthetics, convert the enum for the PCI Bar 1 register map to
defines and move them to the main driver source file. Rename the
registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 35
,
spinlock the sequence to protect the indirect register access.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 1059 +---
1 file changed, 250 insertions(+), 809 deletions(-)
diff --git a/drive
Move the PCI Bar 1 register map defines to the main driver source file.
For aesthetics, rename the defines.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c | 21 -
drivers/staging/comedi/drivers
The interrupt used by this driver is shared. If the board did not cause
the interrupt the driver should return IRQ_NONE so that another driver
can handle it. Fix the interrupt handler so this happens.
Tidy up the interrupt handler a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg
Rename this CamelCase member of the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci1500.c| 20
drivers/staging/comedi/drivers/addi_apci_1500.c | 4 ++--
2 files changed, 10
This define is not used by the driver. Remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500
Tidy up this driver and add async command support for change-of-state
detection of the digital inputs.
H Hartley Sweeten (8):
staging: comedi: aio_iiro_16: fix subdevice 0 'type'
staging: comedi: aio_iiro_16: fix subdevice 1 'type'
staging: comedi: aio_iiro_16: ti
Tidy up the multi-line comments to follow the kernel CodingStyle.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/aio_iiro_16.c | 51 +---
1 file changed, 23 insertions(+), 28 deletions(-)
diff --git a/drivers
For aesthetics, add some white space to the subdevice initialization.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/aio_iiro_16.c | 28 +++-
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a
Subdevice 1 is a digial input not a digital I/O subdevice.
Fix the type and, for aesthetics, rename the (*insn_bits) function used
to read the inputs.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/aio_iiro_16.c | 12 ++--
1
Subdevice 0 is a digial output not a digital I/O subdevice.
Fix the type and, for aesthetics, rename the (*insn_bits) function used
to set the outputs.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/aio_iiro_16.c | 12 ++--
1
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/aio_iiro_16.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
The relay registers are readable. Read them during the attach to get
the initial state of the digital outputs.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/aio_iiro_16.c | 4
1 file changed, 4 insertions(+)
diff --git a
This board supports interrupts on change of state of the digital inputs.
Add the necessary subdevice support and interrupt handler to allow async
commands to detect the change of state.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers
This board supports interrupts on change of state of the digital inputs.
Introduce a helper function to enable/disable the interrupt. Use the new
helper function to ensure that interrupts are initially disabled during
the driver (*attach).
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc
For aesthetics, introduce a struct to hold the DMA descriptor data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_at_a2150.c | 76 +++-
1 file changed, 41 insertions(+), 35 deletions(-)
diff --git a
For aesthetics, introduce a struct to hold the DMA descriptor data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl818.c | 44 +++--
1 file changed, 25 insertions(+), 19 deletions(-)
diff --git a
igned-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl816.c | 91 -
1 file changed, 56 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl816.c
b/drivers/staging/comedi/drivers/pcl
As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...", the 'count' member of the private data does not need to
be volatile.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_at_a2150.c | 3
This driver no longer uses virt_to_bus(). Remove the dependancy.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index
DMA is optional with this driver. Introduce a helper function to request
the DMA channel and allocate the buffers. Don't fail the driver attach
if the user passed an invalid DMA channel or the channel cannot be
requested.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Ha
This series removes all the VIRT_TO_BUS dependancies from the legacy comedi
drivers. It also tidies up the allocation and freeing of the DMA and the
buffers used for DMA.
H Hartley Sweeten (37):
staging: comedi: adl_pci9118: remove VIRT_TO_BUS dependancy
staging: comedi: das1800: reduce
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 2 +-
drivers/staging/comedi/drivers/pcl812.c | 20
From: H Hartley Sweeten
For aesthetics, use the helper function to get the byte size of each sample
instead of using sizeof() the first buffer element.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_at_a2150.c | 8
1
For aesthetics, move the freeing of the DMA channel and the buffers to
a helper function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl816.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 2 +-
drivers/staging/comedi/drivers/dt282x.c | 13
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 2 +-
drivers/staging/comedi/drivers/pcl816.c | 20
From: H Hartley Sweeten
For aesthetics, introduce a helper function to free the DMA channel and
buffer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_at_a2150.c | 20 +---
1 file changed, 13 insertions(+), 7
. For aesthetics, add a new member to the private
data and use that for the FIFO bounce buffer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/dr
Refactor this function so that a for loop can be used to request and
set up the two DMA descriptors.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 52 +++-
1 file changed, 25 insertions(+), 27
DMA support is optional for the labpc driver. The return value from
labpc_init_dma_chan() is not even checked by the caller.
Change the return type to void and tidy up the function a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi
For aesthetics, move the freeing of the DMA channel and the buffers to
a helper function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das16.c | 33 +++--
1 file changed, 19 insertions(+), 14 deletions
For aesthetics, introduce a struct to hold the DMA descriptor data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dt282x.c | 111 +++-
1 file changed, 53 insertions(+), 58 deletions(-)
diff --git a
For aesthetics, introduce a struct to hold the DMA descriptor data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl816.c | 51 ++---
1 file changed, 28 insertions(+), 23 deletions(-)
diff --git a
DMA is optional with this driver. Introduce a helper function to request
the DMA channel and allocate the buffers. Don't fail the driver attach
if the user passed an invalid DMA channel or the channel cannot be
requested.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Ha
An IRQ and at least one DMA channel are required to use DMA with this driver.
Move the check to the caller to reduce the indent level of this function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 129
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 2 +-
drivers/staging/comedi/drivers/ni_at_a2150.c | 17
igned-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dt282x.c | 84 -
1 file changed, 40 insertions(+), 44 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dt282x.c
b/drivers/staging/comedi/drivers/dt2
For aesthetics, introduce a struct to hold the DMA descriptor data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 145 +++
1 file changed, 70 insertions(+), 75 deletions(-)
diff --git a
DMA is optional with this driver. Introduce a helper function to request
the DMA channel and allocate the buffers. Don't fail the driver attach
if the user passed an invalid DMA channel or the channel cannot be
requested.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Ha
For aesthetics, introduce a struct to hold the DMA descriptor data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das16.c | 48 ++
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a
escriptor and initialize it with the
actual size of the DMA transfer. Use that in pcl818_handle_dma() to
return the proper number of samples. Use the comedi_bytes_to_samples()
helper to convert the byte size to comedi samples. Remove the unnecessary
'bufptr' local variable.
Signed-off-by
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 2 +-
drivers/staging/comedi/drivers/pcl818.c | 25
The DAS16 board is an ISA device not a PCI device. For aesthetics, use
dma_{alloc,free}_coherent() to allocate and free the DMA buffers instead
of the PCI versions.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das16.c | 9
For aesthetics, introduce a struct to hold the DMA descriptor data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl812.c | 100
1 file changed, 50 insertions(+), 50 deletions(-)
diff --git a
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 2 +-
drivers/staging/comedi/drivers/das1800.c | 16
For aesthetics, move the freeing of the DMA channel and the buffers to
a helper function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl812.c | 27 +--
1 file changed, 17 insertions(+), 10 deletions
For aesthetics, move the freeing of the DMA channel and the buffers to
a helper function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl818.c | 23 +--
1 file changed, 17 insertions(+), 6 deletions(-)
diff
For aesthetics, introduce a helper function to free the DMA channels and
allocated buffers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 30 --
1 file changed, 20 insertions(+), 10 deletions
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 2 +-
drivers/staging/comedi/drivers/ni_labpc.h
For aesthetics, introduce a struct to hold the DMA descriptor data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc.h| 15 --
drivers/staging/comedi/drivers/ni_labpc_isadma.c | 58
drivers
From: H Hartley Sweeten
This driver requires an IRQ and DMA in order to support async commands.
For aesthetics, introduce a helper function to request the IRQ and DMA
channels and allocate the DMA buffer. Since the async command support
is optional, make the helper function handle any request
errupt and ai subdevice
(*poll) function to return the proper number of samples. Use the
comedi_bytes_to_samples() helper to convert the byte size to comedi
samples in the interrupt handler.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/
Instead of passing the dma descriptor 'chan' and 'virt_addr' just pass the
dma descriptor.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 18 +-
1 file changed, 9 insertions(+), 9 deleti
For asethetics, move the variable that holds the dma transfer 'size' into
the dma descriptor.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das16.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
di
Introduce a helper function to disable and the ISA DMA controller and
return the residue as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 40 ++--
1
Introduce a helper function to disable and the ISA DMA controller and
return the residue as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das16.c | 33 -
1
Tidy up the code that determines the number of samples to read for the
current DMA transfer and how many samples are needed for the next DMA,
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_isadma.c | 48
Tidy up the ISA DMA programming in all the comedi legacy drivers to follow
the programming sequence described in Documentation/DMA-ISA-LPC.txt.
This series applies after:
"[PATCH 00/37] staging: comedi: tidy up legacy DMA drivers"
H Hartley Sweeten (25):
staging: comedi: pcl818:
Use the comedi_bytes_per_sample() helper and remove the hard coded sample
size.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_isadma.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers
Introduce a helper function to disable and the ISA DMA controller and
return the residue as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_at_a2150.c | 42 +++-
1
ize != 0) before programming
it to avoid enabling the DMA at the end of a stop_src == TRIG_COUNT command.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_isadma.c | 18 +-
1 file changed, 9 insertions(+), 9 deleti
they have namespace associated with the
driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/das1800.c
b
Introduce a helper function to program the ISA DMA controller. Program
the ISA DMA as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dt282x.c | 36 -
1 file
According to Documentation/DMA-ISA-LPC.txt, the DMA lock needs to be
claimed before using any of the ISA DMA routines. Introduce a helper
function to disable the ISA DMA controller and add the necessary
locking calls.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
oid any possible integer overflow issues.
Use the comedi_nsamples_left() helper to limit the samples when cmd->stop_src
is TRIG_COUNT.
Use comedi_samples_to_bytes() to return the final DMA size in bytes.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
dr
Introduce a helper function to program the ISA DMA controller. Program
the ISA DMA as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl816.c | 33 ++---
1 file
Introduce a helper function to program the ISA DMA controller. Program
the ISA DMA as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_isadma.c | 37
1 file
Introduce a helper function to program the ISA DMA controller. Program
the ISA DMA as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl812.c | 49 +
1 file
Introduce a helper function to program the ISA DMA controller. Program
the ISA DMA as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_at_a2150.c | 36
1 file
Introduce a helper function to program the ISA DMA controller. Program
the ISA DMA as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl818.c | 33 ++---
1 file
According to Documentation/DMA-ISA-LPC.txt, the DMA lock needs to be
claimed before using any of the ISA DMA routines. Introduce a helper
function to disable the ISA DMA controller and add the necessary
locking calls.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
Introduce a helper function to program the ISA DMA controller. Program
the ISA DMA as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das16.c | 35 ++
1 file
For aesthetics, convert this statis const global variable to a define.
Cleanup the maximum 'size' calc in labpc_suggest_transfer_size(). The modulo
operation will always result in '0'.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/st
According to Documentation/DMA-ISA-LPC.txt, the DMA lock needs to be
claimed before using any of the ISA DMA routines. Introduce a helper
function to disable the ISA DMA controller and add the necessary
locking calls.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
Introduce a helper function to program the ISA DMA controller. Program
the ISA DMA as described in Documentation/DMA-ISA-LPC.txt.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 48 ++--
1 file
Introduce a helper function to disable and the ISA DMA controller and
return the residue as described in Documentation/DMA-ISA-LPC.txt.
The DMA will always be disabled when labpc_setup_dma() is called. Remove
the unnecessary disable in that function.
Signed-off-by: H Hartley Sweeten
Cc: Ian
For asethetics, move the variable that holds the dma transfer 'size' into
the dma descriptor.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das1800.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletion
According to Documentation/DMA-ISA-LPC.txt, the DMA lock needs to be
claimed before using any of the ISA DMA routines. Introduce a helper
function to disable the ISA DMA controller and add the necessary
locking calls.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/Kconfig | 3 +
drivers/staging/comedi/drivers/Makefile| 1 +
drivers/staging/comedi/drivers/comedi_isadma.c | 262 +
drivers/staging/comedi/drivers/comedi_isad
Use the new comedi_isadma module to provide the ISA DMA support. This removes
all the ISA_DMA_API code from this driver and allows the driver to be used on
platforms that don't support the ISA_DMA_API.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/st
601 - 700 of 4915 matches
Mail list logo